SillyTavern with Zukko: connect Claude and GPT through your own API
SillyTavern connects third-party APIs through the Custom (OpenAI-compatible) source. Step-by-step setup, the cost of long chats and common errors.
5 min · · development
SillyTavern is an interface for role-play, interactive stories and character chats. You can connect Claude and GPT through an API in SillyTavern with the Custom (OpenAI-compatible) source, and that's how Zukko is added: the address https://api.zukko.pro/v1 and a fetch_... key. Below is the setup based on the official SillyTavern docs, the settings that drive cost, a calculation for long chats, and troubleshooting.
How to connect SillyTavern to Zukko
Per the SillyTavern docs, connecting to an OpenAI-compatible API looks like this:
- Open the API Connections panel (the plug icon in the top menu).
- Set API to Chat Completion.
- Set Chat Completion Source to Custom (OpenAI-compatible).
- Enter the endpoint address:
https://api.zukko.pro/v1. - Enter your
fetch_...API key. - Choose a model. If the API serves a model list at
/v1/models, SillyTavern shows a dropdown; Zukko serves that list. You can also type a model ID into the text field. - Click Connect, then Test Message to send a test message.
| Setting | Value |
|---|---|
| API | Chat Completion |
| Chat Completion Source | Custom (OpenAI-compatible) |
| Endpoint address | https://api.zukko.pro/v1 |
| API key | fetch_your_key |
| Model | claude-sonnet-5, gpt-5.6-sol, glm-5.3-flash, etc. |
The SillyTavern docs say explicitly not to add the /chat/completions suffix, and to try adding /v1 to the end of the address if you have connection problems. For Zukko, the correct address is exactly https://api.zukko.pro/v1. The Bypass API status check option is for APIs that don't report status; with Zukko you can leave it off.
For the current model list, call GET https://api.zukko.pro/v1/models (see the models documentation) or open the "Models" page in the dashboard.
Settings that drive cost
The response settings panel (AI Response Configuration) has two key parameters:
- Context (tokens) — how many tokens SillyTavern sends to the model in each request: character card, system prompt, chat history and so on;
- Response (tokens) — the maximum answer length.
The key point: on every generation SillyTavern resends the entire context. Once chat history fills the Context window, every request costs about the same, and most of the price is input tokens. Every swipe (regenerating an answer) is a separate full request with the same context.
The cost of a long chat
Say Context = 16,000 tokens and Response = 400. Once the window is full, one generation is 16,400 tokens:
| Model | Input / output price per 1M | One generation | 200 generations |
|---|---|---|---|
claude-opus-5-5, claude-sonnet-5, gpt-5.6-sol | $0.3 / $0.3 | 16,400 × 0.3 / 1,000,000 = $0.00492 | $0.984 |
gpt-5.6-luna, glm-5.3 | $0.1 / $0.1 | 16,400 × 0.1 / 1,000,000 = $0.00164 | $0.328 |
glm-5.3-flash | $0.04 / $0.04 | 16,400 × 0.04 / 1,000,000 = $0.000656 | $0.1312 |
If you raise Context to 32,000, one generation on claude-sonnet-5 costs 32,400 × 0.3 / 1,000,000 = $0.00972, and 200 generations cost $1.944. So context size is your main lever for saving money: keep it as large as the character and story actually need.
A note on caching. Vendors may read resent context from the prompt cache at roughly 10% of the input price, while Zukko bills cached tokens at the regular input price. In long chats with a large repeated context, the real difference from official prices is therefore smaller than a straight price-list comparison suggests. More in the key limits and cache docs.
Temperature and Top P for Claude models
SillyTavern sends sampling parameters with every request. claude-sonnet-5 and claude-opus-5-5 may reject a request with a 400 error if temperature is anything other than 1 or top_p is below 0.99. For these models, keep Temperature = 1 and Top P = 1. With Claude, steer variety through the prompt and the character card instead. For GPT and GLM models, tune samplers as usual and check the results on test messages.
How to choose a model
Nobody can tell you in advance which model fits your style and characters best, so test it. Take one character card and 5–10 identical opening situations, run them on two or three models (you can switch the model in API Connections and regenerate), and compare the answers. Spending per model is shown in the dashboard's "Usage" section.
Common errors
The connection won't establish
Check the address: https://api.zukko.pro/v1, with no /chat/completions at the end. The key must start with fetch_ and be copied in full.
400 on Claude models
Most likely Temperature or Top P was changed. Set Temperature = 1 and Top P = 1 again (see the section above).
A message format error
Some APIs require, for example, a single system message or strictly alternating roles. SillyTavern has a Prompt Post-Processing setting for this, with modes from Merge to Single user message. Start with the least strict mode.
401, 402, 403
401 means an invalid key, or the key was deleted in the dashboard. 402 means the balance ran out. 403 model_not_allowed_for_key means the model isn't on the key's allowed list.
413 or answers get cut off
413 means the request is too large: lower Context. If answers are cut off, raise Response (tokens).
FAQ
Why does spending grow even though my messages are short?
The price isn't set by the length of your message but by the whole context sent with each request: card, history, system prompt. A short line in a long chat costs nearly as much as a long one.
Can I switch models within one chat?
Yes, the model is chosen in API Connections and applies to the next generation. The chat history stays as it is.
How do I cap spending?
Set daily and monthly limits on the key in the dashboard: once a limit is reached, requests stop going through. Also keep Context (tokens) reasonable and watch how many swipes you make.
Where do I get a key?
Create one in the Zukko dashboard and paste it into API Connections. If you're new to APIs, start with the quick start guide.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- Prompt Injection: What It Is and How to Protect a Bot and an AgentHow prompt injection works through user input and third-party documents, and which measures limit the damage: data isolation, tool permissions, key limits.
- Your Own Neural Network Proxy on Node.js: Keep the API Key Off the FrontendA small Express server between your frontend and the model API: the key stays on the server, and models, request size and rate are capped.
- DeepSeek API in Python: Requests, Streaming, JSON and Error HandlingReady code for DeepSeek V4.1 Flash and V4 Pro on the OpenAI SDK: a request, streaming, JSON parsing and careful error handling.
- Prompt Engineering Examples: 12 Ready-Made Templates for WorkTwelve prompt templates for everyday tasks: what each one says, why it is built that way, and what a single API call costs.