POST /v1/audio/transcriptions (REST) and
WS /v1/audio/transcriptions/realtime (streaming). See
Speech-to-Text for the full reference.
422 — the endpoint expects multipart/form-data, not JSON
POST /v1/audio/transcriptions uses multipart/form-data, not a JSON body.
Send fields as form parts (-F in curl, files=/data= in httpx). Posting
JSON is the most common cause of a 422 here.
No audio provided
Supply an input source: afile upload, a source_url (public URL), or a
cloud_storage_url (S3/GCS). Omitting all three returns 422 with
“One of file, source_url, or cloud_storage_url is required.”
422 on transcribe-and-translate
POST /v1/audio/transcriptions/translate (a legacy alias of
POST /v1/audio/translations) requires a model that supports translation.
Always pass model explicitly, e.g. openai/whisper-large-v3. If the selected
model can’t translate, you get a 422. Confirm capabilities via GET /v1/models.
Opting out of logging has no effect
enable_logging is a query parameter on POST /v1/audio/transcriptions
(?enable_logging=false), not a form field. Sent as a form field it is ignored.
Realtime WebSocket won’t connect or auth fails
Pass the key one of three ways:Sec-WebSocket-Protocol: Bearer rsk_...,
?api_key=rsk_..., or ?token=rsk_.... In browsers (no custom headers), use
the query parameter.
Realtime transcripts are empty or garbled
audio_formatmust match what you actually send (defaultpcm_16000; the standard protocol expects PCMs16le, 16 kHz, mono).- With
commit_strategy: manualyou must sendinput_audio_buffer.commit(or ElevenLabscommit: true) to get a final transcript;autouses VAD. - ElevenLabs realtime only forwards
input_audio_chunkframes — any other message type is silently dropped.
WebSocket closed with an error
Realtime STT sends a JSONerror frame and then closes with code 1000,
or 1011 while the server is draining for a restart, in which case reconnect.
Read the error frame for the reason (auth, balance, too many concurrent
sessions, or upstream). An account can hold 5 concurrent WebSocket sessions. REST errors use
standard codes: 401, 422, 429, 402.