---
title: "Generates audio from the input text."
method: POST
path: "/audio/speech"
tags: ["Audio"]
---

# Generates audio from the input text.

`POST /audio/speech`

## Request body

- CreateSpeechRequest
  - `model` union, required — One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`
    - string
    - 'tts-1' | 'tts-1-hd'
  - `input` string, required — The text to generate audio for. The maximum length is 4096 characters.
  - `voice` 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer', required — The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).
  - `response_format` 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm' — The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
  - `speed` number — The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.

## Response `200`

OK

---

[API](https://skmtc.net/omnistack-sh/apis/openai-api.md) · [All operations](https://skmtc.net/omnistack-sh/apis/openai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omnistack-sh/openai-api/versions/a127ad1d97cb/schema)
