> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.beatapi.io/text-api/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server. # Text API > Call BeatAPI's public text models with one API key through OpenAI, Anthropic, and Gemini-compatible request formats. # Text API BeatAPI exposes public text models as a synchronous, token-metered API. Keep one BeatAPI key and choose the wire format that already matches your application. | Format | Endpoint | Best for | | ----------------------- | -------------------------------------- | ---------------------------------------------------------- | | OpenAI Responses | `POST /v1/responses` | Reasoning, tools, structured outputs, and new integrations | | OpenAI Chat Completions | `POST /v1/chat/completions` | Existing OpenAI chat integrations | | Anthropic Messages | `POST /v1/messages` | Existing Messages SDK integrations | | Gemini-compatible | `POST /v1beta/models/{model}:{action}` | Existing Gemini SDK integrations | Use `GET /v1/models` to read the models enabled for your environment. Text calls return JSON immediately or stream server-sent events; they do not create an asynchronous BeatAPI Task. #### [GPT-6.1 Sol](/text-api/gpt-6-1-sol) Coding and agent workflows with 1.05M context and Responses API examples. #### [GPT-5.6](/text-api/gpt-5-6) Choose Sol, Terra, or Luna, then copy a format-compatible request. #### [GPT-6 Astra](/text-api/gpt-6-astra) The GPT-6 Astra tier, with a higher rate above 272K input tokens. #### [Claude Sonnet 5.5](/text-api/claude-sonnet-5-5) 1M context, up to 128K output, and standard token rates across the full context window. #### [Claude Fable 5.1](/text-api/claude) Use `claude-fable-5-1` with the same four format-compatible endpoints. Also covers Claude Haiku 5.5 and its two price tiers. #### [Gemini](/text-api/gemini) Flash and Pro models through the same four endpoints. #### [Grok](/text-api/grok) Grok 4.5 and 4.6 through the same four endpoints. #### [DeepSeek](/text-api/deepseek) V4 Pro, V4.1 Flash and V4 Flash at one rate all day, plus two high-cache (HC) models that double in the weekday peak window. #### [Kimi](/text-api/kimi) K3, with a 1M-token context at one flat rate. #### [GLM](/text-api/glm) GLM 5.3 and the low-cost 5.3 Flash tier. #### [MiniMax](/text-api/minimax) M3, including a very long context tier. #### [Qwen](/text-api/qwen) Qwen 3.8 Max and 3.8 Flash. #### [MiMo](/text-api/mimo) MiMo V2.6 Flash and V2.5. #### [Hunyuan](/text-api/hunyuan) HY3 and HY4, with HY3 on its own daily peak window. > **Note** > > Store permanent BeatAPI API keys on trusted servers. The different authentication headers exist for SDK compatibility; they all identify the same BeatAPI account and USD balance. ## Errors The text endpoints keep their SDK's native error shape, so the OpenAI and Anthropic SDKs raise their usual exceptions: `{"error":{"message","type","code"}}` on `/v1/chat/completions`, `/v1/responses` and `GET /v1/models` (the code is in `error.code`, `error.type` is `beatapi_error`, and the request id is appended to the message), and `{"type":"error","error":{"type","message"}}` on `/v1/messages` (the code is in `error.type`). There are no `retryable` or `request_id` fields. The statuses, codes and English messages are the same as on every other BeatAPI endpoint: | HTTP | Code | What to do | | ----- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `400` | `bad_request` | Fix the named field; do not resend unchanged. | | `400` | `content_policy_violation` | The input was refused by moderation. Change it. | | `401` | `missing_api_key` / `invalid_api_key` | Send the key, or replace a wrong, expired, disabled, or exhausted one. | | `402` | `insufficient_credits` | Insufficient balance: top up. | | `403` | `forbidden` / `access_denied` | `forbidden`: this key or account may not use the model, for example on free credit. `access_denied`: outside the key's IP allowlist, or the model is outside the key's group. | | `404` | `not_found` | Unknown or unpriced model. List the enabled ones with `GET /v1/models`. | | `413` | `read_request_body_failed` | The body is too large. Send a smaller one. | | `429` | `rate_limit_exceeded` | Your limit was reached, or the model is at capacity ("This model is receiving too many requests"). Wait `Retry-After` seconds, then retry. | | `500` | `internal_error` | Retry once with backoff. | | `503` | `processing_unavailable` / `processing_timeout` / `processing_failed` | Retry with backoff, or use another model. Nothing was charged. | Retry only `429`, `500` and `503`. BeatAPI does not answer `502` or `504`. [Errors](/errors) has the full code table and retry policy. > Call BeatAPI's public text models with one API key through OpenAI, Anthropic, and Gemini-compatible request formats. ## Docs - [GPT-6.1 Sol API](https://docs.beatapi.io/text-api/gpt-6-1-sol.md): Use GPT-6.1 Sol for coding and agent workflows through the BeatAPI Responses API, with current token pricing and reasoning settings. - [GPT-6 Sol API](https://docs.beatapi.io/text-api/gpt-6-sol.md): Call the exact gpt-6-sol model through the BeatAPI Responses API. - [GPT-5.6 API](https://docs.beatapi.io/text-api/gpt-5-6.md): Use GPT-5.6 Sol, Terra, and Luna with OpenAI, Anthropic, or Gemini-compatible SDKs through one BeatAPI key. - [GPT-6 Luna API](https://docs.beatapi.io/text-api/gpt-6-luna.md): Call GPT-6 Luna with the exact model ID and read the native response. - [GPT-6 Astra API](https://docs.beatapi.io/text-api/gpt-6-astra.md): Call GPT-6 Astra through OpenAI, Anthropic, or Gemini-compatible SDKs with one BeatAPI key. - [Claude Sonnet 5.5](https://docs.beatapi.io/text-api/claude-sonnet-5-5.md): Claude Sonnet 5.5 model ID, context and output limits, token pricing, and a Claude Code configuration example on BeatAPI. - [Claude Haiku 4.5 API](https://docs.beatapi.io/text-api/claude-haiku-4-5.md): Call Claude Haiku 4.5 with the exact model ID and read the native response. - [Claude Haiku 5.5 API](https://docs.beatapi.io/text-api/claude-haiku-5-5.md): Call Claude Haiku 5.5 with the exact model ID and read the native response. - [Claude Opus 5 API](https://docs.beatapi.io/text-api/claude-opus-5.md): Call Claude Opus 5 with the exact model ID and read the native response. - [Claude Sonnet 5 API](https://docs.beatapi.io/text-api/claude-sonnet-5.md): Call Claude Sonnet 5 with the exact model ID and read the native response. - [Claude Fable 5.1 API](https://docs.beatapi.io/text-api/claude.md): Call Claude Fable 5.1 through OpenAI, Anthropic, or Gemini-compatible SDKs with one BeatAPI key. - [Gemini 3.6 Flash API](https://docs.beatapi.io/text-api/gemini-3-6-flash.md): Call Gemini 3.6 Flash with the exact model ID and read the native response. - [Gemini API](https://docs.beatapi.io/text-api/gemini.md): Use Gemini 3.8 Flash, 3.7 Flash, 3.6 Flash, and 3.1 Pro with OpenAI, Anthropic, or Gemini-compatible SDKs through one BeatAPI key. - [Grok API](https://docs.beatapi.io/text-api/grok.md): Use Grok 4.7, Grok 4.6, and Grok 4.5 with OpenAI, Anthropic, or Gemini-compatible SDKs through one BeatAPI key. - [DeepSeek API](https://docs.beatapi.io/text-api/deepseek.md): Use the free DeepSeek V4.1 Flash API on BeatAPI, understand its rate limits, or explicitly select a paid DeepSeek model. - [Kimi API](https://docs.beatapi.io/text-api/kimi.md): Call Moonshot AI's Kimi K3 through one BeatAPI key. - [GLM API](https://docs.beatapi.io/text-api/glm.md): Call Z.ai's GLM 5.3 and GLM 5.3 Flash through one BeatAPI key. - [MiniMax API](https://docs.beatapi.io/text-api/minimax.md): Call MiniMax M3 through one BeatAPI key, including its 512K long-context step. - [Qwen API](https://docs.beatapi.io/text-api/qwen.md): Call Alibaba's Qwen3.8 Max and Qwen3.8 Flash through one BeatAPI key. - [MiMo API](https://docs.beatapi.io/text-api/mimo.md): Call Xiaomi's MiMo V2.6 Flash and V2.5 through one BeatAPI key. - [Hunyuan API](https://docs.beatapi.io/text-api/hunyuan.md): Call Tencent's Hunyuan HY4 and HY3 through one BeatAPI key, with HY3's daily peak rate applied as published.