Error Response Format
All error responses follow a consistent JSON format:HTTP Status Codes
Success Codes
Client Error Codes
Server Error Codes
WebSocket Close Codes
Common Errors
400 Bad Request
Returned when request parameters are missing or invalid.- Missing required fields (
text,voice_id) - Invalid
modelvalue (must bebaseoradvanced) - Empty text or text longer than the active plan limit
- Voice and model are incompatible
401 Unauthorized
Returned when authentication fails.- Missing
x-api-keyheader - Invalid or revoked API key
402 Payment Required
Returned when your account has insufficient balance.404 Not Found
Returned when a requested resource doesn’t exist.- Invalid
generation_idwhen checking status - The generation belongs to another account
429 Too Many Requests
Returned when you exceed the rate limit.500 Internal Server Error
Returned when an unexpected server error occurs.Error Handling Example
Handle transport errors directly, then handle the asynchronousFAILED status
while polling: