EN ▾

Connect SillyTavern to an Uncensored OpenAI-Style API

Developers often assume OpenRouter provides true uncensored access, but its default models still apply strict safety filters to NSFW content. This article clarifies the reality of 'uncensored' models versus filtered defaults, helping you choose the right API for adult content generation without hidden refusals.

Isometric illustration of a terminal linked by a glowing cable to chat bubbles and a tavern door

The short version: five fields

If you searched for sillytavern ai: a fun and friendly chatbot, you probably want a roleplay front end that talks to a model that does not refuse mid-scene. SillyTavern handles the interface. You only have to point it at an OpenAI-compatible endpoint. The steps below match recent versions; labels shift a little between releases.

  1. Open the API Connections tab (the plug icon in the top bar).
  2. Set API to Chat Completion.
  3. Set Chat Completion Source to Custom (OpenAI-compatible).
  4. Paste https://api.unrestrictedaichatbot.cc/v1 into the custom endpoint (base URL) field. Stop at /v1. Do not add /chat/completions.
  5. Paste your API key, type uncensored as the model ID, and press Connect.

A green status light and the model name under the button mean the connection works. If you do not have a key yet, the next section covers it.

Get a key and some credit

Sign up with Google, or with an email and password, then open the API key page. New users can claim $0.50 of trial credit there with one click. It is one per person, valid for 7 days, and needs no payment. The trial key allows 2 concurrent requests and 60 requests per minute, which is plenty for a single chat.

When the trial runs out, top up with any whole amount from $20 to $500, paid in crypto (USDT on TRC20 or USDC on Base). Larger top-ups carry a bonus: +5% from $50, +10% from $100, +15% from $200. The pricing page has the details. Credit never expires and nothing renews on its own, so a quiet month costs nothing.

Test the endpoint before you open SillyTavern

When a connection fails, you want to know whether the key is wrong or the app is misconfigured. Send one request from a terminal first. If it works there, any remaining problem is inside SillyTavern.

curl https://api.unrestrictedaichatbot.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Introduce yourself as a ship captain in two sentences."}],
    "max_tokens": 120
  }'

The same check in Python with the official OpenAI SDK:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.unrestrictedaichatbot.cc/v1",
    api_key="YOUR_API_KEY",
)

reply = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Say hello in character as a ship captain."}],
)
print(reply.choices[0].message.content)

You can also call GET /v1/models to confirm the key is accepted. The model ID to use in every client is uncensored.

Settings that matter for roleplay

Context size

The model accepts up to 100,000 tokens per request, prompt and completion together. That does not mean you should send that much. SillyTavern resends the character definition, the persona, world info and recent history with every message, and you pay input price for all of it each time. A context size of 16,000 to 32,000 tokens holds many pages of story and keeps replies cheap. Raise it only when a scene really needs older detail.

Response length

Set Max Response Length to somewhere between 200 and 400 tokens for chat-style roleplay. The parameter is optional on the API side, but a cap stops one runaway answer from eating a large chunk of output budget at $0.50 per 1M tokens.

Sampling

Temperature, top_p, stop sequences, seed and the penalties are passed through to the model. A temperature around 0.8 to 1.0 suits character voice. If a character repeats the same phrases, raise the frequency or presence penalty slightly before touching anything else. Add a stop string such as your persona name followed by a colon, so the model never writes your lines for you.

Streaming

Leave Streaming on. The API sends tokens over SSE, so text appears as it is generated and long replies feel faster.

Character setup that saves tokens

Once the connection works, the biggest lever on quality and cost is the character definition itself. SillyTavern sends it with every message, so each extra paragraph is billed again on every turn.

  • Description: keep it to what changes behavior. Appearance details that never come up in dialogue are dead weight.
  • First message: write it in the voice and length you want back. The model copies its own opening more than it copies your instructions.
  • Example dialogue: two short exchanges are enough. Long examples teach the model to write long replies.
  • World info entries: use keywords so an entry is injected only when its topic appears. A lorebook that is always on behaves like a very long description.

Group chats multiply the work, because each character gets its own request. On a trial key, which allows 2 concurrent requests, set group replies to run one after another rather than all at once. A full key allows 8 at a time, which is comfortable for most groups.

Swipes deserve a mention too. Each swipe is a fresh request with the same prompt, so ten swipes on one message cost ten times the input. At roughly $0.001 a reply that is still small, but it adds up if you swipe by habit.

What a long chat costs

Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens. Take a normal roleplay turn: 5,500 tokens of prompt (definition, persona and history) and a 250-token reply.

  • Input: 5,500 × $0.15 / 1,000,000 = $0.000825
  • Output: 250 × $0.50 / 1,000,000 = $0.000125
  • Per reply: $0.00095

A thousand replies come to $0.95. The $0.50 trial therefore covers roughly 526 replies, and a $20 top-up covers around 21,000. Compare that with a maxed-out prompt: 50,000 tokens of input costs $0.0075 per reply before output, about eight times more. Context size is the setting that moves your bill, not the reply length.

Failed or refused requests are not charged, and each response carries an X-Balance-USD header if you want to track your balance from a script.

Fixing common connection problems

SymptomLikely causeFix
Authentication errorKey pasted with a space, or an old keyCopy it again from the key page and reconnect
Not foundEndpoint ends in /chat/completions, or /v1 is missingUse exactly the base URL shown above
Model not foundModel ID typed differentlyEnter uncensored, lowercase, nothing else
Rate limit errorTrial key: more than 2 requests at once or 60 per minuteWait a moment, avoid rapid swipes, or top up for a full key (8 concurrent, 300 per minute)
Reply cuts off mid-sentenceMax Response Length too lowRaise it to 300 or more

If the curl test above succeeds and SillyTavern still fails, check the browser console or the SillyTavern terminal window. The error text there usually names the field that is wrong. The quickstart docs list every supported parameter.

Ground rules and switching later

The model is tuned to answer without content refusals for lawful adult use, and your prompts are not used for training. One line is fixed: no sexual content involving minors, and requests like that are not something a character definition can change. If you are curious how this compares with routing through a marketplace, the article on OpenRouter NSFW myths and facts covers that angle.

Nothing in the setup is locked in. SillyTavern stores connection profiles, so you can keep this endpoint beside others and switch with one click. When you top up or claim a new key, paste it into the same field and reconnect. The model ID stays uncensored, and your characters and chats are untouched because they live in SillyTavern, not on the API side.

Questions and answers

Does SillyTavern work with any OpenAI-compatible API?

Yes. The Custom (OpenAI-compatible) source accepts a base URL, a key and a model ID, which is all this API needs.

What model ID do I type in SillyTavern?

Type uncensored. The model list from GET /v1/models shows the same ID.

Is there a free way to try it?

New users can claim $0.50 of trial credit with one click on the API key page after sign-up. It lasts 7 days, and it is not unlimited free access.

Why does SillyTavern show a smaller context than 100,000 tokens?

The context size is a setting you choose. A lower value keeps each prompt, and therefore each reply, cheaper.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key