audio.speech
post/v1/audio/speech

Request

Request body

modelstring nullable
metadataMetadataDict

Custom type for metadata with embedded validation.

streamboolean
prompt_cache_keystring nullable
voice_idstring nullable

The preset or custom voice to use for generating the speech.

inputstring required

Text to generate a speech from

phoneme_hintsobject nullable

Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones.

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

Response

Speech audio data.

audio_datastring required

Base64 encoded audio data

Changes