---
title: "Create speech"
method: POST
path: "/v1/audio/speech"
---

# Create speech

`POST /v1/audio/speech`

Synthesizes audio from input text using a text-to-speech model. By default the response is a binary audio stream in the requested format. When `stream_format` is `sse`, the response is a Server-Sent Events stream of `speech.audio.delta` and `speech.audio.done` events with base64-encoded audio chunks.

## Request body

- SpeechRequest
  - `model` string, required — The text-to-speech model to use, prefixed with the provider slug. Currently only OpenAI models are supported.
  - `input` string, required — The text to synthesize into speech. Maximum length is 4096 characters.
  - `voice` 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer' | 'verse', required — The voice to use when generating the audio.
  - `instructions` string — Additional steering for the voice (tone, accent, pacing). Supported by `openai/gpt-4o-mini-tts` only. Ignored by `openai/tts-1` and `openai/tts-1-hd`.
  - `response_format` 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm' — The audio container format for the synthesized output.
  - `speed` number, float — Playback speed of the generated audio. `1.0` is normal speed.
  - `stream_format` string — Optional and not recommended for most clients. Omit this field to get the default response shape: raw audio bytes in the requested `response_format`. Set to `sse` only with `openai/gpt-4o-mini-tts` to receive a Server-Sent Events stream of `speech.audio.delta` and `speech.audio.done` events with base64-encoded audio chunks. The router rejects `sse` with `openai/tts-1` or `openai/tts-1-hd`, and rejects `audio` with `openai/gpt-4o-mini-tts`.

## Response `200`

Audio bytes stream (when `stream_format` is `audio`) or Server-Sent Events stream (when `stream_format` is `sse`).

## Other responses

- `400` — Bad request - malformed payload or invalid parameters.
- `401` — Unauthorized - missing or empty Authorization header.
- `402` — Payment required - organization balance exhausted.
- `403` — Forbidden - invalid token or model not in access list.
- `404` — Not found - provider/model not supported.
- `429` — Rate limit exceeded. Retry after the Retry-After header value.
- `500` — Internal server error.
- `502` — Bad gateway - upstream provider returned an invalid response.

---

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