v1
latestOpenAPI 3.0.32026-07-132681171.6 KBCreate 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.
post/v1/audio/speech
Request body
Example request
{
"model": "openai/gpt-4o-mini-tts",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy",
"instructions": "Speak in a warm, friendly tone.",
"response_format": "mp3",
"speed": 1
}Response
Audio bytes stream (when stream_format is audio) or Server-Sent Events stream (when stream_format is sse).