v1

latestOpenAPI 3.1.02026-07-26793302.3 KB

Create speech

post/v1/audio/speech

Request body

modelstring required

The TTS model to use. Choose a current speech model from the Models page.

inputstring required

The text to generate audio for. Maximum length is 4096 characters.

voice'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer' required

The voice to use for speech synthesis.

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

The audio output format.

speednumber

The speed of the generated audio. Select a value between 0.25 and 4.0.

Response

The audio file content.