Skip to main content
Endpoint: wss://api.aircaps.com/v1/realtime

Protocol

1

Connect

Open the WebSocket with your key in the handshake header: Authorization: Bearer aircaps_sk_...
2

Send start

The first message is JSON. language accepts en and regional variants such as en-US; multilingual support is planned.
3

Wait for ready

The server may send provider_status messages while capacity starts (up to about a minute after quiet periods), then ready. Do not send audio before ready.
4

Stream audio

Send binary frames of mono 16 kHz signed 16-bit little-endian PCM, in real time. 20 ms frames (640 bytes) are recommended; frames may be at most 64 KB. Send {"type": "ping"} to keep an idle connection open.
5

Finish

Send {"type": "finish"}. The server sends the final transcript, then a finished message, and closes.

Messages from the server

text is always the complete transcript so far; replace what you display rather than appending.

Custom vocabulary

Bias recognition toward names and terms with up to 64 entries, each with a strength from 0 to 12:

Rules

  • Audio must arrive in real time; sending faster (beyond a 2-second burst) closes the session with realtime_rate_exceeded.
  • A session ends after 5 minutes; open a new one to continue.
  • No audio for 45 seconds closes the session.
  • At most 5 sessions per account at once.

Close codes

See the Python sample.