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.

Finalize Command
type:string

Send finalize as a text message when the user has finished speaking. You get the transcript for any audio still buffered.

The JSON form {"type": "finalize"} also works.

Example: finalize
Close Command
type:string

Send close as a text message to flush the remaining audio and close the session. The server replies with done.

The JSON form {"type": "close"} also works.

Example: close
Config Command
type:object

Change keyterms or language hints mid-stream (ink-preview only)

Transcript Response
type:object

Transcript chunks.

Send the finalize command when the user has finished speaking to get these chunks. The API can also send chunks before you send finalize.

Flush Done Response
type:object

Acknowledgment for the finalize command

Done Response
type:object

Acknowledgment for the close command

Error Response
type:object

Error information for STT WebSocket connections