- Text-to-speech
- Transcription
- Translation
POST /v1/audio/speech
Convert a text string into spoken audio. The response is a binary audio file in the format specified byresponse_format. You can stream the audio by reading the response body incrementally.Request parameters
string
required
The text-to-speech model to use. Use the list models endpoint for available TTS model IDs.
string
required
The text to synthesize into speech. Maximum length depends on the model.
string
required
The voice to use for synthesis. Available voices depend on the model. Common options include
"alloy", "echo", "fable", "onyx", "nova", and "shimmer".string
default:"mp3"
The audio format for the output. Supported values:
"mp3", "opus", "aac", "flac", "wav", and "pcm".number
default:"1.0"
Playback speed of the generated audio, between
0.25 and 4.0. Values above 1.0 speed up speech; values below 1.0 slow it down.