EN ▾

Hosted uncensored API for developers

Get API key

SillyTavern AI: Connect an Uncensored API Step by Step

SillyTavern is a chat frontend for language models, and it connects to any OpenAI-compatible API with a base URL, a key and a model ID. This page covers the connection, the settings that matter, and a small script for generating silly character names.

Updated

Isometric tavern table with floating scroll-shaped chat bubbles and a terminal streaming tags

Key points

  1. In SillyTavern, choose Chat Completion, then the custom OpenAI-compatible source, and paste the base URL, key and model ID uncensored.
  2. Keep the context size at or below 100,000 tokens and watch the concurrency limit if you run several chats.
  3. Silly names come from a normal prompt: use JSON mode and a higher temperature.
  4. Roleplay on this API is for fiction between adults. Content involving minors is never allowed.

What this search actually leads to

The phrase sillytavern ai: a silly name generator mixes up two things. SillyTavern is not a name generator. It is a self-hosted web interface for chatting with language models, popular for roleplay, character cards and long-running stories. The name is tongue in cheek; the software is a serious piece of front-end work that talks to many backends.

That said, name generation is a very natural thing to do with it. Characters need names, towns need names, and a model with a good sense of humor will produce silly ones on request. So this article does both: it shows how to connect SillyTavern to an OpenAI-compatible API that runs an uncensored model, and it ends with a short script that produces silly names in bulk.

The backend here is one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not the official API of any large vendor. In SillyTavern it appears as a single model with the ID uncensored. The practical effect is that fiction with dark themes, villains with real menace and morally grey characters do not get interrupted by refusals. One rule stays fixed regardless of settings: no sexual content involving minors.

You need three things: a running SillyTavern install, an API key, and about ten minutes. The key page offers $0.50 of trial credit with one click after sign-up. It needs no card and is valid for 7 days, which is enough to test a few characters.

Connect SillyTavern step by step

Menu labels shift a little between SillyTavern versions, but the flow has been stable for a long time.

  1. Open SillyTavern and click the plug icon to open API Connections.
  2. Set API to Chat Completion.
  3. Set Chat Completion Source to Custom (OpenAI-compatible).
  4. In Custom Endpoint (Base URL) enter https://api.unfilteredaimodels.cc/v1.
  5. Paste your key into Custom API Key.
  6. In Model ID, type uncensored.
  7. Click Connect. A green status light means the request to the API worked.

Do not append /chat/completions to the base URL. SillyTavern adds the path. If the connect button reports an error, test the same values from a terminal to see whether the problem is the key or the frontend:

curl -s https://api.unfilteredaimodels.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello in five words."}]}'

If curl answers and SillyTavern does not, the usual cause is a trailing space in the pasted key or a base URL that is missing /v1. If curl fails as well, look at the troubleshooting guide, which lists the common mistakes in order of frequency.

SillyTavern runs on your machine or server, and it sends requests from there. Your prompts go to the API, and they are not used for training.

Settings that change how a character feels

Connecting is the easy part. The quality of a roleplay depends more on a handful of sliders in the AI Response Configuration panel.

Context size

The context window is 100,000 tokens, shared by the prompt and the reply. You rarely need to fill it. A character card, a persona and the last 30 to 60 messages usually fit in 8,000 to 16,000 tokens. Setting the context slider very high makes every request larger, and since you pay for input tokens on each turn, a long history gets more expensive with every message. A middle value with a summary of older events is cheaper and often reads better.

Max response length

The max_tokens parameter is optional here. Set a cap in SillyTavern anyway, around 300 to 500 tokens, so the model writes a scene beat instead of a chapter. If a reply gets cut off mid-sentence, raise the cap by a hundred or two.

Temperature and penalties

Start with temperature 0.8 to 1.0. Lower values keep a character consistent; higher ones make dialogue livelier but more erratic. Temperature, top_p, stop, seed and the frequency and presence penalties are passed through to the model. If the character repeats a phrase every turn, raise the frequency penalty by 0.1 at a time rather than jumping to a large value.

Streaming

Turn on streaming. Text appears as it is generated, over server-sent events, and the final chunk includes token usage. Remember that a streamed request holds its concurrency slot until the stream ends.

Character cards, personas and the system prompt

SillyTavern assembles a prompt from the character card, your persona, the world info entries you enable, and the chat history. All of that arrives at the API as ordinary chat messages. The model sees system, user and assistant roles like any other OpenAI-style client sends.

A few habits help with an uncensored model in particular:

  • State the genre and tone in the card. The model does not refuse, but it follows the cues you give. "Gritty fantasy, third person, past tense, no meta commentary" works better than leaving it open.
  • Write who the characters are, not what they must never do. Long lists of prohibitions waste tokens and sometimes nudge the model toward the very thing you listed.
  • Keep ages explicit and adult. Characters in your stories must be adults. The hard limit on minors is enforced and is not something a prompt can change.
  • Use world info sparingly. Entries that trigger on keywords add tokens only when they match, so they cost less than a huge permanent card.

Treat the card as the part of the prompt you resend on every turn. A 1,500-token card sent across 200 turns is 300,000 input tokens, which at $0.15 per 1M is $0.045. That is small, but it is the reason to trim a card that has grown to 6,000 tokens of backstory.

Generate silly names with a script

Now the part the search suggested. A silly name generator is a prompt with a high temperature and a structured answer. JSON mode keeps the output easy to parse, so you can paste the results into character cards or a spreadsheet.

import json, os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.unfilteredaimodels.cc/v1",
    api_key=os.environ["UF_KEY"],
)

resp = client.chat.completions.create(
    model="uncensored",
    temperature=1.2,
    top_p=0.95,
    response_format={"type": "json_object"},
    messages=[
        {"role": "system",
         "content": "You invent silly fantasy character names. "
                    "Reply as JSON: {\"names\": [{\"name\": str, \"title\": str}]}."},
        {"role": "user",
         "content": "Give me 12 names for tavern regulars in a cheerful fantasy village. "
                    "Each should sound ridiculous but pronounceable, with a short comic title."},
    ],
)

for item in json.loads(resp.choices[0].message.content)["names"]:
    print(item["name"], "-", item["title"])

Run it a few times. With temperature near 1.2 each call gives a different batch. If you want a repeatable list, lower the temperature to 0.7 and pass a fixed seed. For a theme, change the user message: "river pirates", "bureaucrat goblins" or "a family of dramatic ghosts" all work.

The cost is negligible. A request with about 150 input tokens and 400 output tokens costs 150 / 1,000,000 x $0.15 = $0.0000225 for input plus 400 / 1,000,000 x $0.50 = $0.0002 for output, so $0.0002225 in total. Even a thousand batches would come to about $0.22.

Limits, cost and fixing errors

A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 concurrent and 60 per minute. SillyTavern normally sends one request at a time, so you will see limits only if you run several browser tabs, group chats that trigger multiple characters, or a name script in a loop at the same time as a chat.

When a limit is hit the API answers HTTP 429. The error code is rate_limited for too many requests per minute and concurrency for too many at once. A temporary overload also gives 429 with a Retry-After: 5 header. In practice: wait five seconds and press regenerate, or reduce the parallel work.

Typical roleplay costs are low. Take an average turn with a 4,000-token prompt and a 350-token reply: 4,000 / 1,000,000 x $0.15 = $0.0006 for input and 350 / 1,000,000 x $0.50 = $0.000175 for output, which makes $0.000775 per turn. A thousand turns cost $0.775.

Credit is prepaid, never expires, and failed or refused requests are not charged. Top-ups start at $20, with a bonus of 5% from $50, 10% from $100 and 15% from $200. Cards and crypto are both accepted; see pricing for the amounts and the docs for every parameter. The response header X-Balance-USD shows what is left.

Questions and answers

Is SillyTavern a silly name generator?

No. It is a chat interface for language models. Name generation is one thing you can ask a connected model to do, either inside a chat or with a small script.

Which SillyTavern source should I pick?

Use Chat Completion with the Custom (OpenAI-compatible) source. Enter the base URL ending in /v1, your key, and the model ID uncensored.

Why does the connection fail even though my key is correct?

Check that the base URL ends in /v1 without /chat/completions and that the key has no trailing space. Then test the same values with curl to separate a frontend problem from an account problem.

Can I write dark fiction with it?

Yes, for lawful adult use: villains, violence in a story and morally grey characters are fine. Sexual content involving minors is never allowed.

How much does a long roleplay cost?

At $0.15 per 1M input tokens and $0.50 per 1M output tokens, a turn with a 4,000-token prompt and a 350-token reply costs about $0.000775.

Your key is one form away

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