What changes when I use BeatAPI with the OpenAI SDK?
Connecting the OpenAI SDK to BeatAPI requires changing only three settings: the API key, base_url (https://direct.beatapi.io/v1), and the exact enabled model ID. Existing Chat Completions (messages) and Responses (input) code structures remain unchanged.
Minimal SDK configuration
Configure the server-side SDK client with BEATAPI_API_KEY, point base_url to https://direct.beatapi.io/v1 (which avoids Cloudflare’s 100-second limit on long text calls; https://api.beatapi.io/v1 serves as fallback), and choose an enabled model ID such as gpt-6-luna.
Verification and rollout steps
- Check enabled models: Call
GET https://api.beatapi.io/v1/modelswithAuthorization: Bearer <BEATAPI_API_KEY>when unsure which model IDs the key can reach. - Match protocol shape: Keep
messagesfor Chat Completions (POST /v1/chat/completions) andinputfor Responses (POST /v1/responses). - Enable options incrementally: After one short non-streaming request returns the expected
modeland content, turn streaming and structured output options back on one at a time. Keep permanent keys on trusted servers rather than client bundles.
Contracts and related questions
Before sending a paid request, inspect the model contracts for free: model:gpt-6-luna, model:gpt-image-2.5-flare-std.

