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

> Connect WyvernChat (app.wyvern.chat) to BeatAPI via Advanced Mode custom connections for pay-per-token DeepSeek, Gemini, Grok, MiniMax, and custom chat summaries.

WyvernChat (`app.wyvern.chat`) supports custom third-party endpoints inside **Advanced Mode** alongside built-in **Custom Summary Controls**. Connecting BeatAPI lets you pay strictly per token for DeepSeek, Gemini, Grok, MiniMax, GLM, and GPT models on WyvernChat without committing to a flat monthly inference subscription.

## Enable Advanced Mode and add BeatAPI

Create a dedicated BeatAPI key with a quota cap in [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys). In WyvernChat, open **API / Connection Settings**, turn on **Advanced Mode** to reveal custom endpoints, and add a **Custom / OpenAI-compatible** connection:

| WyvernChat field        | Value to enter                                                                         |
| ----------------------- | -------------------------------------------------------------------------------------- |
| **Connection Name**     | `BeatAPI`                                                                              |
| **Base URL / Endpoint** | `https://direct.beatapi.io/v1` (East/Southeast Asia: `https://api-asia.beatapi.io/v1`) |
| **API Key**             | Your BeatAPI API key                                                                   |
| **Model**               | Exact case-sensitive OpenAI-compatible BeatAPI model ID                                |

WyvernChat's custom OpenAI-compatible connection targets `POST /v1/chat/completions`, so Claude model IDs (which BeatAPI serves only on `POST /v1/messages`) return `404 not_found`. If a test call on an OpenAI-compatible model returns `404`, check whether your WyvernChat build expects the full `/v1/chat/completions` path in the Endpoint field.

## Pair main dialogue with Custom Summary Controls

* **Main dialogue**: Test connectivity at zero balance with `deepseek-v4.1-flash-free` or `glm-5.3-flash-free`, then switch to paid models such as `deepseek-v4-pro-0813`, `gemini-4-neon`, `grok-4.7`, `MiniMax-M3`, or `gpt-6.2-sol`.
* **Custom Summary Controls**: Route WyvernChat's chat summaries to a flash-tier BeatAPI model (`glm-5.3-flash` or `deepseek-v4.1-flash`) on the same BeatAPI key to keep long-chat summary costs low.
* **Output cap**: Enable **Streaming** and set `max_tokens` to `2000`–`4096` (`4096`–`8192` for reasoning models) to avoid `402 insufficient_credits` pre-check failures on small balances. Full model IDs are in the [Text API reference](/text-api) and live rates are on the [pricing page](https://beatapi.io/pricing).

## Related troubleshooting

* [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)