Error Codes
All Chuizi.AI API errors follow the OpenAI-compatible error response format. Every error response includes a structured JSON body regardless of which protocol you use (/v1, /anthropic, or /gemini).
Error Response Format
config.json
json
{ "error": { "message": "Human-readable description of what went wrong", "type": "error_category", "code": "specific_error_code" } }
| Field | Type | Description |
|---|---|---|
message | string | A human-readable explanation of the error. Safe to display to end users. |
type | string | The category of error. Use this for programmatic error handling. |
code | string | A machine-readable error code. More specific than type. |
Next Steps
- Error Handling Guide — Implement retries, backoff, and fallback logic in your code
- Rate Limits — Understand the three-tier rate limiting system
- Status Code Mapping — How upstream provider errors map to gateway responses