What you need before you connect
You need three values from the provider: the API base URL, an API key and the exact ID of the model you want. Everything else in SillyTavern can stay at its defaults for a first test.
SillyTavern is a front end. It runs on your own machine (or your own server), builds the prompt from the character card, your persona and the chat history, and sends it to whatever API you connect. It has two connection families:
- Chat Completion sends a list of messages with roles, the same format as the OpenAI chat completions endpoint. Every hosted uncensored API in this directory uses this format.
- Text Completion sends one long text prompt. It is mainly for local backends such as KoboldCpp, llama.cpp or TabbyAPI, where you control the instruct template and samplers yourself.
For a hosted provider, use Chat Completion. The provider’s server applies the model’s chat template, so you don’t have to pick an instruct format. If you want background on how the request is built, the OpenAI-compatible uncensored API guide covers the request format in code.
Get a funded account first. All the text APIs here are prepaid, and SillyTavern’s connection test sends a real message, which costs a few tokens. The guide to free and cheap uncensored APIs lists the minimum deposits.
Which uncensored APIs work with SillyTavern?
All 5 uncensored text APIs in the directory use the chat completions format SillyTavern speaks, but they don’t all connect the same way. Refuseless, Unaligned, UncensoredLLM and NanoGPT are OpenAI-compatible and fit the Custom source directly. Uncensored.com reads the key from a different header and needs one extra setting.
| Provider | How to connect in SillyTavern | Base URL | Example model |
|---|---|---|---|
| Refuseless | Custom (OpenAI-compatible) | https://api.refuseless.com/v1 | DeepSeek V4.1 Flash 1017 Abliterated |
| Unaligned | Custom (OpenAI-compatible) | In the provider’s quickstart | GLM-5.3 Flash Uncensored |
| Uncensored.com | Custom, with the key sent as an extra header | https://api.uncensored.com/api/v1 | GLM-5.3 Flash Cyber Uncensored |
| UncensoredLLM | Custom (OpenAI-compatible) | https://api.uncensoredllm.ai/v1 | GLM-5.3 Flash Uncensored |
| NanoGPT | Built-in NanoGPT source, or Custom (OpenAI-compatible) | https://api.nano-gpt.com/api/v1 | GLM 5.3 Flash Uncensored |
Base URLs come from each provider’s profile and were last checked on 2026-11-12. UncensoredLLM and NanoGPT name SillyTavern among the clients they support. For the others, the OpenAI-compatible format is what makes them work. SillyTavern’s own documentation says the Custom source connects to any server that follows the generic OpenAI API schema, while warning that it can’t guarantee every endpoint.
NanoGPT appears as its own entry in SillyTavern’s Chat Completion Source list. Picking it means you only paste a key, and SillyTavern’s documentation lists it among the sources that support reasoning output and tool calling. You can still connect it through Custom if you prefer one setup for every provider.
How to connect a custom OpenAI-compatible endpoint
The setup takes about two minutes once you have a key. These steps follow the labels in current SillyTavern releases.
- Open API Connections. Click the plug icon in the top bar.
- Choose the API type. Set API to
Chat Completion. - Choose the source. Set Chat Completion Source to
Custom (OpenAI-compatible). - Enter the base URL. Paste the provider’s API root into Custom Endpoint (Base URL), for example
https://api.uncensoredllm.ai/v1for UncensoredLLM. Don’t add/chat/completions. SillyTavern appends it. - Enter the key. Paste it into Custom API Key and click Connect. SillyTavern sends it as a bearer token and hides it after you connect.
- Pick the model. Choose one from Available Models, or type the ID into Enter a Model ID. The next section explains which to use.
- Send a test. Click Test Message. It sends a short prompt, so it uses a little balance, and confirms the URL, key and model together.
- Save a profile. In the Connection Profiles block of the same panel, click Create and name it after the provider and model.
SillyTavern stores the key in secrets.json inside your user data folder (by default data/default-user/secrets.json), not in your chats or settings file. Keep that folder out of any public backup or Git repository.
Keys in another header. Uncensored.com lists its format as “Chat completions with X-Api-Key header”. In the Custom source, open Additional Parameters and add the key under Include Request Headers as YAML, for example X-Api-Key: your-key, and leave Custom API Key empty. That field is saved with your normal settings, not in secrets.json, so treat the settings file as sensitive. Confirm the header name in Uncensored.com’s quickstart before you rely on it.
How to pick the right model ID
Use the exact ID the API returns, not the display name from a pricing page. If the provider implements the /models endpoint, SillyTavern fills the Available Models dropdown after you connect, and those entries are already valid IDs.
When the dropdown is empty, the provider either doesn’t expose /models or the connection failed. Type the ID into Enter a Model ID instead. Display names and IDs often differ: UncensoredLLM shows “GLM-5.3 Flash Uncensored” on its price list, while its own setup steps use IDs in the form glm-5.3-uncensored. A wrong ID usually returns a 400 or 404 error that mentions the model.
Lists from multi-model providers can be long. NanoGPT says it carries 1,271 models and UncensoredLLM 171, most of them not uncensored. Search the dropdown for “uncensored” or “abliterated”, then check the provider’s model page for price and context length before you commit. The guide to choosing abliterated models explains how to compare them.
Keep one Connection Profile per model you use. Switching profiles swaps the API, model and preset together, which makes side-by-side tests quick.
Context size and response length settings
Two settings in the AI Response Configuration panel (the sliders icon) matter most: Context Size (tokens) and Max Response Length (tokens). Set them to match the model, because SillyTavern doesn’t know the context window of a model on a Custom endpoint.
- Context Size (tokens). The total token budget for prompt plus reply. SillyTavern’s documentation describes the prompt limit as the context size minus the response length. When the chat outgrows it, the oldest messages are left out. A dotted line in the chat shows where the cut falls.
- Unlocked Context Size. A checkbox that raises the slider’s maximum. Don’t set the context above the model’s real window. Depending on the provider, an oversized prompt is rejected or cut without warning.
- Max Response Length (tokens). The cap on each reply. Around 300 to 500 tokens suits most roleplay turns. Longer caps mean slower replies and higher output cost.
- Streaming. Shows the reply as it is generated. If the provider supports streamed chat completions, leave it on. If replies hang or arrive broken, turn it off to check whether streaming is the problem.
Reasoning models need more room. SillyTavern’s docs note that hidden reasoning uses part of the response allowance, so replies can come back cut off or empty. They suggest 1,024 to 4,096 tokens for reasoning models. On the Custom source, the Reasoning Effort setting is only sent when SillyTavern recognizes the model from the official OpenAI list, so for other models the provider’s defaults apply.
To see where your tokens go, open a message’s menu and choose Prompt Itemization. It breaks the last prompt into character card, system prompt, world info and chat history. The NSFW roleplay API guide explains how each part grows over a long chat.
How much does a SillyTavern chat cost per message?
Once a chat is long enough to fill the context budget, almost every message sends close to the full context size as input. That makes the context slider the biggest cost setting you control. The table assumes a full context and a 300-token reply, priced on each provider’s example model:
| Provider and model | 8,192 context | 16,384 context | 32,768 context |
|---|---|---|---|
| UnalignedGLM-5.3 Flash Uncensored · $0.063 / $0.10 | $0.0527 | $0.104 | $0.208 |
| UncensoredLLMGLM-5.3 Flash Uncensored · $0.105 / $0.368 | $0.0942 | $0.180 | $0.353 |
| RefuselessDeepSeek V4.1 Flash 1017 Abliterated · $0.12 / $0.45 | $0.108 | $0.207 | $0.403 |
| NanoGPTGLM 5.3 Flash Uncensored · $0.20 / $0.80 | $0.182 | $0.346 | $0.673 |
| Uncensored.comGLM-5.3 Flash Cyber Uncensored · $0.96 / $1.92 | $0.815 | $1.602 | $3.175 |
At 16,384 tokens of context, 100 messages cost about $0.104 on Unaligned and $1.602 on Uncensored.com. Doubling the context roughly doubles the bill, because input dominates. The example models differ in size and quality, so treat the numbers as a price filter, not a ranking.
Early in a chat you pay much less, since only the card and the few messages so far are sent. Token counts are also approximate. SillyTavern estimates them with its own tokenizer, and the provider bills on the model’s tokenizer, so check the provider’s usage page after a session.
Two settings keep costs down without hurting the chat much: a context size of 8,000 to 16,000 tokens with a summary or World Info for older events, and a stable system prompt and card at the top of the prompt, which helps on providers that offer cached input. The pricing comparison guide covers cached rates.
Common errors and how to fix them
Most failures come from the URL, the model ID or a parameter the provider doesn’t accept. Work through them in this order:
| What you see | Likely cause | Fix |
|---|---|---|
| 404 on every request | /chat/completions added to the base URL, or /v1 missing or doubled | Use the API root exactly as the provider documents it. SillyTavern’s hint is to try adding /v1 and never /chat/completions. |
| 401 Unauthorized | Wrong key, a space pasted with it, or the key in the wrong header | Re-paste the key. For a provider that reads a custom header, use Include Request Headers. |
| Empty Available Models list | No /models endpoint, or the connection failed | Type the ID in Enter a Model ID and send a Test Message. |
| 400 mentioning the model | Display name used instead of the ID | Copy the ID from the provider’s model list. |
| 400 about a parameter | A sampler setting the server doesn’t accept | List it under Exclude Body Parameters in Additional Parameters, for example - frequency_penalty. |
| Error about message roles or order | The model needs strictly alternating roles or one system message | Set Prompt Post-Processing to Semi-strict or Strict. |
| Empty or cut-off replies | A reasoning model used up Max Response Length | Raise Max Response Length to 1,024 or more. |
| Payment or balance error | The prepaid balance ran out | Top up and set a low-balance alert if the provider has one. |
Additional Parameters also takes Include Body Parameters as YAML, which is how you send fields SillyTavern has no slider for, such as top_k: 20 or repetition_penalty: 1.1. Only add fields the provider documents. Some servers ignore unknown fields and some reject the whole request.
If SillyTavern shows a status warning but Test Message works, the endpoint is fine. The Custom source lets you bypass the status check.
Setup checklist
- Fund the account and create an API key.
- Connect with Chat Completion, Custom (OpenAI-compatible), the API root and the key.
- Pick the exact model ID from Available Models or the provider’s list.
- Set Context Size to the model’s window or lower, and Max Response Length to 300 to 500 tokens (1,024 or more for reasoning models).
- Send a Test Message and fix errors with the table above.
- Save a Connection Profile per provider and model.
- Check usage on the provider’s dashboard after the first session and compare it with your estimate.
- Read the provider’s terms. An uncensored model changes what the model refuses, not what the provider allows or the law. Sexual content involving minors, and intimate images or depictions of real people made without consent, are illegal.
Frequently asked questions
How do I add a custom API to SillyTavern?
Open API Connections, set API to Chat Completion and Chat Completion Source to Custom (OpenAI-compatible). Enter the provider’s base URL and API key, click Connect, pick a model ID and send a Test Message.
Can I use an OpenAI compatible LLM API in SillyTavern?
Yes. SillyTavern’s Custom (OpenAI-compatible) source works with any server that follows the OpenAI chat completions format. Refuseless, Unaligned, UncensoredLLM and NanoGPT are OpenAI-compatible according to their directory listings.
What should the base URL be in SillyTavern?
The provider’s API root, usually ending in /v1, without /chat/completions. SillyTavern adds the /chat/completions path itself, so including it causes 404 errors.
What context size should I use for an AI roleplay API in SillyTavern?
Set it no higher than the model’s context window. For most roleplay, 8,000 to 16,000 tokens is enough when older events are kept in a summary or World Info, and a smaller context makes each message cheaper.
Why are my SillyTavern replies empty with a reasoning model?
The model’s hidden reasoning uses up the Max Response Length before the visible reply starts. Raise Max Response Length to between 1,024 and 4,096 tokens, as SillyTavern’s documentation suggests.
Where does SillyTavern store my API key?
In a secrets.json file in your SillyTavern user data folder, by default data/default-user/secrets.json. The key stays on your machine, but your prompts still go to the provider, whose terms and logging policy apply.