Skip to main content
wss://api.typelessapi.com/v1/transcribe/stream WebSocket endpoint for streaming PCM audio; authentication and all options are passed as query parameters at handshake time.

Query parameters

token
string
required
Your API key. See Authentication.
model
string
required
Model tier. One of typeless-asr-l1-v1, typeless-asr-l2-v1, typeless-asr-l3-v1. See Models & Pricing.
sample_rate
integer
default:"16000"
PCM sample rate in Hz. Allowed range: 8000–48000.
channels
integer
default:"1"
Number of audio channels. 1 or 2.
encoding
string
default:"pcm16"
Audio encoding. Only pcm16 (16-bit little-endian PCM) is supported.
language
string
Optional ISO 639-1 language hint. When omitted, language is detected automatically.

Client → server messages

Binary frames: send raw little-endian pcm16 audio bytes as WebSocket binary frames; the server buffers and processes them in the order received. keep_alive — resets the 60-second idle timer; does not extend the 10-second first-frame deadline.
{"type": "keep_alive"}
close_stream — signals no more audio; the server finalizes and returns the result.
{"type": "close_stream"}

Server → client messages

result — sent once after finalization; the server closes the connection immediately after.
{
  "type": "result",
  "status": "success",
  "result": {
    "transcript": "Let's move the launch to next Thursday and loop in the design team early.",
    "detected_language": "en",
    "duration_seconds": 42.5
  },
  "usage": {
    "audio_duration_seconds": 42.5,
    "output_token_count": 128
  },
  "request_id": "01JXXXXXXXXXXXXXXXXXXXXXXX"
}
error — sent when a fatal error occurs; after an error message the server closes the connection.
{
  "type": "error",
  "status": "error",
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  },
  "request_id": "01JXXXXXXXXXXXXXXXXXXXXXXX"
}

Timeouts

TimerValueBehavior
First audio frame10 s from connectConnection closes if no binary frame arrives; keep_alive does not extend this deadline
Idle60 sReset by any audio frame or keep_alive; connection closes on expiry
Finalizationtypically seconds, up to ~1 minuteAfter close_stream, the server drains remaining audio and refinement, then sends result

Connection close semantics

  • Normal: server sends result, then closes.
  • Error: server sends error, then closes.
  • Client disconnect: if transcription has already started, you are billed for the audio sent (15-second minimum).

Endpoint-specific errors

CodeWhen
CONCURRENT_LIMIT_EXCEEDEDHandshake rejected — too many open connections (429)
INVALID_REQUESTInvalid handshake parameters, or missing/unknown model
CLIENT_DISCONNECTEDYou disconnected mid-stream — recorded in usage logs, not sent as a message
See the full table in Errors.

Concurrency

Each account allows 10 concurrent connections by default; exceeding it fails the handshake with CONCURRENT_LIMIT_EXCEEDED — see Rate limits.