Skip to content

Error Codes ​

The HTTP status code and the message in the response body are what identify a failure. To locate a problem by symptom, see Troubleshooting.

Response Format ​

The shape of the error body depends on the entry point. Some entry points have no code or error.type field, so do not parse the body as a fixed structure.

Authentication and billing errors use a flat shape:

json
{ "code": "API_KEY_DISABLED", "message": "API key is disabled" }

OpenAI-format endpoints:

json
{ "error": { "type": "invalid_request_error", "message": "model is required" } }

Anthropic-format endpoints:

json
{ "type": "error", "error": { "type": "invalid_request_error", "message": "model is required" } }

On Gemini native endpoints, error.code is the numeric HTTP status and the error identifier appears only in message.

400 Bad Request ​

messageMeaning
model is requiredThe request body has no model field
Request body is emptyEmpty request body
Failed to parse request bodyThe body is not valid JSON
Failed to read request bodyThe body could not be read
invalid stream field typestream is not a boolean
API key in query parameter is deprecated. Please use Authorization header instead.The key was passed in the URL and must be moved to a header
Request body too large, limit is ...The body exceeds the size limit, returned as 413

Composite key prefix errors are listed in Composite Key and all return 400.

Claude Code Version ​

messageAction
Unable to determine Claude Code version. Please update Claude Code: npm update -g @anthropic-ai/claude-codeUpdate Claude Code
Your Claude Code version (...) is below the minimum required version (...)Update to the version named in the message
Your Claude Code version (...) exceeds the maximum allowed version (...)Downgrade as instructed

401 Unauthenticated ​

codemessageMeaning
API_KEY_REQUIREDAPI key is required in Authorization header (Bearer scheme), x-api-key header, or x-goog-api-key headerNone of the three auth headers were sent
INVALID_API_KEYInvalid API keyThe key does not exist, or exceeds 128 bytes
API_KEY_DISABLEDAPI key is disabledThe key has been disabled
USER_NOT_FOUNDUser associated with API key not foundThe account behind the key does not exist
USER_INACTIVEUser account is not activeThe account is deactivated

403 Forbidden ​

Account and Key ​

codemessageMeaning
API_KEY_EXPIREDAPI key 已过期The key is past its expiry date
INSUFFICIENT_BALANCEInsufficient account balanceNot enough account balance
ACCESS_DENIEDAccess denied. Your IP is ...Your IP is not permitted for this key

Groups ​

codemessageMeaning
GROUP_DELETEDAPI Key 所属分组已删除The group was deleted
GROUP_DISABLEDAPI Key 所属分组已停用The group is disabled
GROUP_DISABLED_FOR_USERAPI Key 所属公开分组已被禁用The group is unavailable to this account
GROUP_NOT_ALLOWEDAPI Key 所属专属分组不再允许当前用户使用Access to a private group was revoked

In all of these cases, create a new key on a different group. See Create API Key.

Group Capabilities ​

messageMeaning
The current group does not support the requested model "..."The model is not in that group; available models usually follow
This group does not allow Anthropic Messages requestsThe group does not allow /v1/messages
This group does not allow OpenAI Chat Completions requestsThe group does not allow /v1/chat/completions
This group does not allow OpenAI Responses requestsThe group does not allow /v1/responses
This group does not allow Gemini GenerateContent requestsThe group does not allow Gemini native endpoints
this group only allows Claude Code clientsThe group only accepts Claude Code
This group is restricted to Claude Code clients (/v1/messages only)That group is limited to /v1/messages
Image generation is not enabled for this groupImage generation is off for that group
API Key is not assigned to any group and cannot be used. Please contact the administrator to assign it to a group.The key has no group

For how groups differ, see Core Concepts.

Team ​

codemessage
TEAM_FEATURE_DISABLED团队功能未启用
TEAM_SUSPENDED团队已暂停
TEAM_MEMBERSHIP_REQUIRED团队成员关系已失效
TEAM_ACTOR_INACTIVE团队密钥所属成员已停用
TEAM_BILLING_OWNER_INACTIVE团队付款所有者已停用

See Team.

Content Moderation ​

messageMeaning
内容审计命中风险规则,请调整输入后重试The request was blocked by content moderation

Subscription ​

Subscription errors return a string containing reason=. The value of reason identifies the cause:

text
error: code=403 reason="SUBSCRIPTION_EXPIRED" message="subscription has expired" metadata=map[]
reasonMeaning
SUBSCRIPTION_EXPIREDThe subscription expired
SUBSCRIPTION_SUSPENDEDThe subscription is suspended
SUBSCRIPTION_NOT_FOUNDNo subscription found
SUBSCRIPTION_INVALIDThe subscription is invalid or expired
PREFERRED_SUBSCRIPTION_INVALIDThe chosen subscription is unavailable
PREFERRED_SUBSCRIPTION_GROUP_NOT_ALLOWEDThe chosen subscription does not cover this group

404 Not Found ​

messageMeaning
Model "..." is not supported by any configured account in this groupNo account in the group serves that model
Embeddings API is not supported for this platformThat group does not offer this endpoint
count_tokens endpoint is not supported for this platformThat group does not offer this endpoint

Copy the full model ID from the model marketplace.

429 Quota or Rate Limit ​

Quota Exhausted ​

codemessageMeaning
API_KEY_QUOTA_EXHAUSTEDAPI key 额度已用完This key's own quota is used up
-api key 5小时限额已用完The key's 5-hour rolling limit
-api key 日限额已用完The key's 1-day rolling limit
-api key 7天限额已用完The key's 7-day rolling limit
TEAM_MEMBER_DAILY_LIMIT_EXCEEDED团队成员日限额已用完Team member daily limit
TEAM_MEMBER_WEEKLY_LIMIT_EXCEEDED团队成员周限额已用完Team member weekly limit
TEAM_MEMBER_MONTHLY_LIMIT_EXCEEDED团队成员月限额已用完Team member monthly limit
-Daily usage quota exhausted for this platform.The platform's daily quota is used up
-Weekly usage quota exhausted for this platform.The platform's weekly quota is used up
-Monthly usage quota exhausted for this platform.The platform's monthly quota is used up

Subscription quota errors also return a string containing reason=, with the value DAILY_LIMIT_EXCEEDED, WEEKLY_LIMIT_EXCEEDED, or MONTHLY_LIMIT_EXCEEDED.

Rate and Concurrency ​

messageMeaningRetry-After
group requests-per-minute limit exceededGroup requests per minute exceededYes
user requests-per-minute limit exceededAccount requests per minute exceededYes
Concurrency limit exceeded for user, please retry laterYour concurrency limitNo
Concurrency limit exceeded for account, please retry laterUpstream account concurrency limitNo
Too many pending requests, please retry laterThe wait queue is fullNo
Image generation concurrency limit exceeded, please retry laterImage generation concurrency limitNo
Too many invalid authentication attempts; retry laterToo many failed auth attempts from one IPYes
Upstream rate limit exceeded, please retry laterRate limited upstreamSometimes

Wait as instructed when Retry-After is present, otherwise back off exponentially.

5xx Server Errors ​

StatusmessageMeaning
502Upstream authentication failed, please contact administratorAccount authentication failed; requires platform action
502Upstream access forbidden, please contact administratorAccount access denied; requires platform action
502Upstream service temporarily unavailableThe service is temporarily unavailable
502Upstream request failedThe request failed
502All available accounts exhaustedEvery available account was retried and failed
503Upstream service overloaded, please retry laterThe service is overloaded
503No available accountsThe group currently has no usable account
503Service temporarily unavailableAccounts are temporarily unavailable
503Billing service temporarily unavailable. Please retry later.The billing service is temporarily down
503API key authentication is temporarily unavailableAuthentication is overloaded

502 and 503 are usually transient. Retry after one or two minutes, or switch models. If they persist, report the issue as described in Troubleshooting.

TokenFlux Documentation