Skip to main content
Low-latency English speech-to-text over WebSocket. Emits a rolling partial transcript every ~1.5 seconds while audio streams in, then delivers one complete final transcript at end-of-stream. Pure transcription — no speaker diarization, emotion detection, accent detection, or PII/PHI tagging.

Endpoint

Authentication

Pass your API key as a query parameter when opening the connection.
Unlike the batch endpoints, this API does not use an X-API-Key header. The key must be in the query string at connection time.
See Authentication and rate limits for how to obtain and manage API keys.

Supported audio formats

Container formatssample_rate and num_channels are not required: wav, mp3, ogg, flac, webm, aac, aiff Opus audio is typically shipped as ogg (Opus-in-Ogg). Pass audio_format=ogg for Opus streams. Raw PCM formatssample_rate and num_channels are required: s8, s16le, s16be, s24le, s24be, s32le, s32be, u8, u16le, u16be, u24le, u24be, u32le, u32be, f32le, f32be, f64le, f64be, mulaw, alaw Valid sample rates: 8000, 11025, 16000, 22050, 32000, 44100, 48000, 96000 For lowest end-to-end latency, send audio_format=s16le&sample_rate=16000&num_channels=1. This matches the model’s native input format and bypasses the server’s audio decoder entirely.

Query parameters

This endpoint accepts no feature toggles. Diarization, emotion, accent, and PII parameters are not recognized and have no effect. Use STT Streaming if you need those features.

Connection flow

  1. Connect to the WebSocket endpoint with api_key, audio_format, and (for raw PCM) sample_rate and num_channels.
  2. Stream audio as binary WebSocket frames. Frames can be any size; 4–64 KB is typical.
  3. Receive partial_utterance JSON messages every ~1.5 seconds. Each contains the complete transcript so far — replace any previously displayed partial, do not append.
  4. Send an empty text frame ("") to signal end of audio.
  5. Receive one final utterance message with the complete transcript.
  6. Receive a done message with total audio duration.
  7. The connection closes automatically.

Server messages

partial_utterance

Sent roughly every 1.5 seconds while audio is streaming. Each message contains the complete transcript built so far, not a delta from the previous message. Replace your displayed partial text with each new value — never append.

utterance

Sent exactly once, after the client signals end-of-stream. Contains the final transcript covering the entire audio stream. Supersedes all preceding partial_utterance messages.

done

Sent immediately after the final utterance. Signals stream completion. The connection closes shortly after.

error

Sent if something goes wrong. The connection closes after this message. No further messages follow an error.

WebSocket close codes

Rate limits

  • Concurrent connection limits apply per organization.
  • Monthly usage limits (in audio hours) apply per organization.
  • Connections that exceed limits are rejected during the WebSocket handshake with close code 4029.
See Authentication and rate limits for retry guidance.

Examples

WebSocket APIs cannot be tested with cURL. For command-line testing, use websocat.