Getting started
Errors
How the API reports errors, and what each error type means.
Error format
Successful requests return a 2xx status. When something goes wrong, the status is 4xx (a problem with the request) or 5xx (a problem on our side), and the body always looks like this:
{
"error": {
"type": "invalid_request",
"message": "speakers_expected must be between 0 and 20.",
"status": 400
}
}
Branch on type in your code; show message to people, since it says what to fix.
Error types
| Status | Type | What happened |
|---|---|---|
| 400 | invalid_request | A parameter is missing or not valid. The message names it. |
| 400 | unsupported_format | The file isn't a supported audio or video format, is empty, or has no audio track. |
| 401 | authentication_error | No API key, or the key is wrong or revoked. |
| 403 | permission_error | The account isn't on Unlimited. |
| 403 | file_too_long | The file is longer than 10 hours. |
| 404 | not_found | No transcript or folder with that ID in your account. |
| 409 | not_ready | You asked to export a transcript that isn't completed yet. |
| 409 | conflict | A folder with that name already exists. |
| 413 | file_too_large | The file is bigger than 5 GB. |
| 415 | unsupported_media_type | Send uploads as multipart/form-data and everything else as JSON. |
| 429 | rate_limit_exceeded | Too many requests this minute. Wait for Retry-After seconds. |
| 429 | fair_use_limit_exceeded | The file would take you past this month's API allowance. |
| 429 | plan_limit_exceeded | Too many transcripts queued at once. Wait for some to finish. |
| 500 | server_error | Something went wrong on our side. Retry with a short delay; if it keeps happening, contact us. |
Retrying safely
- Retry
429and5xxresponses with a growing delay (for example 2, 4, then 8 seconds). - Don't retry other
4xxresponses unchanged: fix the request first. - If a request to create a transcript times out, list your transcripts before sending the file again, so you don't transcribe it twice.
Failed transcripts
A transcript can be accepted and still fail later, for example if the audio can't be decoded. Its status becomes failed and error explains why. Failed transcripts don't count toward your fair-use allowance.
Questions about the API? Contact us.