SillyTavern API errors: what each one means and how to fix it
Updated 2026-07-15
Almost every SillyTavern API error comes from one of four places: the endpoint URL, the API key, the model ID, or a limit the provider enforces on the request itself. Match the status code or message you are seeing to the cause below, then confirm the fix with a plain curl call before touching SillyTavern's settings panel again.
Quick answer: four places every error comes from
SillyTavern does not run any model itself. It is a client that sends your chat history to whatever Custom Endpoint you configured and shows you back whatever that endpoint returns, error included. Every failure sorts into one of the four buckets above. Work through them in order rather than guessing. First confirm the URL and key are structurally correct, then isolate whether SillyTavern or the provider is the actual source of the problem with a direct curl call, and only then look at the request itself. The table further down maps exact status codes and messages to which bucket each one belongs to.
- Endpoint URL: wrong path, wrong protocol, or a path SillyTavern already appends itself.
- API key: whitespace from copy-paste, a revoked key, or the wrong Chat Completion Source selected.
- Model ID: wrong casing, a deprecated ID, or an ID your key is not entitled to.
- The request itself: too many calls too fast, or a context window the current chat has outgrown.
How the request travels, and where it breaks
SillyTavern runs a small local server even in the desktop build, and your browser tab talks to that server, not directly to the provider. When you click Connect or send a message, SillyTavern's own backend makes the actual outbound call to your Custom Endpoint with the key in the Authorization header, waits for a response, and relays whatever comes back to the browser. That extra hop changes what a given error is actually telling you. If SillyTavern's backend cannot reach the URL at all, a DNS failure, the wrong protocol, a typo, you get a generic connection error that has nothing to do with your key. If the URL is reachable but the provider rejects the request, you get whatever HTTP status the provider chose to send back, and SillyTavern just displays it. If the URL is reachable and the provider replies with something SillyTavern was not built to parse, a stream cut off mid-token, a response reshaped by an intermediary, you get a parsing error that looks like a SillyTavern bug but is really a shape mismatch further up the chain. Self-hosted and remote installs add one more failure mode. Open SillyTavern in a browser pointed at an install running on another machine, and the browser itself can block a request over CORS before it ever reaches SillyTavern's backend. That shows up as a console error that looks identical to a bad key or a dead endpoint, even though neither is wrong.
Every SillyTavern API error, decoded
Match what you are seeing against the left column. The middle column is where the fault usually sits, and the right column is what to check first, in the order it is worth checking.
| What you see | Likely cause | Fix |
|---|---|---|
| Model dropdown stays empty after Connect | The call to /v1/models never got a usable response | Confirm the Custom Endpoint ends at /v1 with nothing after it and starts with https:// |
| 401 Unauthorized | The key was rejected on arrival: revoked, mistyped, or the wrong source selected | Re-paste the key fresh, confirm it is still active, and check Chat Completion Source is Custom (OpenAI-compatible) |
| 403 Forbidden | The key is valid but not entitled to the model or route you requested | Copy the model ID straight out of your own /v1/models response instead of a screenshot from someone else |
| 404 Not Found | The Custom Endpoint has an extra path segment, usually /chat/completions pasted in by mistake | Trim the URL back to just the base ending at /v1; SillyTavern appends the rest itself |
| Model not found / invalid model | Wrong casing, a deprecated ID, or an ID typed from memory | Copy the exact ID from /v1/models; casing and punctuation both matter |
| 429 Too Many Requests | A request or token rate limit the provider enforces was crossed | Stop mashing regenerate, respect any Retry-After header, and keep a fallback model ready |
| Context length exceeded | Card, persona, lorebook, and history together now exceed the model's context window | Lower Context Size and Max Response Tokens, trim the lorebook, or summarize old turns |
| 500 / 502 / 503 from the provider | A failure on the provider's side, not your configuration | Wait and retry; if every model on that provider fails the same way, the provider is down |
| Response cuts off mid-stream or fails to parse | A dropped connection, a browser extension, or a proxy reshaping the stream | Turn off streaming to isolate the cause, disable extensions on the tab, retry on a stable connection |
Why these errors catch people off guard
None of this is specific to SillyTavern. Any Chat Completion client hits the same categories of failure because it is talking to the same kind of OpenAI-compatible endpoint underneath. Knowing which bucket an error belongs to is most of the debugging work; the rest is confirming it with a request that bypasses SillyTavern entirely.
- A green Connect light only proves /v1/models answered. It says nothing about whether /chat/completions will accept your next message, so a working dropdown can still be followed by a 429 or a context error a few turns later.
- SillyTavern's own error toasts are generic by design, because they wrap whatever text or status the provider sent back. The same toast wording can mean different things on different providers.
- Chat Completion and Text Completion read different fields entirely, so a key or URL that is correct in one mode shows as broken in the other simply because the wrong panel is active.
- Rate limit and context errors are not configuration mistakes. They mean the request itself was too big or too frequent for what the key allows, and re-pasting the URL again will not change that.
- Browser extensions, ad blockers, privacy tools, sit between the SillyTavern tab and the outbound request, and can silently strip a header or block the call, producing a connection error that looks exactly like a bad key.
Hosted APIs vs local backends: different failure modes
SillyTavern supports both a hosted Chat Completion source and local Text Completion backends like KoboldCpp or text-generation-webui. They fail in different ways, and knowing which one you are running narrows the search immediately.
| Failure | Hosted Chat Completion source | Local Text Completion backend |
|---|---|---|
| Empty model list | Key rejected or URL wrong; the provider never answered | Backend process is not running yet, or the local port is wrong |
| 401 / 403 | Common; almost always a key problem | Rare; most local backends skip auth entirely |
| 429 rate limit | Common under bursty regenerate spam | Effectively never; limited only by your own hardware |
| Context overflow | A hard limit tied to the model itself | A soft limit tied to your VRAM and RAM; it degrades before it errors |
| Content policy rejection | Enforced by the provider, and varies by model owner | Not enforced server-side; SillyTavern's own terms of use still apply either way |
Fix it in this order, not at random
Most SillyTavern support threads skip straight to reinstalling or re-entering every field. The order above is faster because it isolates which single field is wrong instead of touching all of them at once.
- Copy the URL again from scratch instead of editing the old one in place. Stray characters left over from a previous paste are the single most common cause of a URL that looks right but is not.
- Paste the key into a plain text editor first to check for hidden whitespace or line breaks, then paste the cleaned version into SillyTavern.
- Hit /v1/models directly with curl before touching SillyTavern again. A model list coming back means the key and URL are both fine and the bug is inside the saved SillyTavern configuration.
- Copy the model ID out of that same /v1/models response instead of typing it from memory; casing and punctuation both matter.
- If you are getting 429s, stop mashing regenerate. Space requests out, or keep a second budget model configured as a fallback so one throttled model does not stall the whole session.
- If context errors keep appearing, lower Context Size and Max Response Tokens together. Trimming the lorebook usually does more good than shaving the reply length.
- If nothing above explains it, point the base URL at a different OpenAI-compatible endpoint for one test message before spending more time on the original provider. APIsRouter is one pay-as-you-go option with no subscription, useful for checking whether the problem follows you to a new provider or was specific to the old one.
- Rotate the key if you ever suspect it leaked: a shared screenshot, a public repo, a pasted config file. A leaked key fails unpredictably long before you notice it is gone.
Confirm the fix with curl and Python before reopening SillyTavern
Before changing anything else inside SillyTavern, take the URL, key, and model ID out of the app entirely and test them with a plain HTTP client. The -i flag on curl prints the response status line and headers, which tells you immediately whether you are looking at a 401, a 429, or something else, instead of reading SillyTavern's generic toast. A short Python script wrapped in a try/except block gives the same detail without reading raw HTTP: catch the status error and print its body directly instead of relying on whatever SillyTavern's UI decided to summarize.
curl -i https://api.apisrouter.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Say ready."}],
"max_tokens": 20
}'FAQ
Why does my SillyTavern model dropdown stay empty?
The Connect call to /v1/models never got a usable response. Check three things in order: the Custom Endpoint ends at /v1 with nothing after it, the API key has no leading or trailing whitespace, and Chat Completion Source is set to Custom (OpenAI-compatible) rather than plain OpenAI. Test the same URL and key with curl outside SillyTavern to see the provider's real response.
What does a 401 Unauthorized error mean in SillyTavern?
The provider received the request and rejected the key. Re-paste the key fresh rather than editing the existing field, confirm it has not been revoked or rotated, and check that Custom (OpenAI-compatible) is selected as the source. A curl request with the same key shows whether the key itself is the problem or the saved SillyTavern config is stale.
Why do I get 429 Too Many Requests in SillyTavern?
You crossed a rate limit the provider enforces, on requests or on tokens depending on the provider. This is not a SillyTavern setting to fix. Slow down regenerate spam, respect any Retry-After the response includes, and keep a second budget model configured so one throttled model does not stall the whole session.
Why does SillyTavern say the context length was exceeded?
The character card, persona, lorebook entries, and chat history you are sending now add up to more tokens than the model's context window holds. Lower Context Size and Max Response Tokens in the Chat Completion settings, trim or disable unused lorebook entries, and consider summarizing very long histories instead of keeping every turn.
What is the cheapest way to stop hitting rate limits in SillyTavern?
Rate limits are tied to a single key on a single provider, so the practical fix is keeping a second, cheap model configured as a fallback rather than retrying the same one. APIsRouter is a pay-as-you-go OpenAI-compatible gateway with no subscription: you pay at /topup with no signup form and the key arrives by email, global models are priced below their official list rates, and Chinese models sit under their official prices, so adding a budget fallback model costs very little.
Does a successful curl request mean SillyTavern will definitely work?
It confirms the URL, key, and model ID are all valid, which rules out the three most common causes. It does not rule out a SillyTavern-side issue: a stale saved configuration, the wrong Chat Completion Source selected, or a streaming setting that a particular proxy handles differently. If curl succeeds and SillyTavern still fails, the bug is inside SillyTavern's own settings, not the API.