Skip to main content

Response envelope

JSON endpoints return a consistent envelope with a boolean error flag. On success, error is false and the payload is in data:
On failure, error is true, data is omitted, and message carries the detail:
The audio endpoints don’t use this envelope on success: /speak returns raw audio bytes and /stream returns a Server-Sent Events body. Errors on those endpoints still return the JSON envelope above.

Plan-limit & entitlement denials

Billing-related denials do not use the standard envelope - they return a flat JSON body. Per-resource plan limits (for example creating more voices than your plan allows) return 403:
When metered-usage enforcement is active, an exhausted allowance returns 402, and a feature your plan doesn’t include returns 403. Both carry the unit and the current usage:
The error string is the denial reason (e.g. quota_exhausted, insufficient_credits, limit_reached, or feature_disabled).

Status codes

Common messages

The voice you referenced isn’t ready to use - only voices with status ready can synthesize. See Working with voices.
The text field exceeds the 10,000-character limit. Split long input into multiple requests.
These originate from the upstream synthesis provider. 422 is a validation issue with your input, 429 is rate limiting, and 502 means the provider is warming up or unavailable - retry with backoff.