How to connect SillyTavern to KoboldCpp
KoboldCpp SillyTavern setup in short: start KoboldCpp with a model, then in SillyTavern open API Connections (the plug icon), choose Text Completion, set the API type to KoboldCpp, enter http://localhost:5001 and click Connect. Leave the API key empty unless you started KoboldCpp with --password: SillyTavern shows a red Missing key
marker anyway, and the connection works. For Chat Completion use the custom OpenAI-compatible source with http://localhost:5001/v1. Menu names checked in SillyTavern 1.19.0.
Checked against KoboldCpp 1.124.2 · updated 13 Nov 2026
- lab-lnx: Linux test VM · 4 vCPU · 15 GB · no GPU
- gha-u24: Ubuntu 24.04 test machine · 4 vCPU · 16 GB · no GPU
On this page
- Before you connect: two checks
- KoboldCpp SillyTavern: Text Completion or Chat Completion?
- Connect with Text Completion (recommended)
- Connect with Chat Completion
- API key and password
- Match context size and response length
- Pick the right instruct template
- SillyTavern on your phone, KoboldCpp on your PC
- When it does not work
- Images, voice and more from KoboldCpp
- Check it worked
- Undo
Before you connect: two checks
Before you connect
If the page does not open, fix that first: Will not start or Troubleshooting. You can also check from a terminal: curl http://localhost:5001/api/v1/model should answer with the model name (API page). SillyTavern itself is installed from its own documentation.
KoboldCpp SillyTavern: Text Completion or Chat Completion?
| Criterion | Text Completion → KoboldCpp | Chat Completion → Custom |
|---|---|---|
| Who builds the prompt | SillyTavern, with its instruct template | KoboldCpp, with the model's chat template |
| Address | http://localhost:5001 | http://localhost:5001/v1 |
| Connected on 1.19.0 | Yes, model name shown works F48 | Yes, "Valid", model listed works F48 |
| A chat reply through it | Received works F48 | Not exercised untested |
Our recommendation: use Text Completion with the API type KoboldCpp. It is the one we got a reply through, and SillyTavern then knows it is talking to KoboldCpp. Choose Chat Completion if you want KoboldCpp to apply the model’s own template (OpenAI API page).
Connect with Text Completion (recommended)
Open API Connections
Click the plug icon in SillyTavern’s top bar. On a first start SillyTavern asks for a persona name before anything else works.
First start of SillyTavern: you must choose a persona name before connecting anything. The plug icon opens API Connections. Choose Text Completion and the API type KoboldCpp
Set API to Text Completion, then API Type to KoboldCpp. The URL field shows the example
http://127.0.0.1:5001, and the API key is marked optional F43.Text Completion with API Type set to KoboldCpp: the API key is optional and the example URL is http://127.0.0.1:5001. Enter the address
Type
http://localhost:5001(orhttp://127.0.0.1:5001: both worked on the same PC F48).
Connect with Chat Completion
Choose Chat Completion, source Custom (OpenAI-compatible), and use the base address http://localhost:5001/v1. SillyTavern reported “Valid” and listed the loaded model F48:
SillyTavern’s own hint says to add /v1 if the address does not work; in our test the address without /v1 was also reported valid F48:
The model list shows koboldcpp/<model file>. We did not send a message through this mode, and we have not checked whether SillyTavern applies its own instruct template in it. See the OpenAI API page for what KoboldCpp does with chat requests.
API key and password
There is no key unless you started KoboldCpp with API key that clients must send to use text endpoints (image endpoints are not protected). Also settable via KCPP_PASSWORD.Default noneLauncher Network tab: PasswordSince v1.61All details. SillyTavern marks the key field with a red “Missing key” whenever it is empty, even though the connection works and no key is needed F43:
If you did set a password, paste it into the key field of the connection you use: KoboldCpp answers generation requests with 401 without it F25. A 401 after connecting means the key is missing or wrong. See the password table.
Match context size and response length
KoboldCpp’s context is set when it starts: 16384 by default, with 256 added F05 F06. SillyTavern has its own Context and Response sliders. Keep SillyTavern’s context at or below KoboldCpp’s and the response length well below it. We have not tested how SillyTavern reads the server’s value or what happens when its number is larger. For reprocessing and ContextShift in long chats, see context size.
Pick the right instruct template
In Text Completion SillyTavern formats the prompt, so its instruct and context templates must match the model’s family. A mismatch shows as the model speaking for you, role tags in replies, endless output or visible thinking text (users report all of these). We have not tested SillyTavern’s template selection. See chat templates when it is published.
SillyTavern on your phone, KoboldCpp on your PC
localhost means the device you type it on, so on a phone it is the phone. Use your PC’s address on your network instead, such as http://192.168.1.20:5001, and test it in the phone’s browser first: the KoboldAI Lite page should open. Windows may ask to allow KoboldCpp through the firewall. We have not tested this on a phone. The steps for finding the address and the risks are in remote access; for KoboldCpp running on the phone itself see Android.
When it does not work
| "No connection..." and a red plug icon | KoboldCpp is not running, the port is wrong, or you typed https:// for a normal server. A wrong port (5002) and https both gave this. | tested, F48 |
| "Not connected to API!" in the chat box | Not connected yet, or the connection dropped. Click Connect again. | tested, F47 |
| A red "Missing key" next to the API key field | Harmless without --password: the connection works. | tested, F43 |
| A list of addresses covers the Connect button | SillyTavern keeps a history of addresses you tried. Press Escape or click elsewhere first. | tested, F47 |
| Nothing works on the first start | SillyTavern asks for a persona name before anything else: enter one. | tested, F43 |
| 401 or Unauthorized when sending a message | KoboldCpp has a --password and the key field is empty or wrong: password table. | tested, F25 |
| "Not Found" or "endpoint does not exist" | The address or API type does not match: URL mistakes. | tested, F23 (the KoboldCpp message) |
| The old model name stays after you swap models in KoboldCpp | Click Connect again to refresh it. | users report |
| Replies are cut short | SillyTavern's response length is too low. | users report |
| Every reply reprocesses the whole chat | The start of the prompt changes (lorebook entries, a changing character note) or the context is mismatched: ContextShift. | tested for the mechanism, F66 |
A second tab or a second chat waits its turn, because KoboldCpp answers one request at a time by default F26.
Images, voice and more from KoboldCpp
KoboldCpp can also serve image generation (A1111-style routes) and speech to apps (API). We have not tested SillyTavern’s image or voice features against it, so we do not say they work. See images and voice when those pages are published.
Check it worked
Send a message in a chat. A reply arrives, like this one through the connected backend:
The KoboldCpp console prints the request and its CtxLimit status line (how to read it).
Undo
Click the plug icon and disconnect, or clear the address. Nothing changes in KoboldCpp. If you opened the firewall or used IP address to bind the HTTP server to. Empty (default) listens on all interfaces; use 127.0.0.1 for local-only.Default Launcher Network tab: Host / PortSince v1.0.8betaAll details for a phone, close it again: remote access.
Frequently asked questions
Does SillyTavern need an API key for KoboldCpp?
No. KoboldCpp has no key unless you start it with --password. SillyTavern's KoboldCpp page shows the field as optional but marks it with a red Missing key even when the connection works, which is a common source of confusion. Only if you set --password do you paste that password into the field.
Text Completion or Chat Completion for KoboldCpp?
Text Completion with the API type KoboldCpp is the simplest: SillyTavern then knows it is talking to KoboldCpp, and it formats the prompt with its own instruct template. Chat Completion lets KoboldCpp apply the model's chat template instead. We connected both and sent a reply through Text Completion; we did not exercise generation through Chat Completion.
What URL do I enter in SillyTavern?
http://localhost:5001 (or http://127.0.0.1:5001) for Text Completion, and http://localhost:5001/v1 for Chat Completion. In our test SillyTavern 1.19.0 also accepted /v1 in Text Completion, but the plain address is the documented one.
Why does SillyTavern say no connection?
Usually KoboldCpp is not running, the port differs from 5001, or the address uses https:// against a normal server. In our test a wrong port and https:// against an http server both gave 'No connection...' and turned the plug icon red. If SillyTavern runs on another device, localhost does not mean the PC.
How do I use SillyTavern on my phone with KoboldCpp on my PC?
Enter the PC's address on your network instead of localhost, for example http://192.168.1.20:5001, and allow KoboldCpp through the firewall. Test the address in the phone's browser first. We have not tested this on a phone yet.
Which context size should I set in SillyTavern?
No larger than KoboldCpp's, which is 16384 by default plus 256 reserved, and leave response length well below it. A number above the server's gets the oldest text trimmed. We have not tested how SillyTavern reads the server's value.
Can SillyTavern use KoboldCpp for images and voice?
KoboldCpp serves image and speech routes that apps can call, but we have not tested SillyTavern's image or voice features against it.