---
title: "RisuAI integration"
description: "Settings for using RisuAI with MiniRouter."
canonical_url: "https://minirouter.sh/docs/integrations/risuai"
markdown_url: "https://minirouter.sh/docs/integrations/risuai.md"
last_updated: "2026-09-26"
---

# RisuAI

Chat with any MiniRouter model in RisuAI.

[Get a key](https://minirouter.sh/key)

[RisuAI](https://github.com/kwaroran/Risuai) is a character chat app for the web, desktop or your own server. Its Custom API model runs on any chat model in the [catalog](https://minirouter.sh/models), or the curated [roleplay list](https://minirouter.sh/models/roleplay), from one balance. See [Roleplay](https://minirouter.sh/use/roleplay) for data handling and accountless keys.

> **Note:** Every turn re-sends the card, lore and history. Input is most of the bill, so compare input rates. See [Cost per message](https://minirouter.sh/guides/roleplay-cost-per-message).

## Quick start

### 1. Open RisuAI

**Web**

Open [risuai.net](https://risuai.net). Nothing to install.

**Desktop**

Download the app from [GitHub Releases](https://github.com/kwaroran/Risuai/releases).

**Docker**

```sh
curl -L https://raw.githubusercontent.com/kwaroran/Risuai/refs/heads/main/docker-compose.yml | docker compose -f - up -d
```

Then open `http://localhost:6001`.

### 2. Create a key

[Create a key](https://minirouter.sh/key). Optionally test it before opening RisuAI.

```sh
export MINIROUTER_KEY=mr-live-YOUR-KEY-HERE
curl https://api.minirouter.sh/v1/chat/completions \
  -H "Authorization: Bearer $MINIROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"zai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}]}'
```

> **Tip:** Give RisuAI its own key, so its spend shows separately in [Usage](https://minirouter.sh/dashboard/usage) and a limit stops only RisuAI.

### 3. Connect

Open Settings → Chat Bot → Model → Custom API and fill in:

| Setting | Value |
| --- | --- |
| `Model` | Custom API |
| `URL` | `https://api.minirouter.sh/v1`. Autofill Request URL is on by default and appends /chat/completions. With it off, enter the full URL ending in /chat/completions. |
| `Key/Password` | `mr-live-… (your key)` |
| `Request Model` | `zai/glm-5.3-flash` |
| `Format` | OpenAI Compatible |

### 4. Send a message

Chat with any character, then open [Activity](https://minirouter.sh/dashboard/activity). The request lists its model, tokens and exact cost.

## Switch models

Request Model takes any model ID.

| Request Model | Answers with |
| --- | --- |
| `minirouter/auto:roleplay` | A long-context, low-input-cost model [Auto](https://minirouter.sh/docs/auto-router) picks. |
| `@preset/your-slug` | Your saved [preset](https://minirouter.sh/docs/presets), with up to three models as [fallbacks](https://minirouter.sh/docs/model-fallbacks). |

> **Note:** RisuAI sends its own system prompt, which replaces a preset's saved instructions. Use presets for models and fallbacks. Create one in [Presets](https://minirouter.sh/dashboard/presets).

## Use a cheaper auxiliary model

The Auxiliary Model handles emotion images and suggestions. With Custom API it uses your chat model. Give it a cheaper one:

### 1. Add

Settings → Advanced Settings → Custom Models → +.

### 2. Fill

| Field | Value |
| --- | --- |
| Name | Any label, such as `MiniRouter Flash`. |
| URL | `https://api.minirouter.sh/v1/chat/completions` |
| Request Model | `deepseek/deepseek-v4-flash-0731` |
| Format | `OpenAICompatible` |
| Key/Password | Your key. |

> **Warning:** Custom Models send to the URL exactly as typed. Include `/chat/completions`.

### 3. Pick

Choose it under Chat Bot → Auxiliary Model.

## Size each turn

| Setting | Does |
| --- | --- |
| Max Context Size | Most RisuAI sends as the prompt. Lower it to cut input cost. |
| Max Response Size | Most the model writes back. |

Keep Max Context Size below the window on the model's page in [Models](https://minirouter.sh/models). A prompt over the window fails with [`context_too_long`](https://minirouter.sh/docs/errors#context_too_long).

## Keep spend in check

- [Own key](https://minirouter.sh/dashboard/keys): One key for RisuAI.
- [Spend cap](https://minirouter.sh/docs/rate-limits): Daily or monthly limit on that key.
- [Activity](https://minirouter.sh/dashboard/activity): Every request and its cost.

Every reroll is a new, billed request.

## Recommended models

| Model | Why |
| --- | --- |
| [`zai/glm-5.3-flash`](https://minirouter.sh/models/zai/glm-5.3-flash) | Best current intelligence/input-cost balance with a 1M-token window. |
| [`openai/gpt-5.6-luna`](https://minirouter.sh/models/openai/gpt-5.6-luna) | High-intelligence alternative with a 1.05M-token window. |
| [`deepseek/deepseek-v4-flash-0731`](https://minirouter.sh/models/deepseek/deepseek-v4-flash-0731) | Lowest input rate on this list for repeatedly sent chat history. |
| [`google/gemini-3.8-flash`](https://minirouter.sh/models/google/gemini-3.8-flash) | Higher-cost multimodal alternative with a 1M-token window. |

Browse every model in the [catalog](https://minirouter.sh/models).

## Troubleshooting

### Requests fail only after the chat gets long

The character card, the lore book and the whole history are re-sent every turn, so a thread that worked at message 20 can exceed the window at message 200. Pick a longer-context model or trim the lore book.

Error: [400 `context_too_long`](https://minirouter.sh/docs/errors#context_too_long).

### 404, HTML, or a parse error on every request

Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.

Error: [400 `invalid_request`](https://minirouter.sh/docs/errors#invalid_request).

### 401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error: [401 `invalid_api_key`](https://minirouter.sh/docs/errors#invalid_api_key).

### Response stops mid-sentence with a credits message

Balance hit $0 mid-stream. The stream ends with a terminal error naming the exact charge for tokens delivered — never a silent close.

Error: [402 `insufficient_credits`](https://minirouter.sh/docs/errors#insufficient_credits).

Every error code, with its fix: [Errors](https://minirouter.sh/docs/errors).

## Next steps

- [Roleplay](https://minirouter.sh/use/roleplay): Models, privacy and accountless use.
- [Cost per message](https://minirouter.sh/guides/roleplay-cost-per-message): What a long chat costs.
- [Presets](https://minirouter.sh/docs/presets): Save a model and its settings under one name.
