message and a status:
Status codes
| Status | Meaning | What to do |
|---|---|---|
400 | Bad request — invalid parameters, or a reference_id / voice that doesn’t exist | Fix the request; read the message. |
401 | Invalid or missing API key | Send Authorization: Bearer <key>; check it on API Keys. |
402 | Insufficient credits | Top up on Billing. |
403 | Not permitted for this key/resource | Check the key’s scope and the resource owner. |
404 | Model or voice not found | Verify the model_id / reference_id. |
429 | Rate limit exceeded | Back off and retry (see below). |
5xx | Server error | Retry with backoff; if it persists, contact support. |
Retries
Retry429 and 5xx with exponential backoff. Don’t retry other 4xx codes — they won’t succeed without a change to the request.
Handling errors in the SDKs
Both SDKs raise typed exceptions you can branch on. The base class carries the status and the parsed body.Audio playback via
play() needs ffmpeg. If it’s missing, the Python SDK raises
DependencyError — install ffmpeg or save the audio to a file instead.
