Error Codes and Status Codes
When troubleshooting errors, check the HTTP status code, platform error message, upstream error body, and console logs together.
Common HTTP Status Codes
| Status Code | Common Meaning |
|---|---|
| 400 | Invalid request format, unsupported parameters, or invalid model parameters |
| 401 | Missing Token, invalid Token, or incorrect authentication format |
| 403 | Insufficient permissions, user group restrictions, Token model restrictions, or IP whitelist mismatch |
| 404 | Incorrect path, incorrectly concatenated Base URL, or model/resource not found |
| 409 | Login session conflict or resource state conflict |
| 413 | Request body or file too large |
| 429 | Platform or upstream rate limit triggered |
| 500 | Internal platform error |
| 502 | Abnormal upstream response or format conversion failure |
| 503 | No available channel, upstream unavailable, or system overloaded |
| 504 | Upstream timeout or gateway timeout |
Common Platform Error Categories
| Category | Example Causes |
|---|---|
| Token | Not provided, invalid, expired, quota exhausted, or unavailable |
| Channel | No available key, no available upstream, upstream saturated, or channel does not exist |
| Distributor | Token not authorized for the model, group rejected, or no available channel |
| Auth Session | Login session expired, session limit reached, or refresh Token mismatch |
| Subscription | Subscription not enabled, invalid plan, group does not exist, or purchase restriction |
Error Handling Principles
- 400, 401, 403, 404: Correct the request, authentication, or permissions first; do not retry automatically.
- 409, 413: Check the resource status or request body/file size.
- 429: Reduce concurrency and use exponential backoff with an upper limit.
- 500, 502, 503, 504: Record the Request ID, check the platform and upstream status, and switch to a backup channel when necessary.
Troubleshooting Fields
When submitting an issue, provide the request time, model name, Token name, HTTP status code, error message, Request ID, and whether the request was streamed. Do not provide the complete API Key.
