error_code field (audio, capacity, and inference errors) or a detail field (auth and rate-limit errors).
| HTTP | error_code | Cause |
|---|---|---|
| 400 | bad_audio | Malformed WAV, misaligned PCM, or missing sample_rate/channels for PCM |
| 400 | audio_too_short | Audio below 80 ms |
| 400 | bad_request | Missing audio part, invalid config JSON, or field limits exceeded |
| 401 | — | Missing or invalid API key |
| 413 | audio_too_large | Duration > 120 s or file > 40 MB |
| 415 | unsupported_media_type | Unsupported format, non-16-bit audio, or unsupported sample rate |
| 429 | — | Rate limit exceeded — retry after Retry-After header |
| 503 | capacity_exceeded | Server at rate limit cap — retry after Retry-After: 1 |
| 503 | service_unavailable | Model still loading (cold start) |
| 504 | inference_timeout | Request exceeded the 30 s deadline |
| 500 | inference_error | Internal model error |
Retry guidance
- 429 and 503 are transient — retry after the
Retry-Afterheader (or a short backoff when absent). - 400, 413, and 415 indicate a problem with the request itself — fix the audio or config before retrying. See Audio requirements for the constraints.
- 500 and 504 are safe to retry once; persistent failures warrant a support ticket.
Need help?
If you get stuck, contact our support team at support@assemblyai.com or create a support ticket. Include thesession_id from the response (or the failing request’s timestamp and endpoint if no response was returned) to help us look up your request.