RisuAI API setup: endpoint, key, and model ID
Updated 2026-07-15
In RisuAI, open Settings > API, pick the custom OpenAI-compatible provider instead of a named preset, and fill in three values: your API key, the endpoint https://api.apisrouter.com/v1, and the exact model ID typed into the custom-model field since new gateway models rarely appear in the built-in list. Save the provider and send one test message; a reply confirms all three are correct.
Quick answer: the three fields RisuAI needs
RisuAI's Settings panel lists a handful of named providers (OpenAI, Claude, Google, and a few others), plus a custom entry built for exactly this: pointing the app at any OpenAI-compatible chat completions API. Open the gear icon, go to the API tab, choose the custom or OpenAI-compatible provider instead of a named preset, and fill in three values. Field labels shift slightly across RisuAI's web, desktop, and mobile builds, and between versions, but the same three values apply everywhere: a key, an endpoint, and a model ID typed exactly. Save the provider, open any character, and send one short test message. A reply back confirms all three are right; anything else narrows down to one of them, and the sections below work through each in order.
Provider: Custom / OpenAI-compatible
API key: sk-... (no quotes, no trailing space)
Endpoint: https://api.apisrouter.com/v1
Model: deepseek-v4-flash (type the exact ID; enable the custom-model field if it isn't in the dropdown)How RisuAI actually sends your requests
The web-build detail matters most when something fails silently. Because your browser is the one making the call, a provider that does not return permissive cross-origin headers can block the request at the browser level with a CORS error in the developer console, which looks nothing like a normal 401 or 404 and is easy to mistake for a bad key. If a fresh key and a correct endpoint still produce no reply on the web app, that is the first thing to rule out. The desktop build is a reasonable next step, since it is not bound by the same browser security model.
- Web build: your browser tab calls the API endpoint directly. There is no server of yours sitting in between, unlike SillyTavern's local Node process.
- Desktop and mobile builds: the same request goes out from the installed app instead of a browser tab, which sidesteps some browser-only restrictions.
- Model list: the dropdown only tracks a fixed set of well-known hosted APIs by name. A gateway-issued ID like deepseek-v4-flash or glm-5 has to go into the free-text model field, not be picked from a list that doesn't know it exists.
- Character card, persona, and any loaded lorebook or module text: all of it rides along as part of the prompt on every single turn, not just when the chat starts.
Which model ID to type, and why
The endpoint and key stay identical no matter which model you pick, so the only value that changes per character or per mood is the model field. For roleplay specifically, a handful of models come up often enough in general community discussion to be worth naming, each with its own tradeoffs and its own content policy.
| Model ID (type exactly) | Why pick it | Content policy notes |
|---|---|---|
| deepseek-v4-flash | Lowest cost in this table; a common default for long, casual chats | Accommodates fictional content |
| deepseek-v4-pro | Same family, steadier recall across long cards and group scenes | Same policy as Flash |
| glm-5 | Distinct prose voice on a budget | Accommodates fiction |
| kimi-k2.6 | Strong recall and consistent prose across long cards | Accommodates fiction |
| grok-4.5 | Distinct voice; xAI's published policy permits mature fictional themes | Review xAI's policy for specifics |
| claude-sonnet-4-6 | Strong prose quality per dollar | SFW creative writing only; Anthropic prohibits explicit content |
| claude-opus-4-7 | Highest prose and characterization quality here | Same SFW-only policy as Sonnet |
| gemini-3.5-flash | Fast, capable all-rounder | Standard Google policy applies |
What a month of RisuAI roleplay actually costs
Roleplay bills are input-heavy because the active character card, persona, and any loaded module text get resent with every message, not just once. A detailed card plus a module or two commonly puts a single turn somewhere around 4,000 to 6,000 input tokens with a 200 to 400 token reply. The table below prices 1,000 messages at 5,000 input and 300 output tokens each, a heavy month for most single-character chats. Treat it as a ballpark: a slimmer card or fewer modules pulls every row down, and a large lorebook pulls them up. The prices below are APIsRouter's catalog rates: pay-as-you-go, no subscription, global models priced below official list.
| Model | Price per 1M tokens (in / out) | Est. cost per 1,000 messages |
|---|---|---|
| deepseek-v4-flash | $0.126 / $0.252 | ~$0.71 |
| deepseek-v4-pro | $0.3915 / $0.783 | ~$2.19 |
| glm-5 | $0.514 / $2.314 | ~$3.27 |
| kimi-k2.6 | $0.855 / $3.60 | ~$5.36 |
| gemini-3.5-flash | $1.20 / $7.20 | ~$8.16 |
| grok-4.5 | $1.60 / $4.80 | ~$9.44 |
| claude-sonnet-4-6 | $2.40 / $12.00 | ~$15.60 |
| claude-opus-4-7 | $4.00 / $20.00 | ~$26.00 |
Why RisuAI connections and bills surprise people
None of these are exotic. They are the same handful of mistakes that trip up every custom-endpoint setup, RisuAI included, and every one of them is checkable in a minute or two with the comparison and the tests further down this page.
- Endpoint path confusion: some fields want the base URL, others want the full completions path, and RisuAI does not always match whatever convention a different frontend already trained you on.
- The custom-model toggle gets missed: without it, the field quietly keeps whatever built-in model was last selected instead of the ID you just typed.
- A trailing space or line break in a pasted key: invisible until the very first request comes back unauthorized.
- Large or multiple lorebook modules: they load once per character but resend on every turn, so a card that feels reasonable on first read bills like a much longer prompt by turn fifty.
- Switching models mid-chat and forgetting to re-check the field: a later message can silently run on a different model than the one you meant to compare.
- No running cost meter inside RisuAI itself: nothing in the app totals up spend, so the surprise usually shows up on the provider's own billing page, not inside the chat window.
RisuAI vs SillyTavern vs JanitorAI: same job, different fields
All three are companion front ends for chatting with a character, and all three can point at the same OpenAI-compatible model IDs. What differs is where each one runs and what shape it wants the connection details in, which is the actual source of most "it worked in one app but not the other" confusion.
| Frontend | Where it runs | Endpoint field wants | Model selection |
|---|---|---|---|
| RisuAI | Web app (browser-direct calls), plus desktop and mobile builds | Base URL in most builds; confirm against the field's own placeholder text | Built-in list plus a free-text field for custom IDs |
| SillyTavern | A local Node.js server you run yourself, with a browser UI on top | Base URL ending at /v1; SillyTavern appends the rest itself | Dropdown auto-populates live from /v1/models |
| JanitorAI | Hosted website only, no local install | Full path ending at /chat/completions | Typed exact model ID, no auto-populated list |
Fixing a RisuAI connection that will not answer
Work through these before assuming a model or the API itself is broken. In practice, a wrong field or a stray character explains the large majority of connections that never send a first message.
- Test outside RisuAI first. A plain curl call to the same endpoint and key rules out RisuAI's own settings entirely: if curl gets a reply and RisuAI does not, the problem is a field inside the app, not the key or the provider.
- Turn on the custom-model field before typing an ID that is not in the built-in list, then re-check it after saving; some builds reset the field.
- If a saved config returns 404s, try the endpoint both ways: base URL alone, and base URL with /chat/completions appended. Whichever one the build does not expect returns a routing error, not a helpful message.
- Re-paste the key with no leading or trailing whitespace, and confirm it still starts with sk-, if a request that worked yesterday suddenly comes back unauthorized.
- Keep custom prompts and lorebook modules short. They are resent on every turn, so trimming them is the single biggest lever on a chatty month's bill, ahead of model choice.
- If the per-message math above looks high for a model you like, the same model ID is usually available through more than one OpenAI-compatible gateway at a different rate; the model IDs in the table above are the exact strings to type wherever you land.
curl https://api.apisrouter.com/v1/chat/completions \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Say ready."}],
"max_tokens": 20
}'FAQ
How do I connect RisuAI to a custom API?
Open Settings > API, choose the custom or OpenAI-compatible provider entry instead of a named preset, and fill in three values: your API key, the endpoint, and the model ID. Type the model ID exactly; RisuAI's built-in dropdown only tracks a fixed set of well-known hosted models by name.
Why doesn't my model show up in RisuAI's dropdown?
The dropdown only lists a fixed set of well-known hosted models. Anything outside that list, including most gateway-issued IDs, needs the app's free-text or custom-model field rather than a dropdown pick. Type the exact ID and re-check it after saving, since some builds reset the field.
Why do I get a network or CORS error in RisuAI's web app?
RisuAI's web build calls the API directly from your browser tab rather than through a server, so a provider that does not send permissive cross-origin headers can be blocked at the browser level. That shows up as a CORS error in the developer console, not a normal 401 or 404. If it happens on the web app, try the desktop build next; it is not bound by the same browser security rules.
What is the best model for RisuAI roleplay?
DeepSeek V4 Flash is a common budget default for long, casual chats, with V4 Pro a step up for complex cards. GLM-5 and Kimi K2.6 are solid value picks with their own prose voice. Claude writes the strongest prose here but Anthropic's policy limits it to SFW creative writing, and Grok's published policy is the one that explicitly permits mature fictional themes.
Is RisuAI free to use?
RisuAI itself is free, open-source software across its web, desktop, and mobile builds. What you pay for is whichever model API you connect it to, billed per token by that provider. Budget models cost a fraction of a cent per message, so a small top-up covers a long stretch of casual chatting.
What is the cheapest way to run RisuAI roleplay chats?
Point RisuAI at a budget model like deepseek-v4-flash through an OpenAI-compatible gateway rather than a flagship model. APIsRouter is one option: pay-as-you-go with no subscription, global models priced 20% below official list, and a no-signup checkout at /topup that emails the key after payment.