Status code reference
SDK error classes
Both SDKs map each status code to a typed error class. Catching the specific class is cleaner than parsing strings.- Python
- TypeScript
What to do with each error
4xx — your side
5xx — our side
Common pitfalls
Content-Type: application/jsonmissing on POST requests results in400.- API key with leading/trailing whitespace (often from copy-paste) results in
401. - Calling a custom voice from a different account results in
403, even if you “know” the ID. - Sending
textover 300 characters to the raw API results in400. Use an SDK to auto-chunk longer text.
Related
Retries and backoff
The right retry policy for
429 and 5xx.Rate limits
Limits by account tier.