The API uses standard HTTP status codes to indicate the success or failure of an API request.
Important: While the HTTP status code indicates the transport status, the specific business logic result is defined by the code field in the response body.Please always refer to the msg field in the response JSON for the specific error message and details.
HTTP Status Codes
These are the general HTTP status codes used by the API to indicate the connection or request status.
| HTTP Code | Meaning | Description |
|---|
| 200 | OK | Request successful (includes synchronous results or successful submission of asynchronous tasks). |
| 400 | Bad Request | Invalid parameters (e.g., missing required fields, JSON format error). Corresponds to business codes 100xxx. |
| 401 | Unauthorized | Authentication failed (missing, invalid, or revoked API Key). Corresponds to 401xxx. |
| 402 | Payment Required | Insufficient quota, balance exhausted, or plan expired. Corresponds to 402xxx. |
| 403 | Forbidden | Access denied (e.g., account frozen, banned App ID, or accessing unauthorized resources). |
| 404 | Not Found | Resource not found (invalid API path). Corresponds to 404xxx. |
| 413 | Payload Too Large | Uploaded file size exceeds the system limit. |
| 429 | Too Many Requests | Rate limit exceeded (QPS limit). Corresponds to 429xxx. |
| 500 | Internal Server Error | System internal error. Corresponds to 5xxxx. |
Business Error Codes
The code field in the JSON response represents the specific business error.
| Code | Message |
|---|
| 0 | Success |
| 100001 | Request parameter binding failed |
| 100002 | Parameter validation failed (e.g., model not found, size limit exceeded) |
| 130005 | Request too frequent |
| 400001 | Invalid path format |
| 400002 | Invalid version |
| 400003 | Invalid module name |
| 400005 | Invalid request parameters (missing auth info or body) |
| 401001 | Authorization information missing |
| 401002 | Unauthorized (Invalid API Key/Token) |
| 402000 | Quota freeze failed |
| 500001 | Service unavailable |
| 500002 | Database error |
| 500003 | Proxy error |
| 500004 | Task creation failed |
| 530002 | Server is busy |
| 530003 | Internal server error |