# SillyTavern with Spicy API: uncensored role-play models

SillyTavern is the open-source chat front end for role-play with character cards, run on your own computer. This guide connects it to Spicy API (spicyapi.com), so SillyTavern can use `spicy-companion-1`, a role-play model that holds a persona and writes explicit adult scenes, or `spicy-companion-1-flash`, the same tuning for about a ninth of the cost of a long chat. You pay per token from a prepaid balance, with no subscription.

## What you need

- A Spicy API account: sign in at https://www.spicyapi.com/auth and accept the terms.
- A separate key for SillyTavern: https://www.spicyapi.com/dashboard/api-keys, then Create key. You can revoke it without breaking anything else. SillyTavern runs on your own machine and calls the API from there.
- A monthly spend limit on the account (same page, Monthly spend limit). Past it, requests fail with a 402 and nothing is charged, so a leaked key cannot drain your balance.
- A balance (top up from $50 by card or crypto at https://www.spicyapi.com/dashboard/account), or a sandbox key to try the setup first: tick Sandbox when you create the key. It answers with a fixed reply and bills nothing.

## Connect SillyTavern

1. Install and start SillyTavern (`git clone https://github.com/SillyTavern/SillyTavern -b release`, then `npm install` and `node server.js` in that folder) and open http://127.0.0.1:8000.
2. Click the plug icon at the top (API Connections).
3. Set **API** to `Chat Completion` and **Chat Completion Source** to `Custom (OpenAI-compatible)`.
4. Set **Custom Endpoint (Base URL)** to `https://api.spicyapi.com/v1`. SillyTavern adds `/chat/completions` itself.
5. Paste your key into **Custom API Key** and click **Connect**. The status turns to Valid and **Available Models** fills with every Spicy API model.
6. In **Available Models** pick `spicy-companion-1` (or `spicy-companion-1-flash`). SillyTavern preselects the first id alphabetically, `spicy-animate-1`, which is a video model, so chat fails with Bad Request until you change it.
7. Click **Test Message**: SillyTavern answers "API connection successful!". Open a character and chat. To switch back and forth later, save this as a Connection Profile (the icons above the API menu).

![SillyTavern API Connections panel: Chat Completion, Custom (OpenAI-compatible), base URL https://api.spicyapi.com/v1, key saved, model spicy-companion-1, status Valid](https://www.spicyapi.com/docs/integrations/sillytavern-connection.webp)

![A SillyTavern chat with the default Seraphina card answered through Spicy API (a sandbox key returns a fixed reply)](https://www.spicyapi.com/docs/integrations/sillytavern-chat.webp)

## Which model to pick

| Model | Best for | Context (tokens) | Per 1M tokens (prompt / completion) | 100 messages at 4k / 16k context |
|---|---|---|---|---|
| `spicy-companion-1` | Role-play and companions: holds a persona, writes explicit adult scenes, group scenes. | 131,072 | $1.00 / $2.80 | $0.47 / $1.71 |
| `spicy-companion-1-flash` | The same role-play tuning for about a ninth of the cost of a long chat. Fast. | 43,000 tested | $0.10 / $0.80 | $0.06 / $0.19 |
| `spicy-chat-1` | General assistant. Not tuned for role-play; use a companion model for characters. | 200,000 | $0.80 / $2.40 | $0.38 / $1.38 |

Chat apps resend the whole conversation with every message, so the context size you set drives the cost far more than the length of the replies. The last column assumes a 250 token reply at 4k context and 400 at 16k. Every response carries its exact `cost_usd`.

## Recommended settings

| Setting | Value |
|---|---|
| Streaming (AI Response Configuration, the sliders icon) | On, the default. Replies arrive token by token. |
| Context Size | 16,384 is a good balance of memory and cost on both companion models. Longer works (`spicy-companion-1` holds 131,072 tokens, Flash was tested to 43,000) but every message then costs more. The default 4,095 works but forgets quickly. |
| Max Response Length | 300 to 600 tokens. |
| Temperature | 0.8 to 1.0. Change temperature or Top P, not both. |
| Prompt Post-Processing | None. SillyTavern's several system messages are accepted as they are. |
| Function calling, Send inline images | Off. Role-play does not need function calling (it works only on spicy-chat-1 and spicy-companion-1), and image parts are refused with a 400. |

## If something goes wrong

| Status | Meaning | Fix |
|---|---|---|
| 400 | Wrong model id, or an option the chat models do not take (tools on `spicy-companion-1-flash`, images, more than 8,192 max tokens) | Pick `spicy-companion-1`, `spicy-companion-1-flash` or `spicy-chat-1`; the error names the chat models |
| 401 | Key missing, mistyped or revoked | Paste the key again, or make a new one |
| 402 | Balance empty, or the monthly spend limit reached | Top up, or raise the limit on the API keys page. Nothing is charged |
| 422 | Blocked by moderation | Nothing is charged. See what is allowed below |
| 429 | Too many requests in a minute | Wait a minute; the app can retry |

- SillyTavern shows only the HTTP status of a failed request (Bad Request, Payment Required, Unprocessable Entity, Too Many Requests). The reason is printed in the terminal window running SillyTavern.
- Your key is stored on your computer (`data/default-user/secrets.json`) and requests go from the SillyTavern server on your computer, not from the browser tab.

## What is allowed

Explicit role-play between adults is allowed, including non-consent between fictional adult characters (force, sleep, intoxication, framed as consensual non-consent or not) and other dark themes. Every message is screened before it reaches the model: minors in any form, real people (with or without consent), incest, real-world harm and the rest of the prohibited list are refused with a 422, before any charge. The screen reads the whole conversation, character card included, so a card that describes a minor or a real person is refused however the latest message is worded. Refusals in the most serious categories count as strikes. Send each user's id as `user`: the strikes then land on that user, who is refused after ten, and your account is only flagged. Without it they land on your account, flagged after three and suspended after ten. Drop a refused message from the history you send back, or the next message is refused too. A wrong refusal can be reported: POST its `moderation_id` to /v1/moderations/appeals. Full policy: https://www.spicyapi.com/acceptable-use

## Tested

SillyTavern 1.19.0 (release branch of 14 Sep 2026) on macOS, 29 Sep 2026: connection, model list, test message and a streamed chat turn with a sandbox key. SillyTavern's prompt shape (several system messages, then the greeting as an assistant turn) was then sent with a live key to both companion models and accepted.

Other apps: https://www.spicyapi.com/docs/integrations. Questions: contact@spicyapi.com.
