Apps and SDKs
SillyTavern
In short: SillyTavern is a local character-chat interface that works with the gateway through a Custom (OpenAI-compatible) chat completion source.
On this page
SillyTavern is a locally run interface for character chat and role-play, installed with Node.js or Docker and opened in your browser. It connects to the gateway as a custom OpenAI-compatible chat completion source, and one connection gives you every model your key can use. Checked against SillyTavern 1.19.0 (September 2026).
You need an API key from API keys and this base URL:
Base URLhttps://api.oneaiapikey.com/v1
How do I connect SillyTavern to the gateway?
Six steps connect SillyTavern to the gateway.
- Open API Connections (the plug icon in the top bar).
- Set API to Chat Completion, and Chat Completion Source to Custom (OpenAI-compatible).
- Set Custom Endpoint (Base URL) to the base URL above, including
/v1. Do not add/chat/completions. - Paste your key into Custom API Key.
- Click Connect. SillyTavern reads
GET /v1/modelsand fills the model dropdown with the models your key can use. Pick one, for examplez-ai-glm-5.3-flash:free, or type an id into the text field. - Click Test Message to send a short prompt, then chat. The request shows up on your usage page.
Save the setup as a connection profile if you switch between sources; SillyTavern then restores the URL, model and settings in one click.
What is prompt post-processing?
Prompt post-processing is a SillyTavern setting for models that reject prompts with more than one system message or with two messages in a row from the same role. The Prompt Post-Processing setting fixes the prompt before it is sent. Start with None. If a model answers with a 400 about message order or roles, try Merge consecutive messages from the same role, then Semi-strict. The merge and strict modes also drop tool calls from the prompt unless you pick their “with tools” variant.
How do I keep costs down in SillyTavern?
Keep the context small, cap the response length and use a cheap model for everyday chat. Every message re-sends the character card, the world info and the chat history, so long chats get more expensive with each reply. You pay for input tokens on every one of those requests.
- Set the context size to what the story actually needs rather than the model’s maximum. A smaller context sends less history and costs less per reply.
- Set max response length to a sensible number of tokens; output tokens cost several times more than input.
- Use a fast, low-cost model for everyday chat and switch to a larger one for important scenes.
- Swipes and regenerations are new requests and are billed like any other reply.
- Give SillyTavern its own key with a spend limit (see Cost control).
How do I fix common SillyTavern errors?
Most SillyTavern errors come from the URL, the key or the context size.
- Connect fails or returns 404: the URL must end in
/v1with nothing after it. - The model dropdown is empty: the key is not valid, or it has a model list that limits what it can see. Type the id into the text field to test a single model. Paid models are listed before a top-up, but return
402with codepaid_needs_deposituntil you add $1 or more. - 401: the key was pasted with extra spaces, or it was disabled or revoked. See Errors.
- 403: the key’s model list does not include this model, or the balance is empty. See Errors.
- The reply stops mid-sentence: the max response length was reached. Raise it, or ask for shorter replies.
- 400 about context length: lower the context size so the prompt fits the model’s window from the models table.