Errors
Errors carry a JSON body with error, a sentence that explains what went wrong, and code, a stable value to branch on. A refused request creates and charges nothing.
{ "error": "The script is empty.", "code": "SCRIPT_EMPTY" }| Status | Code | Meaning |
|---|---|---|
| 400 | SCRIPT_EMPTY |
The script is empty. |
| 400 | VOICE_NOT_AVAILABLE |
The voice id is unknown, belongs to another workspace, or cannot narrate. Pick one from GET /v1/voices. |
| 400 | INVALID_REQUEST |
A field is missing, has the wrong type or is too long (a script over 10,000 characters); error names the field, e.g. script: Invalid input: expected string. |
| 401 | The API key is missing, wrong, disabled or expired. | |
| 402 | INSUFFICIENT_CREDITS |
The workspace lacks the credits for this narration. |
| 403 | API_PLAN_REQUIRED |
The workspace is not on the Creator or Pro plan. |
| 404 | NARRATION_NOT_FOUND |
No narration with this id in the workspace. |
| 404 | VOICE_NOT_FOUND |
No voice with this id in the library or the workspace. |
| 429 | The plan’s request limit was reached; wait for the Retry-After seconds. See Rate Limits. |
|
| 500 | Something failed on our side. The request can be retried. |
A narration that fails after it started has "status": "failed" and the reason in error.