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 WebSocket binary messages containing raw audio data as specified by the encoding and sample_rate query parameters.

Audio Requirements:

  • Send audio in small chunks, e.g. 100 ms
  • Audio format must match the encoding and sample_rate parameters
Close Command
type:object

Send a JSON encoded close command as WebSocket text message to close the session cleanly. All buffered audio will be processed by the model into events.

Config Command
type:object

Send a JSON encoded config command as a WebSocket text message to update model settings.

Connected
type:object

Fires once when the WebSocket connection is established.

You do not need to wait for this event before sending audio.

Turn Start
type:object

Marks the start of a user turn. Fires quickly after the user begins speaking.

This event can be used to interrupt your agent to avoid talking 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.