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.

SillyTavern values for Plan2API
SettingValue
APIChat Completion
Chat Completion SourceCustom (OpenAI-compatible)
Custom Endpoint (Base URL)https://api.plan2api.com/v1
Custom API KeyYour p2a_ key
ModelAvailable Models, or Enter a Model ID
Context Size (tokens)The model's window, up to 2,000,000
Prompt Post-ProcessingNone, or Semi-strict (see below)

Connect SillyTavern step by step

  1. 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.
  2. Open SillyTavern's API Connections panel and set API to Chat Completion.
  3. Set Chat Completion Source to Custom (OpenAI-compatible).
  4. Enter https://api.plan2api.com/v1 in Custom Endpoint (Base URL), without /chat/completions, because SillyTavern appends /chat/completions on its own.
  5. Paste your p2a_ key into Custom API Key and click Connect.
  6. Pick a model from the Available Models dropdown or type an ID such as claude/claude-sonnet-5 into Enter a Model ID.
  7. Click Test Message to 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.

What reaches each provider through Plan2API
SillyTavern settingClaudeCodexGeminiKimi
TemperatureIgnoredIgnoredUsedFixed at 1
Top PIgnoredIgnoredUsedFixed at 0.95
Custom Stopping StringsIgnoredIgnoredUsedIgnored
Max Response LengthUsed, up to 128,000UsedNot on gemini-* modelsUsed
Frequency, Presence, Top KIgnoredIgnoredIgnoredIgnored

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:

YAML
reasoning_effort: high

Prompt 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:

  • None sends the message list without changing roles or order.
  • Merge consecutive messages from the same role combines adjacent messages that share a role into one message.
  • Semi-strict merges consecutive roles and keeps at most one system message at the top, turning any later system messages into user messages.
  • Strict applies Semi-strict and also requires a user message first, inserting [Start a new chat] from config.yaml when needed.
  • Single user message flattens the entire prompt into one user message.

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

  • 404 not_found: your Custom Endpoint (Base URL) includes /chat/completions at the end (causing SillyTavern to send /v1/chat/completions/chat/completions) or is missing /v1, so set it to https://api.plan2api.com/v1.
  • 401 invalid_api_key: the value in Custom API Key is missing or isn't a valid p2a_ key from the Keys page of your dashboard.
  • 403 no_credentials: you picked a model from a provider you haven't linked yet, so connect a subscription for that provider in the dashboard first.
  • 400 model_not_found: the string in Enter a Model ID doesn't match a known model, so pick an exact ID from Available Models.
  • Sampler sliders change nothing: that provider ignores those parameters (for example, Claude and Codex ignore temperature and top_p), as shown in the sampler table above.
  • 429 subscription_quota_exhausted: every connected account for that provider has hit its subscription usage quota, and the Retry-After header gives the seconds until the earliest reset.
  • 429 daily_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

  1. SillyTavern docs: Chat Completions sourcesdocs.sillytavern.app
  2. SillyTavern docs: Reasoningdocs.sillytavern.app
  3. SillyTavern source: chat-completions.jsgithub.com
  4. SillyTavern releases (GitHub)github.com