> 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 OMate

> Connect OMate Chat to BeatAPI so one API key powers both main story dialogue and OMate's built-in long-term memory summarization.

OMate (OMate Chat) brings SillyTavern character cards, lorebooks, and presets to iOS and Android, with native **Long-Term Memory** summarization built into the app. Because OMate runs background summary calls alongside your regular turns, pairing one stronger BeatAPI model for dialogue with a flash-tier BeatAPI model for memory summaries keeps long mobile stories affordable under a single API key.

## Add BeatAPI models in OMate

Create a dedicated key in [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys), then open **Settings → API / Model Settings** in OMate and add two model entries that share that key:

| OMate slot                | Protocol                                              | Base URL                                                                | Suggested BeatAPI model ID                                      |
| ------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------- |
| Primary dialogue          | OpenAI Compatible / Custom                            | `https://direct.beatapi.io/v1` (Asia: `https://api-asia.beatapi.io/v1`) | `deepseek-v4-pro-0813`, `gemini-4-neon`, or `MiniMax-M3`        |
| Primary dialogue (Claude) | Anthropic / Claude (if supported by your OMate build) | `https://direct.beatapi.io/v1` (Asia: `https://api-asia.beatapi.io/v1`) | `claude-sonnet-5-5` or `claude-opus-5-5`                        |
| Long-Term Memory summary  | OpenAI Compatible / Custom                            | `https://direct.beatapi.io/v1` (Asia: `https://api-asia.beatapi.io/v1`) | `glm-5.3-flash`, `deepseek-v4.1-flash`, or `MiniMax-M3.1-Flash` |

Before funding your account, you can verify OMate's OpenAI-compatible entry at zero balance with `deepseek-v4.1-flash-free` or `glm-5.3-flash-free`. All model IDs are listed in the [Text API reference](/text-api) and live rates are on the [pricing page](https://beatapi.io/pricing).

## Bind the summary model and verify split usage

1. Select your primary model inside the character chat and enable **Streaming** with `max_tokens` between `2000` and `4096` (`4096`–`8192` for reasoning models). Oversized caps such as `32000` can trigger `402 insufficient_credits` on small balances.
2. In OMate's **Long-Term Memory / Summary** settings, assign the summary task to your flash-tier BeatAPI entry.
3. Send one normal dialogue turn and trigger one manual memory summary, then check `by_model` in [Dashboard → Usage](https://beatapi.io/dashboard) to confirm that both models logged separately under your OMate key.

## Related guides and troubleshooting

* [Run a dual-model roleplay workflow](/guides/roleplay-dual-model-workflow)
* [Keep long roleplay memory consistent while controlling token cost](/guides/roleplay-long-memory-cache)
* [Claude 404 in roleplay apps](/faq/roleplay-claude-404)
* [Roleplay timeouts and cut-offs](/faq/roleplay-timeout-truncation)
* [402 error from oversized max_tokens](/faq/roleplay-max-tokens-402)