EN ▾

HomeGuide

SillyTavern with an OpenAI-Compatible Uncensored API

If you searched for claude code proxy sillytavern, here is the short version: SillyTavern does not need Claude Code or a proxy to use this API. It has a built-in custom OpenAI-compatible connection.

A glowing stage with chat bubbles and masks linked by a cable to a server, representing a roleplay front end and an API

Key points

  1. Use Chat Completion, then the Custom (OpenAI-compatible) source
  2. Endpoint: https://api.claudecodeproxyapi.com/v1, model: uncensored
  3. Set context size up to 100,000 tokens and turn on streaming
  4. A 200-message chat at 8,000 tokens in and 400 out per message costs about $0.28

Do you need a proxy for SillyTavern?

The words "Claude Code", "proxy" and "SillyTavern" often get mixed up in searches, so here is what each one is. Claude Code is Anthropic's coding CLI and has nothing to do with SillyTavern. SillyTavern is a self-hosted chat front end for roleplay and character chats. In its older OpenAI settings it calls a custom endpoint a "reverse proxy", which is where the word "proxy" comes from.

You do not need to run any extra server. SillyTavern can talk to any OpenAI-compatible endpoint directly, and https://api.claudecodeproxyapi.com/v1 is one. The model ID is uncensored. This is an open-weight model run by an independent provider, tuned to answer without content refusals for lawful adult use. It is not Claude and not an official API of Anthropic or any other vendor. The one hard rule is that sexual content involving minors is never allowed.

Connect in five steps

  1. Get a key on the API key page. After sign-up you can claim $0.50 of trial credit with one click, valid for 7 days, no card.
  2. In SillyTavern, open the plug icon (API Connections) and set API to Chat Completion.
  3. Set Chat Completion Source to Custom (OpenAI-compatible).
  4. In Custom Endpoint (Base URL), enter https://api.claudecodeproxyapi.com/v1. Do not add /chat/completions.
  5. Paste your key into Custom API Key, type uncensored as the model ID, then press Connect.

A green status light and the model name appearing mean it worked. Menu labels shift slightly between SillyTavern releases, so if a field is named differently on your version, look for the same idea: a source that accepts a custom OpenAI-style URL.

Test the key outside SillyTavern first

If Connect fails, take SillyTavern out of the equation. This request should return a model list that includes uncensored:

curl https://api.claudecodeproxyapi.com/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

And this one tests an actual reply, the way a character chat sends it:

curl https://api.claudecodeproxyapi.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [
      {"role": "system", "content": "You are Captain Rook, a gruff airship pilot."},
      {"role": "user", "content": "We lost the left engine. Orders?"}
    ],
    "temperature": 0.9,
    "stream": true
  }'

If both work in the terminal and fail in SillyTavern, the cause is a typo in the URL field or a leftover setting. If they fail in the terminal too, check the key.

Settings worth changing

Context size

The API has a 100,000-token window, prompt and completion together. SillyTavern's context slider is what trims your history, so raise it as far as your chats need. Bigger context means richer memory but also more input tokens per message, which is where the cost comes from.

Response length

Set a max response length that suits your style. The API treats max_tokens as optional, but a cap stops a reply from running on and keeps cost predictable.

Streaming

Turn on streaming so replies appear word by word. Streams use SSE and report usage at the end. A stream holds one concurrency slot until it finishes, which matters if you run several chats at once: a full key allows 8 concurrent requests and 300 requests per minute, and the trial key allows 2 and 60.

Sampling

Temperature, top_p, stop sequences, seed and the penalties are passed through. For lively dialogue, start near temperature 0.9. If a character repeats phrases, add a small frequency penalty before changing anything else.

Prompt post-processing

If the connection works but replies ignore your character card, look at the prompt post-processing option for the Custom source and try a different mode. Some modes merge or reorder system messages, which can change how the card is read.

Tool calling and extensions

The API supports tool calling: tools, tool_choice, streamed tool_calls and results sent back as role: "tool". Whether you can use it from SillyTavern depends on the version and the extensions you install, since function calling in front ends is optional and handled by specific features. If you build your own character tools or an extension, the request shape is the standard OpenAI one, and the docs show examples. For plain character chat, you do not need tools at all.

JSON mode is also available through response_format: {"type":"json_object"}. It helps for extensions that ask the model for structured data, such as a state tracker for inventory or relationships.

What a chat costs

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, and failed or refused requests are not charged. Suppose each message sends 8,000 tokens of card, lorebook and history and gets a 400-token reply:

  • Input: 8,000 / 1,000,000 x $0.15 = $0.0012
  • Output: 400 / 1,000,000 x $0.50 = $0.0002
  • Per message: $0.0014
  • A 200-message chat: 200 x $0.0014 = $0.28

So the $0.50 trial credit covers a long first chat. Top-ups start at $20, with bonuses of +5% from $50, +10% from $100 and +15% from $200, and unused credit never expires. On this site payment is by crypto (USDT on TRC20, USDC on Base). Details live on the pricing page. If you want to wire the same endpoint into a coding CLI instead, the proxy troubleshooting guide explains why a translating proxy is needed there and not here.

Keep character cards cheap

Input tokens are most of the bill, and the card is resent with every message. A few habits cut the cost without hurting the character:

  • Write the card as short statements of voice, goals and boundaries instead of long backstory prose.
  • Keep lorebook entries keyed to specific words so only relevant ones get inserted.
  • Summarise old scenes into a few lines every so often, then trim the raw log.
  • Check the token counter in the prompt view and cut anything the model never uses.

Halving the average input from 8,000 to 4,000 tokens per message drops the input part of a message from $0.0012 to $0.0006, which is a saving of $0.0006 per message and $0.12 over 200 messages.

Common problems

ProblemCheck
Connect shows an errorThe URL must end in /v1 and not contain /chat/completions; test with the curl calls above
Reply cuts off mid-sentenceRaise the response length setting; the API itself caps nothing below the context window
Replies are repetitiveAdd a small frequency or presence penalty and lift temperature a little
Chat stops after many messagesYou may have hit the 100,000-token window; lower the context slider or summarise
429 when running two chatsThe trial key allows 2 concurrent requests; stop a stream or top up for a full key

When you contact support, send the X-Request-Id header from the failing response. The key page is also where you check that the key you pasted is the current one.

Questions and answers

Do I need Claude Code to use SillyTavern with this API?

No. SillyTavern connects to the API directly through its Custom (OpenAI-compatible) source. Claude Code is a separate coding tool.

What URL goes in SillyTavern?

Enter https://api.claudecodeproxyapi.com/v1 as the custom endpoint, without /chat/completions. Use uncensored as the model ID.

Why do I get a 429 error in a long session?

Either you sent too many requests per minute, or too many at once. Streamed replies hold a concurrency slot until they end, and a 429 with Retry-After: 5 means temporary overload, so wait five seconds.

Is this model Claude?

No. It is an open-weight model from an independent provider, hosted behind an OpenAI-compatible API.

Is any content allowed?

The model is tuned to answer without content refusals for lawful adult use. Sexual content involving minors is never allowed.

Your key is one form away

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