---
title: "RisuAI API settings for a custom OpenAI-compatible API"
canonical: https://relayswitch.io/guides/risu
generated: 2026-11-02T09:25:31.639Z
source: https://api.relayswitch.io/v1/catalog
base_url: https://api.relayswitch.io/v1
---

Checked 2026-11-02

# RisuAI custom API setup (OpenAI-compatible and Anthropic formats)

Point RisuAI's Custom API at RelaySwitch: four fields, the model id to type, and what each message costs.

The RisuAI API settings for a hosted model live in one panel: pick **Custom API** as the model, paste `https://api.relayswitch.io/v1` in **URL**, your key in **Key/Password**, and a model id in **Request Model**. RisuAI calls it a custom API; older builds and most forum posts call the same thing a reverse proxy. One key reaches every model in the catalog, from the uncensored roleplay builds to Claude, billed per token from a prepaid balance.

## 01What you need

-   RisuAI in the browser, on desktop, or the Android or iOS app.
-   A RelaySwitch key from the [console](https://app.relayswitch.io/console) (email code sign-in). Keys start with `sk-relay-`.
-   A balance. Top-ups start at $10, by card or crypto, with no subscription. Before the first top-up the console chat runs 12 free turns a day, so you can try a model there before you connect it.

## 02Where the RisuAI API settings are

1.  Open the menu (the hamburger icon, top left) and choose **Settings**.
2.  Open **Chat Bot**.
3.  Click **Model** to open the model picker.
4.  Choose **Custom API**. Older releases list it as **Reverse Proxy** or **OpenAI Reverse proxy**.

## 03The fields

The Custom API block shows these fields, in this order.

text

1`URL: https://api.relayswitch.io/v1`

2`Key/Password: sk-relay-...`

3`Request Model: glm-5.3-uncensored`

4`Format: OpenAI Compatible`

5`Response Streaming: on`

-   **URL**: `https://api.relayswitch.io/v1`, with the `/v1`.
-   **Key/Password**: your `sk-relay-` key. The placeholder reads "leave it blank if it hasn't password"; ours always needs the key.
-   **Request Model**: the exact id from the [Models page](https://relayswitch.io/models), not the display name. RisuAI does not fetch a model list, so type it.
-   **Format**: **OpenAI Compatible** (the default) for every model. The other options are OpenAI Response API, Anthropic Claude, Mistral, Google Cloud and Cohere.
-   **Response Streaming**: on, so the reply types out as it arrives. Every model streams.

The short URL works because **Autofill Request URL** (Settings > Advanced Settings) is on by default: RisuAI adds `/chat/completions` to a URL that ends in `v1`. If you turned it off, paste the full endpoint, `https://api.relayswitch.io/v1/chat/completions`.

## 04Anthropic format

For a Claude model you can switch **Format** to **Anthropic Claude**. Keep the same URL; with Autofill Request URL on, RisuAI adds `/messages` (full endpoint with it off: `https://api.relayswitch.io/v1/messages`). The key stays in **Key/Password**. RisuAI sends it as an `x-api-key` header with `anthropic-version: 2023-06-01`, and the API accepts that header as well as `Authorization: Bearer`.

text

1`URL: https://api.relayswitch.io/v1`

2`Key/Password: sk-relay-...`

3`Request Model: claude-sonnet-4-6`

4`Format: Anthropic Claude`

13 Claude ids answer the Anthropic format today, including claude-sonnet-4-6, claude-opus-5-5, claude-fable-5. Every other model on this page stays on OpenAI Compatible. The OpenAI format reaches the Claude ids too, so Anthropic Claude is optional: pick it when you want the request in Claude's own format.

## 05Which model to type

Uncensored and roleplay builds first: they answer without the stock refusals, and the roleplay ones are tuned on fiction and dialogue. Prices are per million tokens. The turn columns price one 2K-in / 300-out turn: 2,000 tokens of card, persona and recent history in, 300 tokens of reply out.

| Model | Request Model | Context | Input / M | Output / M | one 2K-in / 300-out turn | 100 turns |
| --- | --- | --- | --- | --- | --- | --- |
| [GLM-5.3 Flash Uncensored](https://relayswitch.io/models/glm-5.3-flash-uncensored) | `glm-5.3-flash-uncensored` | not stated | $0.1086 | $0.3802 | $0.00033 | $0.0331 |
| [GLM-5.3 Uncensored](https://relayswitch.io/models/glm-5.3-uncensored) | `glm-5.3-uncensored` | not stated | $0.291 | $0.873 | $0.00084 | $0.0844 |
| [Gemma 4 31B Fabled](https://relayswitch.io/models/gemma-4-31b-fabled) | `gemma-4-31b-fabled` | 262K tokens | $0.35 | $1.575 | $0.0012 | $0.1173 |
| [Gemma 4 31B Novelist](https://relayswitch.io/models/gemma-4-31b-novelist) | `gemma-4-31b-novelist` | 262K tokens | $0.35 | $1.575 | $0.0012 | $0.1173 |
| [Qwen3.8 27B Novelist](https://relayswitch.io/models/qwen3.8-27b-novelist) | `qwen3.8-27b-novelist` | 262K tokens | $0.35 | $2.10 | $0.0013 | $0.133 |
| [Cydonia 24B v4.3](https://relayswitch.io/models/cydonia-24b-v4.3) | `cydonia-24b-v4.3` | 131K tokens | $0.484 | $0.60 | $0.0011 | $0.1148 |
| [Uncensored AI Roleplay](https://relayswitch.io/models/uncensored-ai-roleplay) | `uncensored-ai-roleplay` | 128K tokens | $0.60 | $2.34 | $0.0019 | $0.1902 |
| [DeepSeek V4.1 Flash Abliterated](https://relayswitch.io/models/deepseek-v4.1-flash-abliterated) | `deepseek-v4.1-flash-abliterated` | not stated | $0.875 | $1.75 | $0.0023 | $0.2275 |
| [DeepSeek V4 Pro Uncensored](https://relayswitch.io/models/deepseek-v4-pro-uncensored) | `deepseek-v4-pro-uncensored` | not stated | $1.00 | $2.00 | $0.0026 | $0.26 |
| [MythoMax L2 13B](https://relayswitch.io/models/mythomax-l2-13b) | `mythomax-l2-13b` | 4K tokens | $0.404 | $0.404 | $0.00093 | $0.0929 |

USD, read from the RelaySwitch catalog when this page was built.

The flagships, for longer memory and stronger writing:

| Model | Request Model | Context | Input / M | Output / M | one 2K-in / 300-out turn | 100 turns |
| --- | --- | --- | --- | --- | --- | --- |
| [Claude Sonnet 4.6](https://relayswitch.io/models/claude-sonnet-4-6) | `claude-sonnet-4-6` | 1M tokens | $1.80 | $9.00 | $0.0063 | $0.63 |
| [Claude Opus 5.5](https://relayswitch.io/models/claude-opus-5-5) | `claude-opus-5-5` | 1M tokens | $2.80 | $10.00 | $0.0086 | $0.86 |
| [Claude Fable 5](https://relayswitch.io/models/claude-fable-5) | `claude-fable-5` | 1M tokens | $3.00 | $15.00 | $0.0105 | $1.05 |
| [Gemini 3.1 Pro Preview](https://relayswitch.io/models/gemini-3.1-pro-preview) | `gemini-3.1-pro-preview` | 1M tokens | $1.20 | $7.20 | $0.0046 | $0.456 |
| [DeepSeek V3.2](https://relayswitch.io/models/deepseek-v3.2) | `deepseek-v3.2` | not stated | $1.08 | $1.6801 | $0.0027 | $0.2664 |
| [Grok 4.6](https://relayswitch.io/models/grok-4.6) | `grok-4.6` | 500K tokens | $0.60 | $1.80 | $0.0017 | $0.174 |
| [GLM 5.3](https://relayswitch.io/models/glm-5.3) | `glm-5.3` | 1M tokens | $0.3276 | $1.0296 | $0.00096 | $0.0964 |
| [GPT 5](https://relayswitch.io/models/gpt-5) | `gpt-5` | 400K tokens | $2.50 | $20.00 | $0.011 | $1.10 |

USD, read from the RelaySwitch catalog when this page was built.

The [uncensored models page](https://relayswitch.io/uncensored) lists every build the catalog tags, and the [roleplay chat](https://relayswitch.io/roleplay) runs character cards in the browser on the same key.

## 06What a long chat costs

Every message resends the card and as much history as RisuAI's **Max Context Size** allows, so input grows as the chat does until it hits that cap. Per message at three context sizes, with a 300\-token reply:

| Context sent | Gemma 4 31B Fabled | GLM-5.3 Uncensored | Claude Sonnet 4.6 |
| --- | --- | --- | --- |
| 4,000 tokens | $0.0019 | $0.0014 | $0.0099 |
| 8,000 tokens | $0.0033 | $0.0026 | $0.0171 |
| 16,000 tokens | $0.0061 | $0.0049 | $0.0315 |

USD per message, read from the RelaySwitch catalog when this page was built.

100 messages at 16,000 tokens of context: $0.6073 on Gemma 4 31B Fabled, $0.4918 on GLM-5.3 Uncensored, $3.15 on Claude Sonnet 4.6.

Keep Max Context Size at or under the model's window in the Context column; MythoMax L2 13B stops at 4K tokens. The console's Usage page lists every request with its tokens and charge, and each one has a signed receipt.

## 07On Android and iOS

The app has the same settings panel as the web build: menu > Settings > Chat Bot > Model > Custom API, then the same URL, Key/Password, Request Model and Format. Paste the key from the console rather than typing it; a stray space or a missing character answers with a `401`. Streaming works the same way on mobile.

## 08Errors

RisuAI has no Connect or Test button, so the first message is the test. An error shows in the chat in place of the reply.

-   `401`: the key is wrong or revoked. Paste it again in Key/Password.
-   `402`: the balance is empty, or the key reached its own budget. Top up or raise the budget in the console.
-   `403` `scope_denied`: the key is limited to a list of models and this id is not on it. Add it to the key or use another key.
-   `404` `model_not_found`: Request Model is not an id the catalog lists. Copy it from the [Models page](https://relayswitch.io/models). `route_not_found`: the URL is wrong; with Autofill Request URL off, it must end in `/chat/completions` (or `/messages` on the Anthropic format).
-   `429`: the key hit its requests or tokens per minute limit. Wait a few seconds and resend.
-   `503`: no host could serve that model right now. Resend, or pick another model.

The [API docs](https://relayswitch.io/docs) list every error code.

## 09Sources

Field names, the Format options, the model picker path and the Autofill Request URL behavior are from RisuAI's repository on the main branch, read 2026-11-02: [src/lang/en.ts](https://github.com/kwaroran/RisuAI/blob/main/src/lang/en.ts), [BotSettings.svelte](https://github.com/kwaroran/RisuAI/blob/main/src/lib/Setting/Pages/BotSettings.svelte), [openAI/requests.ts](https://github.com/kwaroran/RisuAI/blob/main/src/ts/process/request/openAI/requests.ts), [anthropic.ts](https://github.com/kwaroran/RisuAI/blob/main/src/ts/process/request/anthropic.ts) and [database.svelte.ts](https://github.com/kwaroran/RisuAI/blob/main/src/ts/storage/database.svelte.ts) (Autofill Request URL defaults to on). The documentation site, [docs.risuai.net](https://docs.risuai.net), was unreachable on 2026-11-02, and the [GitHub wiki](https://github.com/kwaroran/RisuAI/wiki) is marked outdated by its maintainers.

## Questions

What are the best RisuAI API settings?

Custom API as the model, URL https://api.relayswitch.io/v1, your key in Key/Password, Format OpenAI Compatible, Response Streaming on, and an id from the Models page in Request Model. Then set Max Context Size at or under that model's window; it decides most of what a message costs.

Where are the RisuAI API settings on Android?

In the same place as on the web: menu > Settings > Chat Bot > Model > Custom API. The Android and iOS app share the settings panel with the browser build, so the URL, Key/Password, Request Model and Format fields are identical.

Are the RisuAI API settings in Reddit posts still right?

The fields are, the names are not. Older posts call the option Reverse Proxy or OpenAI Reverse proxy; current builds call it Custom API in the model picker. URL, Key/Password and Request Model work the same way.

Is the RisuAI wiki on GitHub up to date?

No. The GitHub wiki is marked outdated, and docs.risuai.net was unreachable on 2026-11-02. The field names on this page come from the app source on the main branch, read the same day.

What URL goes in RisuAI custom API?

https://api.relayswitch.io/v1. With Autofill Request URL on (the default), RisuAI adds /chat/completions itself, or /messages on the Anthropic Claude format. With it off, paste https://api.relayswitch.io/v1/chat/completions.

Does RisuAI work with an OpenAI-compatible proxy?

Yes. Custom API on the OpenAI Compatible format is RisuAI's proxy setting. Any endpoint that speaks the Chat Completions format works there, including RelaySwitch.

How do I test the connection in RisuAI?

Send a message. RisuAI has no Test button and does not fetch a model list, so the first reply is the test. An error code in the chat tells you which field to fix: 401 the key, 404 the model id or the URL.

Can I use Claude in RisuAI with a custom API?

Yes. Type a Claude id in Request Model and leave Format on OpenAI Compatible, or switch Format to Anthropic Claude with the same URL and key. RelaySwitch accepts the x-api-key header RisuAI sends on that format.

How much does a RisuAI message cost?

It depends on the model and how much history goes with the message. One 2K-in / 300-out turn on GLM-5.3 Flash Uncensored costs $0.00033 today, or $0.0331 for 100. A larger Max Context Size raises the input side once the chat fills it.

Related

-   [All guides](https://relayswitch.io/guides)
-   [SillyTavern](https://relayswitch.io/guides/sillytavern)
-   [JanitorAI](https://relayswitch.io/guides/janitorai)
-   [Chub](https://relayswitch.io/guides/chub)
-   [Roleplay chat](https://relayswitch.io/roleplay)
-   [Uncensored models](https://relayswitch.io/uncensored)
-   [Models and prices](https://relayswitch.io/models)
-   [How pricing works](https://relayswitch.io/pricing)
-   [Pay by card or crypto](https://relayswitch.io/pay-with-crypto)
-   [Docs](https://relayswitch.io/docs)

## Every model in one RisuAI connection

Prepaid from $10 by card or crypto. No KYC, no subscription.

[Models](https://relayswitch.io/models)[Get a key](https://app.relayswitch.io/console)

