Skip to main content
Check your API key settings, available balance, and request URL first. The steps below cover common errors when connecting an app or coding tool to Floodgate.

Complete API key setup

HTTP 409 with api_key_setup_required means the key needs routing and budget settings. Open API Keys, choose routing groups or smart routing, and set a spending limit or choose unlimited. Save the key and retry your request. You can keep the same key. The setup error does not charge your balance.

Fix authentication errors

For HTTP 401, or a 403 reporting an authentication error, check that your key is active, has not expired, and contains no extra spaces. Send it in the Authorization: Bearer YOUR_API_KEY header. A 403 with a policy error can mean a customer restriction or account cooldown. Check the error code and message before replacing your key. Account APIs use a Personal Access Token. The read-only /api/usage/token/ endpoint uses the model API key you want to inspect. For video status and downloads, use credentials from the account that created the task.

Check the request URL

For HTTP 404 or an unexpected response, check your base URL: Claude Code adds /v1/messages to its base URL. For Wan video, use the full /alibailian path in the video guide. Copy model IDs exactly, including case and punctuation. Model Square shows the API for each model. Use the request format for that API.

Set an output limit

Set max_output_tokens for Responses, max_tokens for Messages, or the model’s supported max-token field for Chat Completions. Floodgate uses the output limit to reserve funds before sending the request. An explicit limit or a model default is required.

Check your balance and key budget

Your balance and the key’s remaining budget must cover the estimated request charge. An unlimited key still spends from your account balance. A fallback group can have a different price. Check your group order and prices in API Keys.

Stay within account limits

Rate and concurrency limits apply across all your keys. Reduce parallel requests, let active requests finish, and check your current limits in Billing.

Check reseller customer IDs

Only approved resellers receive customer-level enforcement. Apply from Profile, then use the reseller integration guide. Keep each customer’s ID stable and case-sensitive across your keys and conversations. Changing it to evade a restriction violates the reseller terms. The Customers page shows restrictions and violation history, not every customer in your service.

Handle safety cooldowns and pauses

HTTP 403 with policy_account_cooldown or policy_account_escalated restricts Standard Claude/GPT across your account. Honor the expiry and Retry-After. Changing keys or conversations does not clear it. For an account outside the reseller program, one qualifying model refusal starts a one-hour cooldown. Approved resellers have separate customer and account thresholds. Refusals on other model families do not enter these Claude/GPT cooldown counters. HTTP 403 with policy_moderation_blocked means safety screening rejected the request. Revise it to comply with policy. HTTP 503 with policy_moderation_unavailable means screening could not complete; retry later. A session_blocked_by_cyber_policy refusal is not an instruction to rotate customer or conversation IDs. A 503 message saying Standard Claude/GPT is paused means the shared safety pause is active. It has no automatic expiry. A root administrator must resume access. You can use another available route that permits your request. Your customer or account cooldown expiring does not lift this pause. If a refusal arrives after a stream starts, the HTTP status already sent cannot change. Future requests can still receive a restriction error. See Reseller error handling for the full list.

Check image and speech fields

For image generation, request one image and omit stream or set it to false. The Standard group uses b64_json output and the sizes listed in the image guide. Use the Speech API for gpt-4o-mini-tts and the native Gemini API for Gemini speech. See Audio and speech for request fields and output formats.

Resume a video after a timeout

Keep the task ID returned when you submitted the video. Check its status before submitting another request. A failed task releases its reserved funds. If final usage has not arrived, funds can remain reserved. Review Task Logs and your balance history. Contact support with the task or request ID if the issue continues. Keep your API key private.

Confirm your coding tool uses Floodgate

Follow your client’s setup guide to check its configuration.

Check tool execution

Function tools run in your application or coding client. If a tool call fails, check its arguments, credentials, and returned error. See Function tools and MCP for how to connect tools and add image, speech, or video generation.