Skip to main content
WSS
X-API-Key
type:httpApiKey

Use an API key when you're calling from a trusted server.

access_token
type:httpApiKey

Use a short-lived access token when calling from a browser or client app. Learn more here.

query
type:object
Send Audio Data
type:string

Send raw audio as binary WebSocket messages, in small chunks such as 100 ms.

The audio must match the encoding and sample_rate query parameters.

Close Command
type:object

Send a JSON formatted close command as a WebSocket text message to close the session cleanly. The model processes all buffered audio into events.

Config Command
type:object

Change turn detection settings, keyterms, or language hints mid-stream

Connected
type:object

Fires once when the WebSocket connection opens.

You don't need to wait for this event before sending audio.

Turn Start
type:object

Marks the start of a user turn. Fires soon after the user starts speaking.

Use this event to interrupt your agent so it doesn't talk over the user.

Turn Update
type:object

Fires repeatedly as the model transcribes the current user turn.

Turn Eager End
type:object

Fires when the model predicts that the user might be done speaking.

Turn Resume
type:object

Fires after turn.eager_end if the user turn has not actually ended.

Turn End
type:object

Marks the end of a user turn.

Error Response
type:object

Error information for STT WebSocket connections