Speech-to-Text
Speech-to-Text
Transcription runs over 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
You must supply exactly one input source: a file upload, a source_url
(public URL), or a cloud_storage_url (S3/GCS). Omitting all three fails.
422 on transcribe-and-translate
POST /v1/audio/transcriptions/translate requires a model that supports
translation (defaults to sarvam/saaras:v2). If the selected model can’t
translate, you get a 422. Confirm capabilities via GET /v1/models.
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 JSON error frame and then closes with code 1000.
Read the error frame for the reason (auth or upstream). REST errors use
standard codes: 401, 422, 429, 402.
Still stuck?
See the Mesh API error reference or email contact@meshapi.ai.