Troubleshooting

Troubleshooting

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.

Based on Yuzu's actual responses · checked 2026-11-26

Response format

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"
}

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.

1. API key and account

401
API_KEY_REQUIRED

No 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)

Fix firstNot charged
401
INVALID_API_KEY

Key doesn't exist or is mistyped

  • Invalid API key

Copy the full key from API keys; watch for extra spaces or line breaks

Fix firstNot charged
401
API_KEY_DISABLED

Key is disabled

  • API key is disabled

Re-enable it in API keys, or create a new one

Fix firstNot charged
403
API_KEY_EXPIRED

Key has expired

  • API key 已过期

Create a new key, or set a longer validity when creating it

Fix firstNot charged
401
USER_INACTIVE

Account is disabled

  • User account is not active

Contact us to check the account status

Fix firstNot charged
403
ACCESS_DENIED

Request IP isn't in the key's IP allowlist

  • Access denied. Your IP is 1.2.3.4

Edit the key in API keys and update the IP limit

Fix firstNot charged
403
permission_error

The key has no group

  • API key is not assigned to a group

Create a new key in API keys and pick a group

Fix firstNot charged
400
api_key_in_query_deprecated

Key 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)

Fix firstNot charged
429
INVALID_AUTH_RATE_LIMITED

Too many wrong-key attempts from the same network

  • Too many invalid authentication attempts; retry later

Check the key, then retry in a few minutes

Fix firstNot charged

2. Balance and quota

403
INSUFFICIENT_BALANCE

Balance used up

  • Insufficient account balance
  • insufficient balance

Top 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

Fix firstNot charged
429
API_KEY_QUOTA_EXHAUSTED

This 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

Fix firstNot charged

3. Too fast or too many

429

Too many concurrent requests (status sometimes shows as 502)

  • Concurrency limit exceeded for user, please retry later

Wait for earlier requests to finish, or lower client concurrency; contact us for a higher limit

Retry OKNot charged
429

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

Retry OKNot charged

4. Request content

Request format and parameters5

The request itself is wrong, usually 400. Fix the parameter and resend.

400
invalid_request_error

Bad format or parameters, e.g. missing model, empty body, invalid JSON

  • model is required
  • Failed to parse request body

Fix it per message and retry

Fix firstNot charged
400
invalid_request_error

This 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 temperature
  • temperature: range: 0..1

Remove or turn off the temperature setting in your client; other Claude models only accept 0–1

Fix firstNot charged
400
invalid_request_error

Thinking parameters don't match what this model accepts

  • claude-opus-5-5 does not support reasoning effort "none"; use low, medium, high, xhigh or max
  • claude-opus-5-5 requires adaptive thinking; omit thinking or use thinking.type=adaptive and output_config.effort

Omit thinking; use only low / medium / high / xhigh / max for reasoning effort

Fix firstNot charged
400
invalid_request_error

kimi-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

Fix firstNot charged
400
invalid_request_error

Called the Gemini native endpoint (/v1beta) with a non-Gemini group key

  • API key group platform is not gemini

Use a Gemini group key, or switch to the OpenAI format /v1/chat/completions

Fix firstNot charged

Model, endpoint and request size5

404 and 413: wrong model name or address, or the content is too large.

404
model_not_found

The model isn't in the key's group

  • Model "claude-fable-5" is not supported by any configured account in this group
  • Model "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

Fix firstNot charged
404
not_found_error

This group can't generate images

  • Images API is not supported for this platform

Use an image group key for images

Fix firstNot charged
413

Request too large

  • 请求内容太大,请缩短输入后重试。Request too large, please shorten the input.
  • Request body too large, limit is 256MB

Shorten the input, send fewer images, or split the request

Fix firstNot charged
404
404

Wrong endpoint

  • 404 page not found

Use https://api.yuzuapi.com/v1 for OpenAI format and https://api.yuzuapi.com for Anthropic format; not /v1/v1

Fix firstNot charged
200

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=stop
  • All chat models failed: APIError: Upstream request failed

Add 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

Fix firstNot charged

Group and client limits2

403: the key's group doesn't allow this usage. Switch groups, or use a client and format the group supports.

403
permission_error

The 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 clients

For other clients, use a Claude Max (external) or Claude official group key

Fix firstNot charged
403
permission_error

Called an OpenAI-format group (GPT, Qwen, etc.) with the Anthropic format (/v1/messages)

  • This group does not allow /v1/messages dispatch

Use the OpenAI format /v1/chat/completions; for Claude Code, use a Claude group key

Fix firstNot charged

Content moderation and safety policy4

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.

400
invalid_request_error

Content was blocked by the model service's safety check

  • sensitive_words_detected
  • Your 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

Fix firstNot charged
403
permission_error

One 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 session

Start a new session instead of pressing Continue in the old one, and rephrase the task. Switching groups won't help

Fix firstNot charged
403
upstream_error

The 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

Fix firstNot charged
404
404

Used the website address as the endpoint (returns a web page)

The endpoint is https://api.yuzuapi.com, not https://yuzuapi.com

Fix firstNot charged

5. Model service

These come from the model service, not your key or account.

503
upstream_error

Model 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 unavailable
  • Upstream request failed
  • Upstream HTTP/2 stream failed

Retry later; if it persists, switch to another group of the same product

Retry OKNot charged
503
api_error

Every route in the group is unavailable or busy right now (status may also be 502 / 429)

  • All available accounts exhausted
  • No available accounts: no available accounts

Retry later; if it persists, switch to another group of the same product

Retry OKNot charged
504

Request timed out

  • 请求超时,请稍后重试。Request timed out, please retry.

Retry; turn on streaming (stream: true) for long contexts

Retry OKNot charged

Stream interrupted

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.

Still stuck?

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.

Contact us →