Use this API to stream audio to the speech service over a WebSocket connection for ambient and form filling sessions.For more information on how to handle the handshake, wire format, message order, and error handling, refer to the Ambient audio streaming guide.
Complete these steps before opening the WebSocket.
Opening /ws/stream before the session and context are ready often leads to handshake failures or a broken stream.
Authenticate and obtain sdp_suki_token
Create an ambient session with POST/api/v1/ambient/session/create. A successful create returns 201 Created; keep the ambient_session_id you used or received.
Authenticate and open the WebSocket on wss://sdp.suki-stage.com/ws/stream. To stream audio, you must first establish an authenticated WebSocket connection. The authentication method you use depends on your client types: browser or non-browser.
When connecting from a browser, include the Sec-WebSocket-Protocol header as part of the WebSocket handshake.Set the header value as a single comma-separated string. The order must be:
Subprotocol name
Ambient session ID - Your ambient session ID
Token - Your Suki token
Avoid adding spaces between values unless your client library requires it.
For non-browser clients such as mobile apps, backend services, or testing tools, pass authentication details as separate HTTP headers in the WebSocket upgrade request. Do not use the Sec-WebSocket-Protocol header.Include the following headers:
sdp_suki_token - Your Suki token.
sdp_provider_id - Provider identifier. Optional for standard partners; Required for Single Auth Token authentication.
ambient_session_id - The ID for the current .
If you push non-JSON payloads where the server expects JSON, you can see parse errors (for example invalid character or null byte errors).
Required FOR BROWSER CLIENTS ONLY. Sent during WebSocket handshake. Format: 'SukiAmbientAuth,<ambient_session_id>,<sdp_suki_token>' (comma-separated, no spaces required between parts).
Unique identifier for the provider. Optional for standard partners. Required for Single Auth Token authentication, where multiple providers share the same partner_token.