---
title: "Generate Text-to-Speech"
method: POST
path: "/text-to-speech/{model_id}"
tags: ["Text-to-Speech"]
---

# Generate Text-to-Speech

`POST /text-to-speech/{model_id}`

Generate speech from Arabic text using a specific model. Supports both streaming and non-streaming responses.

## Path parameters

- `model_id` string, required

## Request body

- TextToSpeechRequest
  - `voice_id` string, required — The voice ID to use for synthesis
  - `text` string, required — The Arabic text to convert to speech
  - `stability` number, required — Voice stability (0.0 to 1.0). Higher values produce more consistent output
  - `speed` number — Speech speed multiplier (0.7 to 1.2). Values below 1.0 slow down speech, values above 1.0 speed it up
  - `streaming` boolean, required — If true, returns streaming PCM16 audio. If false, returns complete WAV file

## Response `200`

Audio response (streaming or complete file)

## Other responses

- `400` — Bad Request - Invalid parameters
- `401` — Unauthorized - Invalid or missing API key
- `402` — Payment Required - Insufficient wallet balance
- `404` — Not Found - Model not found
- `429` — Too Many Requests - Rate limit exceeded

---

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