Form Filling Audio Streaming
WebSocket endpoint for streaming visit audio during Form filling sessions
GET /ws/stream) for Form filling sessions. For more information on how to handle the handshake, wire format, message order, and error handling,
and poll for structured data when the session is complete, refer to the Aaudio streaming guide.
ambient_session_id from Create Form Filling session while streaming audio.
Do not use the ambient_session_id from an Create Ambient session, even though both fields use the name ambient_session_id.Prerequisites
Complete these steps before you open the WebSocket.- Authenticate and obtain
sdp_suki_token - Create a Form filling session with POST
/api/v1/form-filling/session/create. Save theambient_session_idfrom the 201 Created response - Seed session context (recommended) with POST
/api/v1/form-filling/session/{ambient_session_id}/context. Includeform_template_idvalues when you send context - Open the WebSocket at
wss://sdp.suki-stage.com/ws/stream(staging) orwss://sdp.suki.ai/ws/stream(production). Use your Form fillingambient_session_idin the handshake
Browser clients
SendSec-WebSocket-Protocol during the handshake as one comma-separated string, in this order:
- Subprotocol name
- Form filling session ID (
ambient_session_id) sdp_suki_token
Non-browser clients
For mobile apps, backend services, or testing tools, pass headers on the WebSocket upgrade request. Do not useSec-WebSocket-Protocol.
sdp_suki_token- Session token from loginsdp_provider_id- Provider identifier. Optional for standard partners; required for Single Auth Token authenticationambient_session_id- Form filling session ID from Create Form Filling session
Code examples
- Python
- TypeScript
Headers
Required FOR BROWSER CLIENTS ONLY. Sent during WebSocket handshake. Format: 'SukiAmbientAuth,<ambient_session_id>,<sdp_suki_token>' (comma-separated, no spaces required between parts).
Required FOR NON-BROWSER CLIENTS ONLY: The Suki access token. Sent as a standard header with the initial upgrade request.
Required FOR NON-BROWSER CLIENTS ONLY: The ambient session ID. Sent as a standard header with the initial upgrade request.
Unique identifier for the provider. Optional for standard partners. Required for Single Auth Token authentication, where multiple providers share the same partner_token.
"provider-123"
Response
Switching Protocols - Indicates successful WebSocket handshake." // Standard successful WS upgrade response
The response is of type string.