---
title: "Stream ambient audio"
method: GET
path: "/ws/stream"
tags: ["/ws"]
---

# Stream ambient audio

`GET /ws/stream`

Opens a WebSocket to stream audio for ambient or form-filling sessions. Create the session and seed context before connecting. Browser clients authenticate with `Sec-WebSocket-Protocol`; non-browser clients send `sdp_suki_token`, optional `sdp_provider_id`, and `ambient_session_id` as headers.

## Headers

- `Sec-WebSocket-Protocol` string
- `ambient_session_id` string, required
- `sdp_provider_id` string

## Response `200`

OK - May indicate successful stream processing or completion (e.g., sending 'EOF' message). Specific meaning depends on implementation after handshake.

- string

## Other responses

- `101` — Switching Protocols - Indicates successful WebSocket handshake.
- `400` — Bad Request - Invalid parameters, headers, or request format.
- `401` — Unauthorized - Authentication failed (invalid token/session, incorrect protocol/headers).
- `403` — Forbidden - Client is authenticated but not authorized for this action.
- `500` — Internal Server Error - Abnormal closure or server-side issue.

---

[API](https://skmtc.dev/suki/apis/suki-developer-platform.md) · [All operations](https://skmtc.dev/suki/apis/suki-developer-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/suki/suki-developer-platform/revisions/5f420a18fb68/schema)
