> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Using BeatAPI in RisuAI

> Connect RisuAI to BeatAPI through Custom API, configure Autofill Request URL, save multi-model presets under Custom Models, and bind an Auxiliary Model for HypaMemory.

RisuAI (`risuai.net`, Web / desktop / Android) exposes two separate model slots under **Settings → Chat Bot**: **Model** for main dialogue and **Auxiliary Model** for background tasks such as HypaMemory summarization and translation. Both slots connect to BeatAPI through **Custom API** using one BeatAPI API key.

## Primary Model setup and the `Autofill Request URL` toggle

Create a dedicated key in [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys), then open **Settings → Chat Bot → Model → Custom API** in RisuAI:

| RisuAI field       | OpenAI-compatible models                                                                                 | Claude models                                                                                            |
| ------------------ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Format**         | `OpenAI Compatible`                                                                                      | `Anthropic`                                                                                              |
| **URL**            | `https://direct.beatapi.io/v1` (East/Southeast Asia: `https://api-asia.beatapi.io/v1`)                   | `https://direct.beatapi.io/v1/messages` (East/Southeast Asia: `https://api-asia.beatapi.io/v1/messages`) |
| **Key / Password** | Your BeatAPI API key                                                                                     | Your BeatAPI API key                                                                                     |
| **Request Model**  | `deepseek-v4-pro-0813`, `gemini-4-neon`, `grok-4.7`, `MiniMax-M3`, `gpt-6.2-sol`, or `-free` test models | `claude-sonnet-5-5`, `claude-opus-5-5`, `claude-haiku-5-5`                                               |

RisuAI turns **Autofill Request URL** on by default and appends `/chat/completions` to `https://direct.beatapi.io/v1` under `OpenAI Compatible`. If you turned **Autofill Request URL** off, paste the full endpoint `https://direct.beatapi.io/v1/chat/completions`.

## One-click switching and HypaMemory Auxiliary Model

* **Save multiple BeatAPI models**: Open **Advanced Settings → Custom Models** in RisuAI to store separate entries (for example `claude-sonnet-5-5`, `gemini-4-neon`, and `deepseek-v4-pro-0813`) sharing one BeatAPI key.
* **Cut HypaMemory summary cost**: In **Settings → Chat Bot → Auxiliary Model**, select **Custom API** (`OpenAI Compatible`, `https://direct.beatapi.io/v1`, same key) and assign `glm-5.3-flash`, `deepseek-v4.1-flash`, or `MiniMax-M3.1-Flash`.
* **Keep `max_tokens` bounded**: Enable **Streaming** and keep **Max Response Size** at `2000`–`4096` (`4096`–`8192` for reasoning models) so small balances pass BeatAPI's pre-check. Check full IDs in the [Text API reference](/text-api) and live rates on the [pricing page](https://beatapi.io/pricing).

## Related guides and troubleshooting

* [Run a dual-model roleplay workflow](/guides/roleplay-dual-model-workflow)
* [Claude 404 in roleplay apps](/faq/roleplay-claude-404)
* [Roleplay timeouts and cut-offs](/faq/roleplay-timeout-truncation)
* [Reasoning `<think>` cut-offs & loops](/faq/roleplay-thinking-tags-cutoff)
* [402 error from oversized max_tokens](/faq/roleplay-max-tokens-402)