---
title: "create a streaming session"
method: POST
path: "/v1/tts/ws-connect"
tags: ["speech"]
---

# create a streaming session

`POST /v1/tts/ws-connect`

mint a one-shot WebSocket session for real-time streaming synthesis. returns a `ws_url` and a `token`. connect to `ws_url?token=<token>`, send a JSON synthesis frame, then receive raw PCM int16 little-endian @ 24 kHz mono binary frames followed by a terminal `{"type":"done"}` JSON frame.

## Request body

- WsConnectRequest
  - `model` 'muga' | 'mulberry' — which model to use.
  - `text` string, required — text to synthesize. sent again in the WebSocket synthesis frame.

## Response `200`

a one-shot WebSocket session.

- WsConnectResponse
  - `ws_url` string, uri — WebSocket URL to connect to.
  - `token` string — one-shot token. pass as `?token=<token>` when connecting.

## Other responses

- `401` — bearer token missing, invalid, or expired.
- `403` — key revoked or account disabled.
- `422` — validation failed. check the error field.
- `429` — rate limit hit. see the `Retry-After` header.
- `503` — upstream temporarily unavailable. retry shortly.

---

[API](https://skmtc.dev/rumik/apis/silk-tts-api.md) · [All operations](https://skmtc.dev/rumik/apis/silk-tts-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rumik/silk-tts-api/revisions/4b94f5c97e46/schema)
