SupportConsole
Tickets
Navigation

Getting Started
Registration and Account SetupFirst Order: From Registration to Power-OnConsole Navigation and Common Entry PointsGetting Started: Terms and Concepts
Cloud Server Operations
Connection and Login: SSH Key, Password, VNC / noVNCUnable to Connect and Self-Service Outage TroubleshootingPower On, Shutdown, and RestartSystem Reinstallation, Public Images, and Custom ISOSnapshots and BackupsDisk Configuration and ResizingBandwidth, Traffic, and PortsIP AddressesMigration, Cloning, and Changing Data CentersCreation, Deployment, and DeliverySuspension, Deletion, and RecoveryPerformance AnomaliesCommon Console Error ReferenceUsage Limits and Common QuestionsHow to Manually Configure IPv6 in Nube CloudHow to Access Nube Cloud Virtual Machines Using SSH KeysQuotas, Credit Line, and Balance
Bare Metal Servers
Bare Metal Server (Dedicated Server / Bare Metal) RentalBare Metal Delivery and Rack InstallationBare Metal Customization and ColocationBare Metal Cancellation, Reclamation, and RefundsPioneer Program
Network, IP & Routes
Network Route Types: International Lite, International Optimized, and China OptimizedSelf-Service Network Troubleshooting: Unreachable, Packet Loss, Latency, and JitterHome Broadband IPs and Residential Broadband: Activation and TrialIP Prefix Leasing, Announcements, ASN, and RPKI RequestsChanging Network Lines, Replacing IPs, and Adjusting RoutesPort Blocking and GFW Blocking: IP Replacement, Port 25, and UnblockingTest IPs, Looking Glass, and Paid TestingCommon Network IssuesHong Kong Anti-DDoS China-Optimized Service Quota GuideWhat's the Difference Between International Lite and International Optimized?DDoS Protection and China Optimized Quota
DDoS
CDN Activation, Configuration, and MigrationCDN Plans, Renewal, and Traffic Rules
AI API
Model List, Capabilities, and AvailabilityError-Code Troubleshooting: 400, 403, 429, 503, and Thinking BlocksRate Limits, Concurrency, and Quota RulesBilling and Usage: Token Accounting, Caching, and Billing DisputesAI API Integration GuideModel Technical Notes: Deployment, Quantization, and Capabilities
Support/
Service & Products

Error-Code Troubleshooting: 400, 403, 429, 503, and Thinking Blocks

This article covers the most common AI API errors, ordered by error code from low to high, with the cause and handling for each. Before troubleshooting, remember three things:

  1. Failed requests are not billed;
  2. Providing a Request ID greatly speeds up support investigation;
  3. Errors often come from client-side message construction, and may not indicate a platform failure.

Quick lookup table

ErrorCommon causeOne-line handling
400Invalid message sequence / unsupported parameterCheck the tool_calls chain, reasoning_content replay, and unsupported fields
402Insufficient account BalanceAdd funds
403Permission or WAF blockChange network / add funds / check Key permissions
404Incorrect model nameUse the correct Model ID
429Capacity overload or Key budget exceededConfigure fallback + retry; or increase the Key budget
500Upstream exceptionRetry; if it still fails, report the Request ID
503Cluster overloadChange model/retry; see below
Content block is not a thinking blockThinking compatibilityDowngrade or change model
No deployments availableNode cooldownRetry later
budget_exceededKey budget exceededIncrease the Key budget limit

400 Bad Request

400 is the most common error, and the vast majority are caused by request content.

Cause A: Missing tool messages after tool_calls

Error message:

[invalid_request_error] An assistant message with 'tool_calls' must be followed
by tool messages responding to each 'tool_call_id'.
(insufficient tool messages following tool_calls message)

Meaning: You sent an assistant message containing tool_calls, but did not attach a corresponding role=tool message for each tool_call_id afterward.

Correct handling:

messages: [
  { "role": "user", "content": "Please query the status of order 123" },
  { "role": "assistant", "content": null,
    "tool_calls": [ { "id": "call_1", "type": "function",
                      "function": { "name": "get_order", "arguments": "{...}" } } ] },
  { "role": "tool", "tool_call_id": "call_1", "content": "{\"status\":\"shipped\"}" }
]

Troubleshooting order:

  1. Does the client correctly replay tool results (one-to-one for each tool_call_id)?
  2. Do not discard or skip any tool result, and do not truncate the history manually;
  3. Let the SDK / framework manage the message history; do not edit assistant / tool messages by hand;
  4. First verify connectivity with a single user message (no tools, no history), then gradually add history.

Cause B: reasoning_content not replayed in thinking mode

Error message:

[invalid_request_error] The reasoning_content in the thinking mode must be passed back to the API.

Handling: Replay the reasoning_content returned in the previous turn unchanged (most SDKs handle this automatically; preserve it when assembling requests manually).

Cause C: Unsupported fields

Extra inputs are not permitted — commonly caused by sending fields unsupported by the backend, such as:

  • tool_stream (unsupported; both true and false return 400)
  • thinking: {"type":"enabled"} (returns 400)
  • reasoning_effort: "minimal" (use none instead)

Valid reasoning_effort values: none / low / medium / high / xhigh / max / adaptive

Cause D: Model name does not exist / no permission

{"code":400,"message":"Bad Request","type":"invalid_request_error"}  (for example, model=kimi-k3)

Handling: Check the spelling of the Model ID (a suffix such as glm-5.3[1m] may not be recognized).


402 Payment Required

Meaning: Insufficient account Balance.

Handling:

  • Add funds and retry;
  • If the backend shows a Balance but returns 402, check whether a Key-level budget or uninvoiced charges are consuming it, and provide the Request ID to support.

Example: The client shows HTTP 402 Insufficient account Balance, but the backend has a Balance and the limit has not been exceeded — this is often a Key-level budget or billing-definition difference; support must verify it.


403 Forbidden

Two common causes:

  1. Cloudflare / WAF block: Some network egress IPs are blocked by the WAF and receive a Cloudflare block page.     - Retry through another network egress;     - Provide Ray ID / Account ID / source IP to support for allowlisting.
  2. Feature not enabled: For example, an Embeddings endpoint call returns 403 because it is not yet available.

Console operations can also return 403 (such as disabling an API Key); this is a permission/interface issue and requires support handling.


404 / Model does not exist

Model call failed. The named model does not exist.
There's an issue with the selected model (glm-5.3[1m]). It may not exist or you may not have access to it.

Handling:

  • Copy the exact Model ID from the Console;
  • Call GET /v1/models to check the available list;
  • Do not add suffixes such as [1m] yourself.

429 Too Many Requests

429 has two completely different sources; distinguish them before handling.

Source A: Key budget exceeded (budget_exceeded)

{"error": {"message": "... budget_exceeded ...", "code": 429}}

Characteristics:

  • Playground remains usable (Playground does not use this Key's budget);
  • The backend account has a Balance, but the Key's own max_budget has been reached.

Handling: Console → AI → API Management → find the Key → increase the Key-level max budget above the account Balance.

Source B: Capacity overload (node cooldown)

HTTP 429
{"error":{"code":429,"message":"No deployments available"}}

Characteristics:

  • Appears in concentrated bursts during peak hours, with different behavior across models (GLM-5.3 may be normal in the same window);
  • A platform capacity issue, not throttling of your account.

Handling:

  1. Switch to Agent (automatically avoids unhealthy nodes);
  2. Configure a fallback model (such as glm-5.3 / kimi-k2.6);
  3. Set client timeout to 120s and retries to ≤2, with exponential backoff (2s → 4s → 8s);
  4. 429: retry according to the response or the client’s bounded backoff policy;
  5. Failed requests are not billed.

Background: Current 429/503 errors mainly come from backend compute-capacity overload, which is a platform-side capacity issue.


500 Internal Server Error

Meaning: Upstream exception.

HTTP 500
{"error":{"message":"upstream error: do request failed"}}

Handling:

  • Retry first;
  • If it continues to fail, provide time (including time zone) + Request ID to support;
  • If some Console pages (such as AI API Logs / usage / team/list) return 500, it is a Console display issue and support must follow up.

Note: If logs show "success" but the client reports an error, use the Request ID and ask support to check the details.


503 Service Unavailable / Service Overload

HTTP 503
{"error":{"code":503,"message":"Service Overload"}}

Meaning: Backend deployment overload (capacity issue).

Handling:

  1. Wait briefly and retry (there is often strong time-of-day variation, with heavier daytime/evening peaks);
  2. Change model (for example, GLM-5.3 / Kimi K2.6 has more available compute);
  3. Configure fallback + retry with backoff;
  4. Follow the platform's capacity-expansion progress.

When compute is tight during peak hours, some popular models may experience compute shortages, throttling, and 429 errors. Configure fallback and backoff retries.


Thinking-block errors

API Error: Content block is not a thinking block

Background: Some clients (such as Claude Code) parse the model's thinking block in Anthropic format. This error occurs when the platform response is not a thinking block.

Related compatibility issues:

SymptomDescription
thinking: {"type":"disabled"} returns 200 but still sends reasoning_contentThinking is not actually disabled
Passing tool_stream returns 400Field unsupported
Responses API returns missing field 'summary'Insufficient response-format compatibility
Cannot specify thinking depth / deep thinking continues after disabling itThe current backend is a thinking model; the minimum is only low

Recommendations:

  • Switch to a more compatible client or use OpenAI-compatible mode;
  • Use reasoning_effort: "none" (if rejected, use low);
  • To retain thinking, use thinking: {"clear_thinking": false} (without type);
  • If the client depends heavily on the thinking format, consider a natively compatible model.

Infinite loops / abnormal token consumption

Symptom: A request consumes far more than expected, or the cost is unusually high.

Common causes (client behavior, not a platform failure):

  • Coding Agent infinite loop: For example, Codex Desktop resends the entire conversation history on every loop iteration without context compression; prompt tokens grow from 50,000 to 130,000 while output remains minimal.
  • Single oversized input: For example, a single kimi-k3 submission of approximately 900,000 input tokens is billed by token and costs approximately 1.49 USD.
  • Oversized output: A single non-streaming request generates 12,000+ tokens and may take several minutes.

Handling:

  1. Stop the session that has entered an infinite loop;
  2. Set max_budget for the Key/model;
  3. Request a lower RPM/TPM rate limit as a safeguard;
  4. Use streaming output to improve the experience and limit each output's length.

Appeal: If the charge is genuinely abnormal, provide the Request ID to support for detail verification.


Information to provide when reporting an error

To speed up investigation, include the following in the ticket:

ItemDescription
TimeInclude the time zone, for example 2026-08-30 21:15 (UTC+8)
Request IDMost important: the long string in the logs
Error summaryKeep the HTTP code, necessary error.code / error.message, trace or Request ID, time, model name, and network details only when needed. Remove Authorization, API Key, Token, Cookie, password, private key, login code, and unrelated personal or business data.
Model IDFor example, deepseek-v4.1-flash
ClientOpenCode / Claude Code / custom program + version
Key aliasHelps identify which Key it was

Do not paste the full Key into a ticket; provide the alias only. If it has been exposed, rebuild it immediately.

Related articles

  • Integration guide: AI API Integration Guide
  • Models and availability: Model List, Capabilities, and Availability
  • Rate limits and concurrency: Rate Limits, Concurrency, and Quota Rules
  • Billing and usage: Billing and Usage: Token Definitions, Caching, and Billing Appeals