Skip to main content
WSS
method
type:string

GET

query
type:object
Audio
type:string

A binary WebSocket frame of raw audio in the declared audio_format. No file header, JSON, or base64. Any frame size works; about 100 ms per frame is a good default.

Keep alive
type:object

Keeps the session open while you have no audio to send. Resets the idle timer. No reply.

End input
type:object

No more audio is coming. The server transcribes the rest, sends transcript.done, and closes with code 1000. Audio sent afterwards is not transcribed.

Session started
type:object

The session is ready for audio. Sent once, first, with the settings in effect.

Transcript delta
type:object

New text, as it is recognized. Append it to the text so far; spaces are included. Use transcript.done for the final text.

Transcript done
type:object

The complete transcript, sent once after input.done. The connection then closes with code 1000.

Session expiring
type:object

The session reaches max_duration_seconds soon. Sent once, about a minute before the limit. At the limit the session closes with 4413.

Error
type:object

An error. With a code, it is terminal and the connection closes with that code. Without a code, it concerns one message (invalid JSON or an unknown message type) and the session continues.