How to Use DeepSeek API in SillyTavern: Custom Endpoint
SillyTavern can connect to any OpenAI-compatible API through its Chat Completion mode with the Custom source. Here is how to use a DeepSeek-style API in SillyTavern, with the exact values to enter and settings that keep long roleplay chats cheap.

Key points
- In SillyTavern choose API Connections, Chat Completion, then the Custom (OpenAI-compatible) source.
- Enter https://api.deepseekapi.top/v1 as the endpoint and uncensored as the model ID.
- Long chats resend history each turn, so a context limit of 16k to 32k tokens keeps cost low.
- For lawful adult use only; sexual content involving minors is never allowed.
Setup in five steps
The question of how to use deepseek api sillytavern comes down to one fact: SillyTavern can talk to any OpenAI-compatible endpoint, so you only supply a URL, a key and a model ID. Note that this service is not the official DeepSeek API. It hosts one open-weight model with the ID uncensored, run by an independent provider and tuned to answer without content refusals for lawful adult use.
- Create an account and open the API key page. Copy a key. New users can claim $0.50 of trial credit there with one click, no card needed, valid for 7 days.
- In SillyTavern, open the API Connections tab (the plug icon in the top bar).
- Set the API type to Chat Completion. Then set the Chat Completion Source to Custom (OpenAI-compatible).
- In the custom endpoint field enter
https://api.deepseekapi.top/v1. Paste your key into the API key field. In the model ID field enteruncensored. - Press Connect. A green status light and a model name mean the link works.
Label names shift a little between SillyTavern releases, but the idea stays the same: Chat Completion mode, Custom source, endpoint, key, model. Get the key from the API key page.
If Connect fails
Check these in order. Most failures are one of them.
- Wrong URL form. The endpoint ends in
/v1. Do not add/chat/completions. - Wrong source. The Text Completion mode uses a different request format. This API serves
POST /v1/chat/completionsandGET /v1/models, so use Chat Completion. - Key pasted with spaces. Paste it again and look for a trailing space.
- Server cannot reach the internet. If you run SillyTavern on a home server or in a container, the machine needs outbound HTTPS access.
To separate a SillyTavern problem from a key problem, test the key from a terminal:
curl https://api.deepseekapi.top/v1/models -H "Authorization: Bearer YOUR_KEY" | grep uncensored
A JSON list with uncensored in it means the key is good. To check the chat route itself:
curl https://api.deepseekapi.top/v1/chat/completions -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" -d '{"model": "uncensored", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'Settings that matter for roleplay
Streaming
Turn streaming on in the Chat Completion panel. The API sends tokens over SSE as they are produced, so replies appear while they are written. A streamed request holds one of your concurrency slots until the stream ends. A full key allows 8 at once, a trial key allows 2.
Context size
The model has a 100,000-token window, prompt plus completion. You do not have to use it all. SillyTavern sends the character card, the persona, lorebook entries and as much chat history as fits the limit you set, on every single message. A smaller limit means a smaller bill and faster replies. For most chats 16k to 32k tokens is plenty.
Max response length
Set the response limit to something sensible, such as 400 to 600 tokens, so a reply cannot drift into an essay. The API does not require max_tokens, but a cap protects your credit from runaway outputs.
Sampling
Temperature, top_p, stop sequences, seed and the penalties are passed through to the model. A common starting point for character chat is temperature 0.8 to 1.0 and top_p around 0.9. Change one value at a time. If a character repeats phrases, raise the frequency or presence penalty a little rather than the temperature.
Stop sequences
If the model starts writing the user's lines as well, add the user's name followed by a colon as a stop sequence. This is passed through.
A first-run checklist
Before you load a favourite character, run a short test chat so you know the connection is healthy.
- Create a blank character or use the default assistant card.
- Send "Reply with the word ready." The answer should come back in a second or two and stream in as it is produced.
- Open the SillyTavern console or the network log if nothing appears. A 401 means the key is wrong, a 404 means the URL or model ID is wrong, and a 429 means a limit was hit.
- Check your balance. Each response includes an
X-Balance-USDheader, so you can verify the credit drops by a tiny amount per message. - Only then load your real character card and lorebook.
If the reply is empty or cut mid-sentence, look at the response length setting first. A limit set too low ends the reply early, and the unfinished sentence is not a model fault.
Moving between presets
SillyTavern keeps sampling presets separate from the connection profile. It is worth saving one preset for narrative writing, with a higher temperature, and one for short factual replies, with a lower one. Switching the preset does not touch the endpoint or key.
What a roleplay session costs
The price is $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit with no subscription. Because history is resent, input is the larger part. Work through a chat with a 20,000-token prompt per message and a 400-token reply:
- Input: 20,000 × $0.15 / 1,000,000 = $0.003
- Output: 400 × $0.50 / 1,000,000 = $0.0002
- Total: $0.0032 per message
So 100 messages cost $0.32. Now compare a trimmed context of 8,000 tokens with the same reply: 8,000 × $0.15 / 1,000,000 = $0.0012, plus $0.0002, making $0.0014 per message and $0.14 per 100. Cutting context cost less than half as much for the same number of turns.
The $0.50 trial covers about 156 messages at the larger size (0.50 / 0.0032 = 156.25) or about 357 at the smaller size (0.50 / 0.0014 = 357.1). Failed or refused requests are not charged, and credit never expires. See the pricing page for top-up amounts, bonuses and payment methods; card (Visa, Mastercard, Apple Pay, Google Pay) and crypto (USDT on TRC20, USDC on Base) are both accepted.
Characters, safety and the one hard rule
The model is tuned for fiction, roleplay and companion apps for adults. It is not a general safety filter, and it does not decide what is suitable for you. That is your job: keep your cards and chats to lawful adult use.
The single fixed limit is that sexual content involving minors is not allowed, and no prompt changes that. Keep character ages clearly adult in your cards.
A few practical habits help the quality of a chat:
- Put the key facts about the character near the top of the card, not buried at the end.
- Use a short system prompt that sets the narrator's style and the length of replies.
- Summarize old parts of the chat with SillyTavern's summary feature instead of carrying them forever.
- Keep lorebook entries short and triggered by keywords so they only enter the prompt when needed.
Prompts are not used for training. Read the quickstart docs for the response headers, including X-Balance-USD, which shows your remaining balance.
Using a character as a companion app backend
Some people use SillyTavern as the front end for a long-running companion character for adults. The same rules apply as for any chat. Keep the persona consistent by writing it as a short fixed block, and let the summary feature handle older events. Long gaps between sessions cost nothing, because credit never expires and there is no subscription.
If you later build your own app instead of using SillyTavern, you can call the same endpoint from code. The quickstart docs show curl, Python and Node examples with the same base URL and model ID, so a prompt that works in SillyTavern can be moved over directly.
Rate limits in a busy chat
A single chat rarely hits the limits. Group chats, swipes and several open tabs can. The service answers HTTP 429 with the code rate_limited when you pass the requests-per-minute limit (60 on a trial key, 300 on a full key) and concurrency when too many requests are in flight (2 on trial, 8 on full).
On brief overload you also get a 429 with a Retry-After: 5 header. Waiting five seconds and sending again is the right response. If you see these on a trial key, close extra tabs or stop a swipe before starting another.
More guides
Questions and answers
Is this the official DeepSeek API?
No. It is an independent OpenAI-compatible service running one open-weight model with the ID uncensored. It is not the official API of DeepSeek or any other vendor.
Which SillyTavern API type should I pick?
Choose Chat Completion and the Custom (OpenAI-compatible) source. The service uses the chat completions format, not text completion.
What goes in the model ID field?
Enter uncensored in lowercase. You can confirm it by calling GET /v1/models with your key.
How do I keep roleplay costs low?
Lower the context size, because the history is sent again with every message. Capping response length also helps.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.