> 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 AI Phone and Chat Simulators

> Connect browser-based AI phone simulators and WeChat-style roleplay pages to BeatAPI with strict per-key quota caps, three URL path formats, and fast short-bubble models.

Browser-based AI phone simulators and WeChat-style roleplay pages (such as open-source phone UIs, simulated Moments feeds, and lightweight Tavern forks) send OpenAI Chat Completions requests (`POST /v1/chat/completions`) straight from your browser. Because community forks differ on URL formatting and keep API keys inside browser `localStorage`, connecting BeatAPI safely comes down to two things: a low-quota disposable key and matching the fork's URL suffix.

## Protect your balance with a capped disposable key

Before pasting a key into any third-party hosted simulator page, create a dedicated key in [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys) with a **hard quota cap of $2–$5**. Never reuse an uncapped account key in a browser page. When you stop using a hosted simulator fork, revoke that key immediately in the dashboard.

## Match the simulator's Base URL convention

Community phone simulators use one of three URL-joining styles. Start with the first row; if a test bubble returns `404`, switch to the second or third row:

| How the simulator builds the request     | Value to enter in API Base URL                                                                                           |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Appends `/chat/completions` (most forks) | `https://direct.beatapi.io/v1` (East/Southeast Asia: `https://api-asia.beatapi.io/v1`)                                   |
| Appends `/v1/chat/completions`           | `https://direct.beatapi.io` (East/Southeast Asia: `https://api-asia.beatapi.io`)                                         |
| Expects the full endpoint URL            | `https://direct.beatapi.io/v1/chat/completions` (East/Southeast Asia: `https://api-asia.beatapi.io/v1/chat/completions`) |

Because OpenAI-only simulators target `/v1/chat/completions`, entering a BeatAPI Claude model ID (served only on `POST /v1/messages`) returns `404`.

## Pick fast models and a short `max_tokens` cap

Phone simulators generate rapid, short turns (stacked chat bubbles, group banter, and simulated social-feed comments) where latency matters more than 2,000-word prose:

* **Zero-balance test**: `deepseek-v4.1-flash-free` or `glm-5.3-flash-free`.
* **High-frequency bubbles & social feeds**: `MiniMax-M3.1-Flash` or `glm-5.3-flash`.
* **Longer emotional chats & group threads**: `deepseek-v4-pro-0813`, `MiniMax-M3`, or `gemini-4-neon`.

Set `max_tokens` to `1000`–`2048` (short chat bubbles do not need large output caps, and oversized caps trigger `402 insufficient_credits` on a $2–$5 capped key). 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)
* [402 error from oversized max_tokens](/faq/roleplay-max-tokens-402)