Connect SillyTavern to Ollama or a Hosted API
To connect SillyTavern to Ollama you pick a connection type, paste a local URL and choose a model. To use a hosted API instead, you use the Custom OpenAI-compatible option and swap three values.
Updated
Key points
- SillyTavern can talk to local Ollama or to any OpenAI-compatible endpoint.
- For the hosted API use Chat Completion with a custom endpoint, your key and the model ID uncensored.
- Long roleplay history costs mostly input tokens; a 100,000-token window leaves room for big cards and lorebooks.
- Most connection errors are a wrong URL path, a missing key or too many parallel requests.

Two ways to connect, one decision
SillyTavern is a front end for chat and roleplay. It does not run a model itself. It sends your messages to a backend and shows the replies, so the first thing to decide is which backend. Local Ollama is one choice. A hosted OpenAI-compatible API is the other. Menu names change between SillyTavern versions, so use the steps below as a map and check the in-app labels if something looks different.
Pick local Ollama if you have a capable GPU, want everything offline and enjoy trying many models. Pick a hosted API if your machine is modest, if you want the same endpoint on a phone and a desktop, or if you are tired of hunting for a model that does not refuse fiction prompts. Both paths are covered here, and you can keep both saved and switch whenever you like.
Option A: connect SillyTavern to local Ollama
Start Ollama first. It listens on port 11434 of your own computer by default, and you need at least one model pulled.
- Install Ollama and pull a model with
ollama pullfollowed by the model name you want. - Confirm it is running by opening
http://localhost:11434in a browser. A short status message means it is up. - In SillyTavern, open the plug icon (API Connections).
- Under the Text Completion type, choose the Ollama option as the API.
- Enter the server URL, usually
http://127.0.0.1:11434, and click Connect. - Pick your model from the list that appears.
If SillyTavern runs in Docker or on another machine, 127.0.0.1 points at that container or machine, not at your Ollama host. Use the host's network address, and make sure Ollama is set to listen on an address the other machine can reach. This one detail causes more failed connections than anything else.
Option B: use a hosted API instead
The hosted route uses SillyTavern's Chat Completion mode, which speaks the OpenAI request format. You need an API key first. Create your API key with Google or with email and password. New accounts can claim $0.50 of trial credit with one click on the key page, valid for 7 days and with no card needed.
- Open API Connections (the plug icon).
- Set the API type to Chat Completion.
- Set the Chat Completion source to Custom (OpenAI-compatible).
- In the custom endpoint field, enter
https://api.ollamaapi.top/v1. - Paste your key into the API key field.
- In the model field, enter
uncensored. - Click Connect. A green status or a model confirmation means it worked.
Some versions fill the model list by calling GET /v1/models. If yours does not, type the ID by hand. The ID is exactly uncensored, lowercase, with no tag after it.
Check the key before you blame SillyTavern
If Connect fails, test the endpoint outside the app. That separates a bad key or URL from a front-end problem.
curl https://api.ollamaapi.top/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello in five words."}]}'
If that returns text, the service is fine and the issue is in the field values you typed. If it returns an authorization error, re-copy the key.
Settings that matter for roleplay
Once connected, a few settings decide how the chat feels and how much it costs.
Context size
The context window is 100,000 tokens, counting the prompt and the reply together. SillyTavern lets you set its own context limit. You do not have to fill the window. Large character cards, lorebook entries and a long chat history all consume it, and every message you send includes that history again as input. Start with a context setting of 16,000 to 32,000 tokens and raise it only if the character forgets things you care about.
Response length
The max_tokens parameter is optional. Setting a response length of 300 to 500 tokens keeps replies in a normal chat range and keeps output cost predictable. Output tokens cost more than input tokens, at $0.50 per 1M versus $0.15 per 1M.
Samplers
Temperature, top_p, stop sequences, seed and the frequency and presence penalties are passed through to the model. Begin with a temperature around 0.8 to 1.0 for lively dialogue and lower it if the character drifts or contradicts itself. Add a stop sequence for your own name prefix if the model starts writing your lines for you.
Streaming
Turn streaming on. Replies then appear word by word, which feels faster, and a long reply does not look like a frozen window. Remember that a streamed request holds one of your concurrency slots until the stream ends.
What a session costs
Pricing is per token with prepaid credit, so you can estimate a session. Suppose each turn sends about 8,000 tokens of card, lorebook and history, and the reply is about 300 tokens.
- Input: 8,000 x $0.15 / 1,000,000 = $0.0012
- Output: 300 x $0.50 / 1,000,000 = $0.00015
- Per turn: $0.00135. Per 100 turns: $0.135.
The trial credit of $0.50 stretches to roughly 370 turns at that size. If you chat for an hour a night, a $20 top-up can last a long time, and credit never expires. Top-ups accept any whole amount from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200. You can pay by crypto (USDT on TRC20, USDC on Base). See the pricing page for the current details.
Failed or refused requests are not charged, so a retry after an error does not cost you twice. A long-running story can grow without anyone noticing, so glance at the balance shown in the response headers every few sessions. If your chat grows to 40,000 tokens of history, the input share rises to $0.006 per turn, which is a good moment to trim the history or summarize older messages.
Troubleshooting
- Connect shows an error immediately. Check that the endpoint ends in
/v1and has no trailing path such as/chat/completions. SillyTavern adds the route itself. - Authorization error. The key has a stray space or a missing character. Paste it again, or run the curl test above.
- 429 with
concurrency. Several requests are running at once. This happens with group chats or when you hit regenerate repeatedly. A full key allows 8 at a time and a trial key allows 2. - 429 with
rate_limited. You exceeded the requests-per-minute limit, 300 on a full key and 60 on a trial key. Wait a minute. - 429 with a
Retry-After: 5header. The service is briefly overloaded. Retry after five seconds. - Replies stop mid-sentence. Raise your response length setting, or check that the context limit leaves room for the reply.
For other settings, such as tool calling in extensions that use it, see the quick-start docs.
One more habit saves frustration. Change one setting at a time and send two or three messages before judging. Roleplay quality varies from turn to turn even with identical settings, so a single odd reply tells you little, while a pattern across five or six replies does.
A note on content
People use SillyTavern for fiction, character chat and companion-style apps. For those uses, a model that refuses by default tends to break the scene with a lecture or a stock apology. The model behind uncensored is tuned to answer without content refusals for lawful adult use, which suits fiction, roleplay and companion-style apps for adults. One rule is fixed: no sexual content involving minors, and requests of that kind are not allowed. Prompts are not used for training.
More guides
Questions and answers
Which SillyTavern API type should I choose for the hosted API?
Chat Completion with the Custom (OpenAI-compatible) source. Enter the endpoint, your key and the model ID uncensored.
Can I keep my Ollama connection too?
Yes. SillyTavern saves connection settings, so you can switch between local Ollama and the hosted endpoint when you want.
Why does my local Ollama connection fail from Docker?
127.0.0.1 inside a container points at the container itself. Use the host's address instead and make sure Ollama listens on it.
How many parallel chats can I run?
A full key allows 8 concurrent requests and 300 per minute. A trial key allows 2 and 60.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key