SillyTavern integration
Connect SillyTavern to Plan2API
In SillyTavern 1.19, choose Chat Completion, set Chat Completion Source to Custom (OpenAI-compatible), enter https://api.plan2api.com/v1 as the Custom Endpoint and paste your p2a_ key. Claude, ChatGPT, Gemini and Kimi models from your plans then answer, with 50 free chat requests a day.
- API
- Chat Completion
- Source
- Custom (OpenAI-compatible)
- Custom Endpoint
- https://
api.plan2api.com/ v1 - Free plan
- 50 chat requests a day
Updated
SillyTavern settings for Plan2API
SillyTavern connects to Plan2API through its Custom (OpenAI-compatible) Chat Completion source, so a single endpoint and one p2a_ key handle Claude, Codex, Gemini and Kimi models, including using your Claude subscription as an API. Use the values below in the API Connections panel.
| Setting | Value |
|---|---|
| API | Chat Completion |
| Chat Completion Source | Custom (OpenAI-compatible) |
| Custom Endpoint (Base URL) | https:// |
| Custom API Key | Your p2a_ |
| Model | Available Models, or Enter a Model ID |
| Context Size (tokens) | The model's window, up to 2,000,000 |
| Prompt Post-Processing | None, or Semi-strict (see below) |
Connect SillyTavern step by step
- Sign up with a Google account, connect your Claude, ChatGPT, Google AI or Kimi subscription, and copy the
p2a_API key you get after connecting. - Open SillyTavern's
API Connectionspanel and setAPItoChat Completion. - Set
Chat Completion SourcetoCustom (OpenAI-compatible). - Enter
https://api.plan2api.com/v1inCustom Endpoint (Base URL), without/chat/completions, because SillyTavern appends/chat/completionson its own. - Paste your
p2a_key intoCustom API Keyand clickConnect. - Pick a model from the
Available Modelsdropdown or type an ID such asclaude/claude-sonnet-5intoEnter a Model ID. - Click
Test Messageto verify the setup, which sends one real chat request to the model.
Available Models is populated from GET /v1/models and lists every provider Plan2API serves, even ones you haven't connected, so selecting a model from an unconnected provider returns 403 no_credentials.
Samplers and stop strings by provider
SillyTavern sends its sampler values with every request, but each provider behind Plan2API accepts a different subset, so sliders that do nothing on Claude aren't a bug. frequency_penalty, presence_penalty and top_k aren't used on any provider, and n and seed are ignored everywhere. The table below shows which settings take effect on each provider.
| SillyTavern setting | Claude | Codex | Gemini | Kimi |
|---|---|---|---|---|
| Temperature | Ignored | Ignored | Used | Fixed at 1 |
| Top P | Ignored | Ignored | Used | Fixed at 0.95 |
| Custom Stopping Strings | Ignored | Ignored | Used | Ignored |
| Max Response Length | Used, up to 128,000 | Used | Not on gemini-* models | Used |
| Frequency, Presence, Top K | Ignored | Ignored | Ignored | Ignored |
Reasoning effort and visible thinking
On the Custom (OpenAI-compatible) source, SillyTavern only sends its built-in Reasoning Effort dropdown for OpenAI model names on its own internal list (like gpt-5 or o3) and koboldcpp/ models, so the menu sends nothing when you use Plan2API model IDs. To set reasoning effort in SillyTavern, open Additional Parameters and put reasoning_effort inside Include Body Parameters, which is a YAML object merged into every request body. Plan2API accepts none, minimal, low, medium, high, xhigh and max on Claude and Gemini models, maps the value to low, high or max on Kimi, and passes it straight through to Codex.
Turn on Request model reasoning in SillyTavern if you want to read the model's thinking in the chat, as Plan2API streams thinking as reasoning text across all four providers. Add this line to Include Body Parameters to set the effort level:
reasoning_effort: highPrompt post-processing and system prompts
Plan2API collects every system role message in a conversation, wherever it sits in the history, and puts it into the system prompt on Claude models, the instructions field on Codex models and the system instruction on Gemini models, while Kimi receives the message list as sent. SillyTavern's Prompt Post-Processing setting on the Custom source changes how messages are arranged before they leave SillyTavern:
Nonesends the message list without changing roles or order.Merge consecutive messages from the same rolecombines adjacent messages that share a role into one message.Semi-strictmerges consecutive roles and keeps at most onesystemmessage at the top, turning any latersystemmessages intousermessages.StrictappliesSemi-strictand also requires ausermessage first, inserting[Start a new chat]fromconfig.yamlwhen needed.Single user messageflattens the entire prompt into oneusermessage.
Start with None for normal chats. If you inject an Author's Note or World Info at a specific chat depth using the system role, switch to Semi-strict so SillyTavern converts those mid-chat injections into user messages instead of letting them get pulled up into the top-level system prompt. Merge consecutive messages from the same role, Semi-strict and Strict also strip tool calls from the prompt unless you select their with tools variant.
Long chats and Plan2API plans
On the Custom source, SillyTavern's Context Size (tokens) slider goes up to 2,000,000 tokens, so match it to the actual window of the model you're running. Set it to 1,000,000 for claude/claude-sonnet-5 (and claude/claude-opus-5-5), 200,000 for claude/claude-haiku-4-5 (and claude/claude-sonnet-4-6), and 1,048,576 for gemini/gemini-3.8-flash-high and kimi/k3, which starts on a 256K window and switches to 1M once the prompt passes about 192K tokens.
Every generation in SillyTavern counts as one chat request, including swipes, regenerations, Continue and Test Message. Plan2API's Free plan includes 50 chat requests a day (resetting at 00:00 UTC) at 1 request per second with bursts up to 20, while Pro and Scale plans remove the daily request cap: Pro is $12 a month or $99 a year with up to 3 connected subscriptions, and Scale is $29 a month or $249 a year with up to 25 subscriptions. If you connect more than one account for the same provider, a request that hits a usage limit automatically fails over to your next connected account before any output is sent, though Claude's own subscription usage limits and the other providers' plan quotas still apply to each account.
Troubleshooting SillyTavern with Plan2API
404not_found: yourCustom Endpoint (Base URL)includes/chat/completionsat the end (causing SillyTavern to send/v1/chat/completions/chat/completions) or is missing/v1, so set it tohttps://api.plan2api.com/v1.401invalid_api_key: the value inCustom API Keyis missing or isn't a validp2a_key from the Keys page of your dashboard.403no_credentials: you picked a model from a provider you haven't linked yet, so connect a subscription for that provider in the dashboard first.400model_not_found: the string inEnter a Model IDdoesn't match a known model, so pick an exact ID fromAvailable Models.- Sampler sliders change nothing: that provider ignores those parameters (for example, Claude and Codex ignore
temperatureandtop_p), as shown in the sampler table above. 429subscription_quota_exhausted: every connected account for that provider has hit its subscription usage quota, and theRetry-Afterheader gives the seconds until the earliest reset.429daily_requests: you've used all 50 daily chat requests on the Free plan, which resets at 00:00 UTC (see the API error reference in the docs for the full list of error codes).
Use the AI subscriptions you already pay for as one OpenAI-compatible API key.
- Free: 1 subscription, 50 requests a day, no card
- Pro: $12 a month
FAQ
Can I use my Claude subscription in SillyTavern?
Yes, you can connect your Claude Pro or Max plan to Plan2API and use it in SillyTavern. Set API to Chat Completion, choose Custom (OpenAI-compatible) as the source, enter https://api.plan2api.com/v1 with your p2a_ key, and pick a model like claude/claude-sonnet-5.
Should the SillyTavern Custom Endpoint include /chat/completions?
No, enter https://api.plan2api.com/v1 as the endpoint. SillyTavern appends /chat/completions to the base URL automatically.
Why doesn't temperature change Claude replies?
Plan2API ignores temperature and top_p on Claude and Codex models. Those sliders do take effect on Gemini models, while Kimi fixes temperature at 1 and top_p at 0.95.
Why is SillyTavern's Reasoning Effort setting ignored?
On the Custom (OpenAI-compatible) source, SillyTavern only sends its Reasoning Effort dropdown for model names on its own built-in OpenAI list and koboldcpp/ models. To send it with Plan2API models, open Additional Parameters and add reasoning_effort: high inside Include Body Parameters.
Does every swipe count toward the Free plan?
Yes, every swipe, regeneration, Continue or Test Message is one chat request. The Free plan gives you 50 chat requests per day (resetting at 00:00 UTC), while the Pro plan has no daily request cap.
Sources
- SillyTavern docs: Chat Completions sourcesdocs.sillytavern.app
- SillyTavern docs: Reasoningdocs.sillytavern.app
- SillyTavern source: chat-completions.jsgithub.com
- SillyTavern releases (GitHub)github.com