Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Your AssemblyAI API key, sent as the raw key with no Bearer prefix. A missing header or an invalid key returns 401.

Body

multipart/form-data
audio
file
required

Audio bytes, between 80 ms and 20 minutes and at most 256 MB. Set the part's Content-Type to the format: audio/wav, audio/pcm (raw 16-bit PCM), audio/aac, audio/mpeg (MP3), audio/mp4 (M4A), audio/ogg (Ogg/Opus), audio/flac, or audio/webm.

config
object

Transcription and rewrite configuration. Optional; when omitted, the audio is transcribed with defaults, including the default rewrite. Only the fields below are accepted. An unknown field is rejected with a 400.

Response

Transcription completed. The rewrite is best-effort: a failed rewrite still returns 200 with the transcription, llm_response set to null, and llm_error set. Fall back to text in that case, and never treat a non-null llm_error as a failed request.

text
string
required

The verbatim transcript. Never altered by the LLM.

words
object[]
required

Per-word transcript objects.

confidence
number<float>
required

Overall transcription confidence (0–1).

audio_duration_ms
number
required

Duration of the submitted audio in milliseconds.

session_id
string<uuid>
required

Server-generated request identifier. Include it when reporting problems.

llm_response
string | null

The rewritten text, or null when the rewrite failed. Fall back to text when it is null.

llm_error
enum<string> | null

Set when the rewrite failed. timeout means the rewrite passed its internal deadline. null on success.

Available options:
timeout,
error
request_time_ms
number<float>

Total server-side processing time in milliseconds.

auth_time_ms
number<float>

Time in milliseconds spent authenticating the request, included in request_time_ms.

sync_time_ms
number<float>

The transcription portion of request_time_ms, in milliseconds.