Skip to main content
Errors return a JSON body with either an error_code field (audio, capacity, and inference errors) or a detail field (auth and rate-limit errors).
{ "error_code": "audio_too_large", "message": "audio duration 130000 ms exceeds limit 120000 ms" }
HTTPerror_codeCause
400bad_audioMalformed WAV, misaligned PCM, or missing sample_rate/channels for PCM
400audio_too_shortAudio below 80 ms
400bad_requestMissing audio part, invalid config JSON, or field limits exceeded
401Missing or invalid API key
413audio_too_largeDuration > 120 s or file > 40 MB
415unsupported_media_typeUnsupported format, non-16-bit audio, or unsupported sample rate
429Rate limit exceeded — retry after Retry-After header
503capacity_exceededServer at rate limit cap — retry after Retry-After: 1
503service_unavailableModel still loading (cold start)
504inference_timeoutRequest exceeded the 30 s deadline
500inference_errorInternal model error

Retry guidance

  • 429 and 503 are transient — retry after the Retry-After header (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 the session_id from the response (or the failing request’s timestamp and endpoint if no response was returned) to help us look up your request.