Error Response Format
All error responses follow a consistent JSON format:HTTP Status Codes
Success Codes
| Code | Status | Description |
|---|---|---|
200 | OK | Request succeeded (GET requests) |
201 | Created | Resource created successfully (POST /tts) |
Client Error Codes
| Code | Status | Description |
|---|---|---|
400 | Bad Request | Invalid request parameters |
401 | Unauthorized | Missing or invalid API key |
402 | Payment Required | Insufficient credits |
404 | Not Found | Resource not found (e.g., invalid generation_id) |
422 | Unprocessable Entity | Validation error |
429 | Too Many Requests | Rate limit exceeded |
Server Error Codes
| Code | Status | Description |
|---|---|---|
500 | Internal Server Error | Unexpected server error |
503 | Service Unavailable | Service temporarily unavailable |
Common Errors
400 Bad Request
Returned when request parameters are missing or invalid.- Missing required fields (
text,voice,model) - Invalid
modelvalue (must bebaseoradvance) - Text exceeds maximum length
401 Unauthorized
Returned when authentication fails.- Missing
x-api-keyheader - Invalid or revoked API key
402 Payment Required
Returned when your account has insufficient credits.404 Not Found
Returned when a requested resource doesn’t exist.- Invalid
generation_idwhen checking status - Generation expired (older than 24 hours)