Errors
Common error format
API JSON error responses contain error_code, error_message, succeed, and data. The error_code is an application-level error code, not an HTTP status code.
{
"error_code": 10003,
"error_message": "Unauthorized",
"succeed": false,
"data": null
}
Check both the HTTP status and the business result. Even with HTTP 200, succeed: false and a nonzero error_code indicate a business failure. The data field can contain additional error details or be null.
Error message language
For Text to Speech and Voice Design, error_message defaults to English. Send Accept-Language: en for English or Accept-Language: zh-CN for Chinese. This header controls only the language of the error message.
Text to Speech errors
| HTTP Status | Business error_code | Meaning | What to Do |
|---|---|---|---|
400 | 10001 | Invalid request content or unsupported option | Check the request and try again |
400 | 12913 | The voice does not support the selected model; data.errorKey: VOICE_MODEL_INCOMPATIBLE | Query voices with the same model_id and choose a returned ID |
400 | 10013 | Text exceeds the 500 weighted-character limit | Shorten the text; Han characters (including extensions), hiragana, katakana, Hangul, and ー/ー count as 2; CR/LF count as 0; other Unicode code points count as 1. 250 pure CJK characters are accepted; 251 are rejected |
200 | 10023 | No synthesizable content | Please provide valid text or a supported event tag |
401 | 10003 | API key authentication failed, including a missing or invalid key or a disabled organization or project | Check the API key and organization/project status |
402 | 20003 | Insufficient account balance | Add funds and try again |
403 | 10004 | Permission denied for the requested operation or resource | Check the API key’s permissions and organization membership; restore access before retrying |
429 | 10005 or 10014 | The request limit has been reached | Wait briefly and try again |
500 | 10000 | An unexpected service error occurred | Try again; contact support if the problem continues |
503 | 20002 | The service is temporarily unavailable | Try again later |
504 | 10006 | The service timed out before audio was returned | Try again later |
If streaming generation stops unexpectedly, provide the HTTP status, API endpoint, and approximate time with time zone when contacting support.
Voice Cloning errors
| HTTP Status | Business error_code | Meaning | What to Do |
|---|---|---|---|
400 | 10001 | Invalid clone parameters or reference speech in an unsupported language | Use Chinese, English, Japanese, or Korean reference speech and check the other parameters |
200 | 12903 | Organization voice slots are full; succeed: false, data.errorKey: VOICE_SLOTS_FULL | Delete an unused custom voice to free a slot or upgrade the plan before creating another voice |
409 | 10018 | voice_id already exists in the organization or is reserved by the system | Use another voice_id; the original voice is preserved |
404 | 10002 | Reference audio does not exist or has been deleted | Upload the audio again and use the new ref_audio; do not retry the unchanged input |
409 | 10019 | The generated or requested voice ID conflicts with an existing voice | Retry or use another voice_id |
413 | 20010 | File exceeds the size limit for this API | File upload: up to 50 MiB; voice cloning reference audio: up to 20 MiB |
400 | 20012 | Reference audio format is invalid or cannot be processed, including corrupt media or a missing audio stream | Upload a supported, readable reference audio file |
400 | 20015 | Reference audio exceeds 60 seconds | Upload a reference recording between 3 and 60 seconds |
400 | 20016 | Reference audio is shorter than 3 seconds or does not contain enough usable speech, including recordings with no detected usable speech | Upload clear, continuous speech rather than silence or noise |
400 | 20017 | Pauses in the reference speech are too long | Upload a recording with more continuous speech |
Example business failure when saving a voice with full slots (HTTP 200):
{
"error_code": 12903,
"error_message": "No voice slots available. Please upgrade or free a slot.",
"succeed": false,
"data": {
"errorKey": "VOICE_SLOTS_FULL",
"details": null
}
}
Voice Design errors
Business failures from the generation and save endpoints can return HTTP 200, with data: null. When saving a new voice, error_code: 12903 indicates insufficient voice slots. 10005 indicates a request-rate or generation-capacity limit; capacity rejections do not generate candidates or incur a charge. Temporary model or dependency failures return 20002.
See Voice Design: errors and recovery for the complete error codes, recommended actions, and retry guidance.