Error Codes
Error Response Format
When an error occurs, the response is returned in the following JSON format.
Voice APIs
{
"error": {
"code": "E4001",
"message": "API key is required. Provide X-API-Key header.",
"details": "optional additional info"
}
}AICC API
AICC returns the same common codes in a flat response for compatibility with existing clients.
{
"error": "message or a user message in history is required",
"code": "E4201"
}Error Code List
Authentication
| Code | HTTP | Description |
|---|---|---|
E4001 | 401 | API key is required. Provide X-API-Key header. |
E4002 | 401 | Invalid API key |
Authorization
| Code | HTTP | Description |
|---|---|---|
E4101 | 403 | Permission denied |
Validation
| Code | HTTP | Description |
|---|---|---|
E4201 | 400 | Invalid request |
E4202 | 400 | Text exceeds maximum length |
E4203 | 400 | Invalid audio |
E4204 | 413 | Request body exceeds the allowed size |
Resource
| Code | HTTP | Description |
|---|---|---|
E4301 | 404 | Resource not found |
E4302 | 409 | Resource not ready |
Rate Limit
| Code | HTTP | Description |
|---|---|---|
E4401 | 429 | Usage limit exceeded |
E4402 | 429 | Guest daily limit exceeded |
E4403 | 429 | Per-minute request or character limit exceeded |
Method
| Code | HTTP | Description |
|---|---|---|
E4501 | 405 | Method not allowed |
Billing & Credits
| Code | HTTP | Description |
|---|---|---|
E4601 | 402 | Insufficient credits to process the request |
Server
| Code | HTTP | Description |
|---|---|---|
E5001 | 500 | Internal server error |
E5002 | 503 | Service temporarily unavailable |
E5003 | 500 | Processing timeout |