---
title: "Handler for the /speak endpoint"
method: POST
path: "/speak"
tags: ["tts"]
---

# Handler for the /speak endpoint

`POST /speak`

## Request body

- SpeakRequest — Request body for the speak endpoint
  - `text` string, required — The text to synthesize
  - `tts_config` TTSWebSocketConfig, required — TTS configuration for WebSocket messages.
    - `audio_format` string, nullable — Audio format preference
    - `auth` ProviderAuthInput — Provider-specific auth fields.
    - `connection_timeout` integer, nullable — Connection timeout in seconds
    - `model` string, required — Model to use for TTS
    - `pronunciations` Pronunciation[] — Pronunciation replacements to apply before TTS
      - `pronunciation` string, required — Pronunciation to use instead
      - `word` string, required — Word to replace
    - `provider` string, required — Provider name (e.g., "deepgram")
    - `request_timeout` integer, nullable — Request timeout in seconds
    - `sample_rate` integer, nullable — Sample rate preference
    - `speaking_rate` number, float, nullable — Speaking rate (0.25 to 4.0, 1.0 is normal)
    - `voice_id` string, nullable — Voice ID or name to use for synthesis

## Response `200`

Audio generated successfully

## Other responses

- `400` — Invalid request (empty text)
- `500` — TTS synthesis failed

## Changes

- **2026-03-24** `a9e450186da4` — 1 info
  - added the new optional request property `tts_config/auth`
- **2026-02-08** `0df166d28191` — 2 info
  - the endpoint scheme security `auth` was added to the API
  - the endpoint scheme security `bearer_auth` was removed from the API
- **2025-11-12** `d85b83f25aea` — 1 warning, 2 info
  - removed the request property `tts_config/auth`
  - the endpoint scheme security `bearer_auth` was added to the API
  - the endpoint scheme security `auth` was removed from the API

[Change history](https://skmtc.dev/saynaai/apis/sayna-api/changes/speak/post.md)

---

[API](https://skmtc.dev/saynaai/apis/sayna-api.md) · [All operations](https://skmtc.dev/saynaai/apis/sayna-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/saynaai/sayna-api/revisions/395ce7e35139/schema)
