v1

latestOpenAPI 3.1.0Commercial2026-07-26232551.7 KB
Audio

Generate speech

post/audio/speech

Request body

modelstring required

OpenAI TTS model — openai/tts-1, openai/tts-1-hd, openai/gpt-4o-mini-tts. Gemini TTS preview models are not served on this endpoint; use Gemini's native /v1beta/ surface with responseModalities: ["AUDIO"] instead.

inputstring required
voicestring required

Voice identifier. The gateway forwards this field to the upstream unchanged — use whichever voice name the upstream model supports.

instructionsstring

Optional voice direction (e.g. style, tone). Honored by models that support it, such as openai/gpt-4o-mini-tts.

speednumber

Playback rate. Default 1.0.

stream_formatstring

When set, response is streamed in this format chunk-by-chunk (subject to upstream support).

response_format'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'

Example request

{
  "model": "openai/tts-1",
  "voice": "alloy"
}

Response

Binary audio content.

All 23 operations