Gemini API
Gemini API
Four Gemini models are available through the same passthrough as the rest of the Text API, on all four request formats.
Gemini 3.x reasons by default and charges thinking tokens as output. max_tokens bounds thinking plus the visible answer together, so a small budget returns a truncated stub: at max_tokens: 150 a typical request spent 142 tokens thinking and returned four. Budget at least 1,000 output tokens for a short answer.
Recommended: Gemini-compatible content
POST https://api.beatapi.io/v1beta/models/{model}:generateContent
Send the BeatAPI key with x-goog-api-key, Bearer authentication, or the Gemini SDK-compatible key query parameter. Prefer the header for direct HTTP integrations.
Use :streamGenerateContent for the streamed variant. BeatAPI forwards the event stream without converting it.
Existing SDK formats
The same models answer on the other three request formats. Migrate an existing integration by changing the base URL and replacing the provider key with a BeatAPI key.
OpenAI Chat Completions
POST https://api.beatapi.io/v1/chat/completions
Reasoning tokens are reported under usage.completion_tokens_details.reasoning_tokens and are included in completion_tokens.
OpenAI Responses
POST https://api.beatapi.io/v1/responses
Anthropic Messages
POST https://api.beatapi.io/v1/messages
Caching
Cached input tokens are billed at one tenth of the base input rate and are reported under usage.prompt_tokens_details.cached_tokens. Google’s context-caching storage fee is not passed through — you are billed for cache reads only.
Authentication and availability
List the currently enabled text models before rollout:
The same API key and USD balance are shared across Text, Image, Video, Workflow, Effect, and Realtime APIs. Calls are metered from actual token usage; inspect request IDs, model, token totals, status, and settled amount in Dashboard usage logs.
Production checklist
- Budget output tokens for thinking, not just for the answer.
- Keep API keys on trusted servers and redact them from logs.
- Set explicit request timeouts and reconnect streamed responses safely.
- Log the response request ID for support and billing audits.
- Handle
401,402,429,502, and503as distinct operational cases.
Continue with media models
The same BeatAPI account can call GPT-5.6, Claude, Nano Banana 2, and the rest of the Image and Video APIs without adding another billing or authentication system.

