Status code reference for all API types
Updated: 2026-06-06
| Status code | Description | Recommended action |
|---|---|---|
| 200 | Request succeeded | - |
| 400 | Invalid request parameters | Check the request body format and parameters |
| 401 | Authentication failed | Check whether the API Key is correct |
| 403 | Insufficient permissions | Check whether the token has permission to access this model |
| 404 | Resource not found | Check the URL path |
| 429 | Rate limit exceeded | Reduce request frequency or contact the administrator |
| 500 | Server-side 5xx error | Retryable; may be an internal error on this site, or an upstream 5xx relayed through this site |
| 502 | Gateway or upstream result retrieval failed | Usually means the request reached the upstream call stage but no valid upstream response or result was obtained; retryable |
| 503 | Service unavailable | System under maintenance |
500 is the broader server-side error. In Crazyrouter, it may indicate an internal error on this site, or that the upstream directly returned a 5xx which was then relayed to the client by this site.502 is more specific and usually means the request reached Crazyrouter's gateway or upstream call stage, but Crazyrouter could not obtain a valid upstream response or result, for example the upstream was unreachable, returned an invalid gateway-level response, or the task result URL could not be fetched.502s, first check upstream channel availability, network connectivity, and whether the result URL is accessible.500s, distinguish further using the error type and logs; only when explicitly marked as on-site site_internal or a panic-type error should it be treated directly as a Crazyrouter issue.{
"error": {
"message": "Error description",
"type": "error_type",
"code": "error_code"
}
}| code | Description |
|---|---|
invalid_api_key | API Key is invalid or has expired |
insufficient_quota | Insufficient balance |
model_not_found | Model does not exist or is not enabled |
context_length_exceeded | Input exceeds the model's context length limit |
rate_limit_exceeded | Rate limit exceeded |
content_filter | Content blocked by the safety filter |
| Status | Description |
|---|---|
queued | Submitted or queued |
processing | Processing |
succeeded | Generation succeeded; data.url is the result URL |
failed | Generation failed; see data.error / fail_reason |
If the task does not exist, HTTP 400 {"code":"task_not_exist"}is returned;GET /v1/tasks/{task_id}returns 404 instead.
| Status | Description |
|---|---|
SUBMITTED | Submitted |
QUEUED | Queued |
IN_PROGRESS | Generating |
SUCCESS | Completed |
FAILURE | Failed |
Warning: When you receive a 429 error, do not retry immediately. Use an exponential backoff strategy: start with a 1-second wait and double it each time.
Last verified/modified: 2026-09-28 (removed the Midjourney / Luma / Runway status code sections (not available); video task statuses changed to measured values (non-existent task returns 400 task_not_exist); brand name unified to Crazyrouter)