400 | Bad Request | - Request format error
- Required parameter missing
- Parameter type mismatch
- Parameter value outside valid range
| Check that the request JSON format is correct, confirm all required parameters are provided with correct types. |
401 | Unauthorized | - API key invalid or expired
- Authorization header not provided
- Authentication format error
| Confirm you are using the correct API key, check that the Authorization header format is 'Bearer sk-air-xxx'. |
403 | Forbidden | - Insufficient account balance
- Insufficient API key permissions
- Access to prohibited resource
- Account suspended
| Check account balance, confirm the API key has appropriate permissions, contact customer support for account issues. |
404 | Not Found | - Requested model does not exist
- API endpoint path error
- Resource has been removed
| Confirm the model ID spelling is correct, check the API endpoint path, review documentation to verify resource availability. |
413 | Payload Too Large | - Request body exceeds size limit
- Uploaded file too large
- Messages array too long
| Reduce request body size, compress or split large files, reduce conversation history length. |
422 | Unprocessable Entity | - Parameter semantic error
- temperature exceeds 0-2 range
- max_tokens exceeds model limit
| Check that parameter values are within valid ranges, refer to documentation for each parameter's constraints. |
429 | Too Many Requests | - Exceeded RPM (requests per minute) limit
- Exceeded TPM (tokens per minute) limit
- Too many concurrent requests
| Implement request retry mechanism (exponential backoff), upgrade plan for higher quota, optimize request frequency. |
500 | Internal Server Error | - Server internal error
- Upstream model service abnormal
- System temporary fault
| Retry the request after a brief wait. If errors persist, contact technical support. |
502 | Bad Gateway | - Gateway error
- Upstream service unreachable
- Network link issue
| Retry after a brief wait, check service status page; if errors persist, contact technical support. |
503 | Service Unavailable | - Service temporarily unavailable
- Server overloaded
- Maintenance in progress
| Wait a few minutes and retry, follow official announcements for maintenance schedules. |
504 | Gateway Timeout | - Request processing timeout
- Model response too slow
- Network latency too high
| Reduce max_tokens parameter, simplify input content, or retry after a brief wait. |