Checked 2026-11-02

SillyTavern LLM settings for an OpenAI-compatible API

Connect SillyTavern to RelaySwitch as a Custom (OpenAI-compatible) Chat Completion source, then set the four samplers that reach the model, a Context Size that fits it, and reasoning.

Most SillyTavern LLM settings guides assume a local backend, where every sampler on the panel goes to the model. A hosted OpenAI-compatible API works differently. SillyTavern sends a short list of standard parameters, hides the rest, and leaves Context Size for you to set by hand.

This guide connects SillyTavern to https://api.relayswitch.io/v1, shows exactly which settings travel with each message, and sets Context Size per model from the live catalog. Every message bills per token from a prepaid balance, so the last sections price a message on each model in the table.

Looking for a SillyTavern proxy? For a model backend, that is the Custom (OpenAI-compatible) source below: a URL and a key that answer in the OpenAI format, or the Claude source's Proxy Server URL for the Anthropic format. It is not requestProxy in config.yaml, which sends SillyTavern's own outgoing traffic through a network proxy, and not the Reverse proxying page in the admin docs, which puts Traefik in front of SillyTavern for remote access.

01What you need

  • SillyTavern installed and running. The steps follow the release branch.
  • A RelaySwitch key from the console (email code sign-in). Keys start with sk-relay-.
  • A balance. Top-ups start at $10, by card or crypto, with no subscription. Before the first top-up the console chat runs 12 free turns a day, so you can try a model before connecting it here.

02Connect the Custom source

  1. Open API Connections (the plug icon in the top bar).
  2. Set API to Chat Completion.
  3. Set Chat Completion Source to Custom (OpenAI-compatible).
  4. Custom Endpoint (Base URL): https://api.relayswitch.io/v1. Keep the /v1. SillyTavern adds the rest; its docs put it plainly: "Do NOT add the /chat/completions suffix."
  5. Custom API Key: your key. SillyTavern hides it after you connect.
  6. Click Connect. The Available Models dropdown fills from /v1/models. Pick a model there, or type its id in Enter a Model ID.
  7. Click Test Message. It sends one short request, which bills like any other.
text
1API: Chat Completion
2Chat Completion Source: Custom (OpenAI-compatible)
3Custom Endpoint (Base URL): https://api.relayswitch.io/v1
4Custom API Key: sk-relay-...
5Enter a Model ID: claude-sonnet-5-5

Use the id the Models page prints, such as claude-sonnet-5-5, not the display name.

03The Anthropic format: Claude source with a reverse proxy

SillyTavern can also send the Anthropic Messages format, through its Claude source. The reverse proxy block sits in the same connection panel; SillyTavern's docs do not cover it, so the labels here are from the UI.

  1. Set Chat Completion Source to Claude.
  2. Proxy Server URL: https://api.relayswitch.io/v1. SillyTavern adds /messages.
  3. Proxy Password: your sk-relay- key. The field's note says it is used as the password for the proxy instead of an API key, and the Claude API key field above it is ignored once a proxy is set.
  4. Pick the model in Claude Model, then click Connect.
text
1API: Chat Completion
2Chat Completion Source: Claude
3Proxy Server URL: https://api.relayswitch.io/v1
4Proxy Password: sk-relay-...
5Claude Model: claude-sonnet-4-6

Claude Model is a fixed dropdown. These 9 of its ids answer the Anthropic format in the catalog today:

ModelIdInputOutputPer message
Claude Fable 5claude-fable-5$3.00$15.00$0.0135
Claude Haiku 4.5claude-haiku-4-5$0.60$3.00$0.0027
Claude Haiku 4.5claude-haiku-4-5-20251001$0.60$3.00$0.0027
Claude Opus 4.6claude-opus-4-6$1.80$7.50$0.0077
Claude Opus 4.7claude-opus-4-7$1.80$7.50$0.0077
Claude Opus 4.8claude-opus-4-8$1.80$7.50$0.0077
Claude Opus 5claude-opus-5$1.80$7.50$0.0077
Claude Sonnet 4.6claude-sonnet-4-6$1.80$9.00$0.0081
Claude Sonnet 5claude-sonnet-5$1.20$3.00$0.0045

USD per million tokens, read from the RelaySwitch catalog when this page was built. Per message: 3,000 tokens in, 300 out.

The dropdown has no entry for claude-fable-5.1, claude-haiku-5-5, claude-opus-5-5, claude-sonnet-5-5. Reach those through the Custom source, where any id can be typed.

04Prompt Post-Processing

Prompt Post-Processing, in the connection panel under the Custom source, reshapes the message list before it leaves SillyTavern. The options, as the panel lists them:

  • None
  • Merge consecutive roles (with tools)
  • Semi-strict (alternating roles; with tools)
  • Strict (user first, alternating roles; with tools)
  • Merge consecutive roles (no tools)
  • Semi-strict (alternating roles; no tools)
  • Strict (user first, alternating roles; no tools)
  • Single user message (no tools)

Leave it on None unless a model complains. The merge options join back-to-back messages from the same role; Semi-strict also keeps user and assistant turns alternating. Pick Strict when a model answers a 400 about roles or message order: a character chat opens on the card's greeting, an assistant message, and Strict puts a user message first. The "no tools" variants drop function calling; keep a "with tools" one if you use tool calls.

05SillyTavern LLM settings that reach the model

With a Custom source, the AI Response Configuration panel shows Temperature, Frequency Penalty, Presence Penalty, Top P, Seed and Max Response Length (tokens). Those are the standard Chat Completions parameters. SillyTavern's server builds this body for every message:

json
1{
2 "model": "claude-sonnet-5-5",
3 "messages": [ ... ],
4 "temperature": 1,
5 "top_p": 1,
6 "frequency_penalty": 0,
7 "presence_penalty": 0,
8 "max_tokens": 300,
9 "stream": true
10}

Custom stopping strings add a stop list, a Seed of 0 or more adds seed, and Multiple swipes per generation adds n. The API forwards all of these to the model unchanged. A model that refuses one answers with a 400 error.

Top K, Min P, Top A, Repetition Penalty, DRY, XTC, Mirostat and the other Text Completion samplers do not appear for a Custom source, and SillyTavern does not send them. Settings you made for a local backend have no effect here. To send one anyway, open Additional Parameters in the connection panel and add it under Include Body Parameters as YAML:

yaml
1min_p: 0.05
2repetition_penalty: 1.05
3reasoning_effort: high

The API passes extra fields through as well. Whether a model applies min_p or repetition_penalty depends on the model; the four standard samplers are the ones to tune first. To stop SillyTavern sending a field a model rejects, list it under Exclude Body Parameters:

yaml
1- frequency_penalty
2- presence_penalty

Starting points for long-form fiction: Temperature 0.8 to 1.0, Top P 0.95, Frequency Penalty 0.1 to 0.3 against repeated phrases, Presence Penalty 0 to 0.3 to push new topics. Change one at a time and swipe a few replies before judging.

06Context Size per model

Context Size (tokens) is the most SillyTavern sends as the prompt: card, system prompt and chat history, minus the response length. A fresh install starts Chat Completion at 4,095 tokens of context and 300 response tokens. On a hosted model with a far larger window, that drops older messages long before the model needs it to.

SillyTavern does not read a context window from a Custom source. The slider goes past any model's limit, so set it from the Context column in the table below. Set it too high and a long chat fails once the prompt passes the model's window; Euryale 70B v2.3 stops at 20K tokens.

Context Size is also the cost dial. Once a chat fills it, every message sends that many input tokens, so a 32K setting costs several times more per message than a short chat on the same model. The costed example below prices both.

07Reasoning

Request model reasoning in the AI Response Configuration panel shows a model's reasoning as a collapsible block above the reply when the model returns it in a separate field. For a model that writes its reasoning inline between <think> tags, turn on Auto-Parse under Advanced Formatting > Reasoning instead.

Reasoning Effort on a Custom source is sent only for model ids SillyTavern knows from OpenAI, such as gpt-5.5. For any other model, put reasoning_effort: high (or low, medium) under Include Body Parameters. The API passes it to the model, and models with an effort setting use it.

Reasoning tokens are output tokens. They count against Max Response Length and bill at the output rate, even when the block stays collapsed. If replies come back empty or cut off, raise Max Response Length; SillyTavern's docs suggest 1024 to 4096 for reasoning models.

08Which models to pick

Four general models and 2 the catalog tags for fiction and character dialogue (Gemma 4 31B Fabled, Euryale 70B v2.3). Prices are per million tokens. The message columns assume 3,000 tokens in (card plus recent history) and 300 out, the default response length.

ModelContextInputOutputPer message100 messages
Claude Sonnet 5.51M tokens$1.20$3.00$0.0045$0.45
GPT-5.51.1M tokens$1.80$9.00$0.0081$0.81
DeepSeek V4 Pro 04231M tokens$0.792$2.376$0.0031$0.3089
GLM 5.31M tokens$0.3276$1.0296$0.0013$0.1292
Gemma 4 31B Fabled262K tokens$0.35$1.575$0.0015$0.1523
Euryale 70B v2.320K tokens$1.972$1.972$0.0065$0.6508

USD, read from the RelaySwitch catalog when this page was built. Context is the developer's stated window; set Context Size at or under it.

The general models carry the largest context windows. The fiction-tuned builds are trained on stories and dialogue and have smaller windows, so check the Context column before you raise Context Size. The roleplay chat runs character cards in the browser on the same key, and the character card guide explains what each card field costs in tokens.

09What a chat costs

Early in a chat on Claude Sonnet 5.5, a message sends about 3,000 tokens and gets 300 back: $0.0045 each, or $0.45 for 100 messages.

Later, with Context Size at 32K and the history filling it, each message sends 32,000 tokens: $0.0393 each, or $3.93 for 100. The same 100 full-context messages on GLM 5.3 come to $1.08.

Swipes, Continue and Test Message are requests too, each billed the same way. When the model reports cached input tokens, they bill at its cached rate, which lowers the cost of a long chat that resends the same history. The console's Usage page lists every request with its tokens and charge. The pricing page has the full billing rules.

10Errors and fixes

List the models your key can call, from the machine that runs SillyTavern:

bash
1curl https://api.relayswitch.io/v1/models -H "Authorization: Bearer sk-relay-..."
  • 401: the key is wrong or revoked. Paste it again in Custom API Key and click Connect.
  • 402: the balance is too low. Top up in the console; the next message goes through.
  • 404: the model id is not in the catalog. Pick it from Available Models instead of typing it.
  • 429: the key hit its rate limit. Wait a few seconds before the next swipe.
  • A 400 naming a parameter: the model refuses that field. Add it to Exclude Body Parameters, or remove it from Include Body Parameters.
  • A 400 about roles or message order: some models want alternating user and assistant turns. Set Prompt Post-Processing in the connection panel to Semi-strict, or Strict if the first message must be the user's.
  • Connection fails or the model list stays empty: the URL is missing /v1 or ends in /chat/completions. Use https://api.relayswitch.io/v1 exactly.
  • Empty or cut-off replies: a reasoning model used up Max Response Length before it wrote the reply. Raise it.
  • Old messages forgotten: Context Size is still at 4,095. Raise it toward the model's window.

The API docs list every error code.

11Sources

Menu paths and field names are from SillyTavern's docs, read 2026-10-27: Chat Completions, Custom OpenAI-compatible endpoint, Common Settings and Reasoning. The request body, the default context and response sizes, and which samplers show for a Custom source are from SillyTavern's source on the release branch, read the same day. The Claude source's reverse proxy block, its Claude Model dropdown and the Prompt Post-Processing options are from SillyTavern's UI on the release branch, read 2026-11-02. For a chat client with a model allowlist and per-user keys, see the Open WebUI guide.

Questions

What are the best SillyTavern LLM settings?
On a hosted OpenAI-compatible API, start with Temperature 0.8 to 1.0, Top P 0.95, Frequency Penalty 0.1 to 0.3 and Presence Penalty 0 to 0.3, and set Context Size to the model's window from the Models page. Those four samplers are the ones a Custom source sends; tune them before anything else.
What does presence_penalty do in SillyTavern?
presence_penalty lowers the chance of any token that already appeared in the context, once, however often it appeared. It nudges the model toward new words and topics. frequency_penalty scales with how often a token appeared, so it targets repeated phrases. Both go to the model on a Custom source; 0 turns them off.
Do DRY settings work with an OpenAI-compatible API?
Not from the panel. DRY, XTC, Min P and Top K are Text Completion samplers, and SillyTavern does not send them for a Custom Chat Completion source. You can add a field under Additional Parameters > Include Body Parameters; the API forwards it, and whether the model applies it depends on the model.
What temperature should I use for roleplay?
Between 0.7 and 1.0 for most hosted models. Lower keeps a character consistent; higher gives more varied replies and more drift. If replies start to wander off the scene, lower temperature or Top P before adding penalties.
How much does a SillyTavern message cost?
It depends on the model and on how much history goes with each message. With 3,000 tokens in and 300 out, a message on Claude Sonnet 5.5 costs $0.0045 today and on GLM 5.3 $0.0013. A larger Context Size raises the input side once the chat fills it.
What is a SillyTavern proxy?
Usually a model backend: a URL and a key that answer in the OpenAI or Anthropic format. In SillyTavern that is the Custom (OpenAI-compatible) source, or the Claude source with a Proxy Server URL. The config.yaml requestProxy setting is something else, a network proxy for SillyTavern's own traffic, and so is the reverse proxy you put in front of SillyTavern for remote access.
Is there a free SillyTavern proxy?
Not here. RelaySwitch is prepaid from $10 by card or crypto, billed per token. Before the first top-up the console chat gives 12 free turns a day to try models, in the browser, not through SillyTavern.
Does SillyTavern need the /v1 at the end?
Yes. Use https://api.relayswitch.io/v1 as the Custom Endpoint (Base URL) or Proxy Server URL. SillyTavern adds /chat/completions (or /messages on the Claude source) after it, and a URL without /v1 or with the suffix already on it fails to connect.
Can I use the Claude source with a custom URL?
Yes. Set Chat Completion Source to Claude, put https://api.relayswitch.io/v1 in Proxy Server URL and your sk-relay- key in Proxy Password. The model comes from the Claude Model dropdown, which lists fixed ids; for a Claude id it does not list, use the Custom source and type the id.

Every model in one SillyTavern connection

Prepaid from $10 by card or crypto. No KYC, no subscription.