API_KEY_REQUIREDNo API key in the request
API key is required in Authorization header (Bearer scheme), x-api-key header, or x-goog-api-key header
Add Authorization: Bearer sk-… to the headers (Anthropic clients may use x-api-key)
On failure, the HTTP status gives the category and the error code (code or error.type) the exact cause. Find the matching row and follow it.
Errors caught before forwarding (key, balance) use the first format; errors during forwarding follow the endpoint you called, so clients and SDKs recognize them.
{
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "model is required"
}
}{
"error": {
"type": "invalid_request_error",
"message": "Failed to parse request body"
}
}Failures aren't billed when no usage was produced. If a stream breaks midway, what was generated is billed by actual usage; check it in Usage logs.
API_KEY_REQUIREDNo API key in the request
API key is required in Authorization header (Bearer scheme), x-api-key header, or x-goog-api-key headerAdd Authorization: Bearer sk-… to the headers (Anthropic clients may use x-api-key)
INVALID_API_KEYKey doesn't exist or is mistyped
Invalid API keyCopy the full key from API keys; watch for extra spaces or line breaks
API_KEY_DISABLEDKey is disabled
API key is disabledRe-enable it in API keys, or create a new one
API_KEY_EXPIREDKey has expired
API key 已过期Create a new key, or set a longer validity when creating it
USER_INACTIVEAccount is disabled
User account is not activeContact us to check the account status
ACCESS_DENIEDRequest IP isn't in the key's IP allowlist
Access denied. Your IP is 1.2.3.4Edit the key in API keys and update the IP limit
permission_errorThe key has no group
API key is not assigned to a groupCreate a new key in API keys and pick a group
api_key_in_query_deprecatedKey was put in the URL query
API key in query parameter is deprecated. Please use Authorization header instead.Put it in a header instead (first row)
INVALID_AUTH_RATE_LIMITEDToo many wrong-key attempts from the same network
Too many invalid authentication attempts; retry laterCheck the key, then retry in a few minutes
INSUFFICIENT_BALANCEBalance used up
Insufficient account balanceinsufficient balanceTop up in the console; usable as soon as it's credited. If you still have balance left, the cause is that expensive models are pre-estimated at the maximum output length and the estimate exceeds your balance (common with desktop agent clients): top up, or switch to a cheaper model
API_KEY_QUOTA_EXHAUSTEDThis key's own quota is used up (shown as insufficient_quota in OpenAI format)
API key 额度已用完Raise or remove the key's quota in API keys
Too many concurrent requests (status sometimes shows as 502)
Concurrency limit exceeded for user, please retry laterWait for earlier requests to finish, or lower client concurrency; contact us for a higher limit
Rate-limited upstream or the group is busy
请求太频繁或当前分组繁忙,请稍后重试。Too many requests or the group is busy, please retry shortly.Retry with a doubling wait; if it lasts, switch to another group of the same product
The request itself is wrong, usually 400. Fix the parameter and resend.
invalid_request_errorBad format or parameters, e.g. missing model, empty body, invalid JSON
model is requiredFailed to parse request bodyFix it per message and retry
invalid_request_errorThis model doesn't accept a custom temperature; common with clients like AstrBot that send one by default
claude-haiku-5-5 does not support non-default temperaturetemperature: range: 0..1Remove or turn off the temperature setting in your client; other Claude models only accept 0–1
invalid_request_errorThinking parameters don't match what this model accepts
claude-opus-5-5 does not support reasoning effort "none"; use low, medium, high, xhigh or maxclaude-opus-5-5 requires adaptive thinking; omit thinking or use thinking.type=adaptive and output_config.effortOmit thinking; use only low / medium / high / xhigh / max for reasoning effort
invalid_request_errorkimi-k3.1-pro in kimi-cloud has sampling fixed by the model service
The request is invalid: the request was rejected by an internal MaaS component. Please check the request body, required fields, and request format.Omit temperature / top_p / n / penalties, or send only official values (temperature 1 with thinking, 0.6 without; top_p 0.95). For temperature 0, use the kimi-saver group
invalid_request_errorCalled the Gemini native endpoint (/v1beta) with a non-Gemini group key
API key group platform is not geminiUse a Gemini group key, or switch to the OpenAI format /v1/chat/completions
404 and 413: wrong model name or address, or the content is too large.
model_not_foundThe model isn't in the key's group
Model "claude-fable-5" is not supported by any configured account in this groupModel "gemini-3.8-flash" is not available for this group该模型暂时不可用,请稍后重试,或换用分组内的其他模型。This model is temporarily unavailable. Please retry later or switch to another model in your group.Check the group's models on Pricing and copy the exact ID
not_found_errorThis group can't generate images
Images API is not supported for this platformUse an image group key for images
Request too large
请求内容太大,请缩短输入后重试。Request too large, please shorten the input.Request body too large, limit is 256MBShorten the input, send fewer images, or split the request
404Wrong endpoint
404 page not foundUse https://api.yuzuapi.com/v1 for OpenAI format and https://api.yuzuapi.com for Anthropic format; not /v1/v1
AstrBot connected to Claude as OpenAI Compatible gets empty replies after a few turns, still billed for the input. AstrBot sends earlier reasoning (reasoning_content) back in the chat history, and Claude refuses to answer (0 output tokens)
All chat models failed: EmptyModelOutputError: OpenAI completion has no usable output. response_id=msg_011ChWZXKWUKvk7487tesf9q, finish_reason=stopAll chat models failed: APIError: Upstream request failedAdd an Anthropic provider in AstrBot with API Base URL https://api.yuzuapi.com (no /v1) and switch the default model to it. See the AstrBot guide
403: the key's group doesn't allow this usage. Switch groups, or use a client and format the group supports.
permission_errorThe Claude Max (Claude Code only) group works only in Claude Code; AstrBot, Cherry Studio and other clients are rejected
This group is restricted to Claude Code clients (/v1/messages only)No available accounts: this group only allows Claude Code clientsFor other clients, use a Claude Max (external) or Claude official group key
permission_errorCalled an OpenAI-format group (GPT, Qwen, etc.) with the Anthropic format (/v1/messages)
This group does not allow /v1/messages dispatchUse the OpenAI format /v1/chat/completions; for Claude Code, use a Claude group key
400 / 403: the content was blocked by the model service; not a key or balance issue. Change the content, turn off client plugins, or start a new session.
invalid_request_errorContent was blocked by the model service's safety check
sensitive_words_detectedYour request was rejected by the safety system. If you believe this is an error, contact us at help.openai.com and include the request ID …Edit or remove the flagged content and retry; switching groups usually won't help
permission_errorOne request in the session was flagged by GPT as a cybersecurity risk (cyber_policy), and the model service then blocked the whole session, so everything sent in it is rejected. This is stricter than OpenAI direct, which only rejects that one request and lets you rephrase in the same session. Common in Codex for pentesting, reverse engineering or traffic capture; before 2026-11-26 Codex showed stream disconnected before completion plus Yuzu's "Request rejected" message
该会话已被网络安全策略屏蔽,请开启新会话后重试,在原会话里继续不会恢复。This session is blocked by the cyber-security policy. Start a new session; continuing this one won't work.stream disconnected before completion: YUZU: 请求被拒绝:当前分组可能不支持你使用的客户端或请求内容,请换用其他分组或联系客服。Request rejected: this group may not support your client or request. Try another group or contact support.session_blocked_by_cyber_policy该会话已被网络安全策略屏蔽,请开启新会话 / This session is blocked by cyber-security policy, please start a new sessionStart a new session instead of pressing Continue in the old one, and rephrase the task. Switching groups won't help
upstream_errorThe model service rejected the request, usually because the conversation tripped moderation. Streams return HTTP 200 with the error in an error event; sometimes the reply is just empty, which is billed for the input; contact us to check
Upstream request failed请求被拒绝:当前分组可能不支持你使用的客户端或请求内容,请换用其他分组或联系客服。Request rejected: this group may not support your client or request. Try another group or contact support.cyber_policy: This content was flagged for possible cybersecurity risk. …Clear the conversation (e.g. /reset in AstrBot), then check the persona and chat history; if even a short message fails, switch groups
404Used the website address as the endpoint (returns a web page)
The endpoint is https://api.yuzuapi.com, not https://yuzuapi.com
These come from the model service, not your key or account.
upstream_errorModel service error or connection drop (status may also be 502)
服务暂时不可用,请稍后重试;持续出现请换用其他分组或联系客服。Service temporarily unavailable. Retry later, or switch groups / contact support if it persists.Service temporarily unavailableUpstream request failedUpstream HTTP/2 stream failedRetry later; if it persists, switch to another group of the same product
api_errorEvery route in the group is unavailable or busy right now (status may also be 502 / 429)
All available accounts exhaustedNo available accounts: no available accountsRetry later; if it persists, switch to another group of the same product
Request timed out
请求超时,请稍后重试。Request timed out, please retry.Retry; turn on streaming (stream: true) for long contexts
No match. Try another keyword, or send us the full error.
A stream that drops midway is billed for what was generated; just retry. Turn on streaming (stream: true) for long tasks such as coding agents so the connection isn't dropped for lack of data and errors surface sooner.
Send us the error code, full message, the X-Request-Id response header, the time and the model. Don't send your full API key; its name or first few characters is enough.