status, title, and detail fields:
error message and a machine-readable error_code,
is used only for the errors Dictation raises while parsing the request itself,
before the config is validated:
detail first and
falling back to error covers every case.
Status codes
Both auth failures return
401. A missing header gives detail: "Missing Authorization header", and a bad key gives detail: "Invalid API key".A failed rewrite is not a failed request
The transcript rewrite is best-effort and is never allowed to fail the call. If the rewrite fails, the response is still200, text still holds the verbatim
transcript, llm_response is null, and llm_error says what went wrong:
Fall back to
text when llm_response is null. Never treat a non-null
llm_error as a failed request. In the Python SDK, result.final_text already
does this: it returns the rewrite when there is one and the transcript
otherwise.
Errors in the Python SDK
A failed request raisesDictationError, which carries the pieces you need to
decide what to do next:
retry_after is None when the response carried no Retry-After header, so
fall back to your own backoff rather than assuming a value is present.
Retry guidance
- 429, 502, 503, and 504 are transient. Back off and retry.
- 400, 413, and 415 mean the request itself is wrong. Fix the audio or the config before retrying. See Audio requirements for the constraints.
- 401 is a credential problem. Retrying will not help.
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.