Claude for roleplay: setup, budgeting, and the honest policy line.
Updated 2026-07-16
Claude is the prose ceiling of the roleplay scene: creative-writing leaderboards and community consensus agree on that, and Anthropic's content policy bounds where it applies. This page wires claude-sonnet-4-6 and its siblings into SillyTavern and RisuAI through one endpoint, budgets the 1M-token window so long stories do not bill like novels, and states the policy facts plainly so you pick Claude for the campaigns it actually fits.
Quick answer: three values in any custom-endpoint frontend.
Claude models connect to roleplay frontends the same way every catalog family does: endpoint https://api.apisrouter.com/v1, your sk-... key, and a model id, claude-sonnet-4-6 as the standard pick. Frontends differ only in whether they want the base URL or a full completions path, and the same connection serves claude-opus-4-7, claude-haiku-4-5-20251001, claude-sonnet-5, and every non-Claude id you might rotate against. For tools that speak Anthropic's own dialect instead, the gateway also serves /v1/messages: set the Anthropic-style base URL to https://api.apisrouter.com and the same key works. For SillyTavern and RisuAI the OpenAI-compatible route below is the dependable default, because one saved configuration then covers the whole catalog.
Endpoint: https://api.apisrouter.com/v1
API key: sk-... (from APIsRouter)
Model: claude-sonnet-4-6 (opus-4-7, haiku-4-5, sonnet-5 also live)Why Claude, and for which campaigns.
The case for Claude in roleplay is sentence-level craft: rhythm, subtext, restraint, dialogue that does not read like a summary of dialogue. EQ-Bench's creative-writing leaderboard, checked July 2026, places Anthropic models in its top slots, and years of SillyTavern community consensus say the same thing in plainer words: for character-driven storytelling, nothing else reads quite like it. The boundary belongs in the same paragraph as the praise. Anthropic's usage policy has prohibited sexually explicit content, fiction included, since its September 2025 update. That is not a filter quirk to prompt around; it is the written policy working as intended, and campaigns that need what it excludes should be built on models whose written policies fit, covered factually in the policies page linked below. Claude's lane is everything else: adventures, mysteries, drama, romance short of the explicit line, worldbuilding, and any campaign where prose quality is the point. Priced like the flagship it is, Claude also rewards deliberate use: most people run it as the campaign-anchor or finale model in a rotation rather than the daily driver, which the tiering section below turns into a concrete pattern.
SillyTavern setup, field by field.
The classic failure applies here too: SillyTavern appends /chat/completions itself, so pasting the full completions URL doubles the path and 404s. Stop at /v1. SillyTavern also has a native Claude source with its own proxy-URL field, and it works against Anthropic-dialect endpoints. Prefer the Custom (OpenAI-compatible) source anyway: it keeps one connection for the whole catalog, so swapping claude-sonnet-4-6 against deepseek-v4-pro mid-campaign is a dropdown change rather than a source reconfiguration. Sampler advice for Claude is unexciting on purpose: temperature around 0.85, penalties at or near zero, and let the model's own restraint do the work; heavy penalty settings degrade names and callbacks in long chats faster than they fix repetition.
- Open API Connections (the plug icon).
- Set API to Chat Completion.
- Set Chat Completion Source to Custom (OpenAI-compatible).
- Custom Endpoint (Base URL): https://api.apisrouter.com/v1, stopping at /v1 with no trailing path.
- Custom API Key: your sk-... key.
- Click Connect; the model dropdown fills from /v1/models. Pick claude-sonnet-4-6.
RisuAI setup.
In RisuAI, open Settings, go to the API tab, and pick the custom OpenAI-compatible provider rather than a named preset. Enter the key, the endpoint https://api.apisrouter.com/v1, and type claude-sonnet-4-6 into the model field, enabling the custom-model option if the id is not in the built-in dropdown; gateway ids rarely are. Field labels drift between Risu's web, desktop, and mobile builds, but the three values are constant. On the web build the browser calls the endpoint directly, so a correct-looking setup that stays silent is usually a CORS block, visible in the developer console; the desktop build is the standard workaround. Save, open any character, send one short message, and a reply confirms the round trip before you commit an evening to it.
Context budgeting on the 1M window.
The Claude catalog entries here list 1M-token context windows, which removes capacity as a constraint for any realistic story and replaces it with cost. Frontends resend the visible history every turn, so a chat allowed to grow to 100K tokens bills 100K input tokens per message thereafter, at flagship input rates. The window can hold your whole campaign; your budget should not let it. The economical shape is the same one the context-length guide below derives: a deliberate working window (16K to 32K covers long scenes generously), lorebook entries or summaries for older canon, and the card kept stable so the model's instruction-following carries continuity instead of raw history. Claude's craft actually strengthens this pattern, because well-written summaries get used well: it picks up tone and callbacks from compressed canon more gracefully than most models, so aggressive summarization costs less story than it would elsewhere. Response length is the other half: Claude fills whatever space you allow, so cap max_tokens near your preferred reply length (400 to 600 tokens for prose-heavy turns) rather than leaving it open. Output bills at the family's highest per-token rates, and unbounded replies are the quiet way an evening doubles its bill.
Tiering the family: Haiku, Sonnet, Opus.
The family's internal price ladder maps cleanly onto how campaigns actually run. claude-haiku-4-5-20251001 handles volume: ambient scenes, quick back-and-forth, group-chat filler, at the family's lowest rates and still with the house style. claude-sonnet-4-6 is the default for scenes that matter, the balance point the rest of this page assumes. claude-opus-4-7 is the finale model: set-piece scenes, chapter endings, anything you will reread. claude-sonnet-5 is the newest Sonnet-class entry, worth an A/B against 4-6 on your own scenes before adopting mid-campaign. Because all four are ids on one connection, tiering is a dropdown habit rather than infrastructure: many players downshift to Haiku for transitions and upshift for the scenes with weight, cutting the evening's bill substantially while keeping the voice consistent. The pricing table below has the exact rates; the usage log shows what your own mix costs after one session.
| Model id | Role in a campaign | Note |
|---|---|---|
| claude-haiku-4-5-20251001 | Volume scenes, quick exchanges | Lowest family rates; same house style |
| claude-sonnet-4-6 | Default for scenes that matter | The balance point most setups anchor on |
| claude-sonnet-5 | Candidate upgrade for the Sonnet slot | A/B against 4-6 before switching mid-story |
| claude-opus-4-7 | Finales and set pieces | Top rates; treat as an occasion, not a habit |
Pay-as-you-go · transparent per-model pricing
Selected models are priced below official list prices. Exact input, output, cache, and per-request prices are shown for each model.
| Model | Official Price | Our Price |
|---|---|---|
| Claude Sonnet 4.6 | $3.00 / $15.00 per M | $2.40 / $12.00 per M |
| Claude Opus 4.7 | $5.00 / $25.00 per M | $4.00 / $20.00 per M |
| Claude Haiku 4.5 20251001 | $1.00 / $5.00 per M | $0.80 / $4.00 per M |
| Claude Sonnet 5 | $2.00 / $10.00 per M | $1.60 / $8.00 per M |
| DeepSeek V4 Flash | $0.14 / $0.28 per M | $0.13 / $0.25 per M |
The policy line, stated once and plainly.
Anthropic's usage policy prohibits sexually explicit content, including in fiction, and has since September 2025. Requests through any endpoint, this gateway included, are subject to that upstream policy; routing changes where requests go, never what the model's rules permit. Frontend and platform terms apply on top, and age-appropriate use is non-negotiable everywhere. Stated as product guidance rather than warning: this makes Claude the wrong tool for exactly one lane and the best tool for most others. The policies-compared page linked below maps the whole landscape, including which families publish written allowances for mature fiction between adults, so mixed-rating campaigns can route each scene to a model whose written policy fits. That routing is a dropdown on this endpoint, which is the practical answer to the whole topic: pick per scene, within each model's lines, and none of your setup changes.
FAQ
What settings does SillyTavern need for Claude?
API: Chat Completion. Source: Custom (OpenAI-compatible). Endpoint: https://api.apisrouter.com/v1, stopping at /v1. Key: your sk-... key. Connect, then pick claude-sonnet-4-6 from the dropdown. The native Claude source with a proxy URL also works, but the custom source keeps the whole catalog on one connection.
Is Claude good for roleplay?
For prose quality it is the ceiling: creative-writing leaderboards (checked July 2026) and long-standing community consensus both put Anthropic models on top. Its written policy prohibits explicit content including fiction, so it fits safe-for-work campaigns, where nothing else reads like it.
Which Claude model should I use for roleplay?
claude-sonnet-4-6 as the default; claude-haiku-4-5-20251001 for volume scenes at the family's lowest rates; claude-opus-4-7 for finales; claude-sonnet-5 as an A/B candidate for the Sonnet slot. All four share one connection, so tiering per scene is a dropdown habit.
How much roleplay history should I send Claude per message?
Less than the 1M window invites. History is re-billed as input every turn at flagship rates, so a 16K to 32K working window plus summarized canon is the economical shape. Cap max_tokens near your target reply length too, since output bills at the family's highest rates.
Can I use the Anthropic SDK or Anthropic-dialect tools with this endpoint?
Yes. The gateway serves /v1/messages in Anthropic's dialect alongside the OpenAI-compatible surface: point the Anthropic-style base URL at https://api.apisrouter.com with the same key. For roleplay frontends the OpenAI-compatible route stays the recommended default.
Can I switch between Claude and other models mid-story?
Yes. Chat history lives in the frontend, not the model, so swapping claude-sonnet-4-6 against deepseek-v4-pro or glm-5.2 is a model-field change and the story continues. Rotation between a value daily driver and Claude for the scenes that matter is the pattern most budgets land on.