/audio/speechCreate speech audio
Generates audio from input text using a selected text-to-speech model and voice. Supply model, input, and voice, then use response_format, speed, or stream_format to control the audio output. The response can contain an audio file or streamed audio events.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
Text-to-speech configuration specifying the source text, model, voice, output format, speed, and streaming mode.
One documented failure
slow_downYour request rate increased too quickly. Please reduce the request rate and gradually increase it again.
Traffic increased too quickly
One documented failure
server_is_overloadedThe model is temporarily overloaded. Please retry your request after a brief delay.
The requested model is temporarily overloaded
A 429 is returned when the request exceeds the rate limit, and a 503 is returned when the service or requested model is temporarily unavailable. model, input, and voice are required; input and instructions must be at most 4096 characters, speed must be between 0.25 and 4, and stream_format must be sse or audio.