Authorizations
All APIs require Bearer Token authenticationGet API Key:Visit API Key Management Page to get your API KeyAdd to request header:
Body
TTS model nameAvailable models:
gpt-4o-mini-tts- GPT-4o Mini TTS model (mp3 format not supported yet)
"gpt-4o-mini-tts"The text to convert to speechMaximum length: 4096 charactersExample:
"The quick brown fox jumps over the lazy dog."Voice selectionAvailable voices:
alloy- Neutral, balanced voiceecho- Male, calm voicefable- British, narrative voiceonyx- Male, deep voicenova- Female, energetic voiceshimmer- Female, gentle voice
"alloy"Audio output formatSupported formats:
mp3- MP3 format (default)opus- Opus format, for internet streamingaac- AAC formatflac- FLAC format, lossless compressionwav- WAV format, uncompressedpcm- PCM format, raw audio data
"mp3"Speech playback speedRange: 0.25 to 4.0
0.25- Slowest speed (1/4x)1.0- Normal speed (default)4.0- Fastest speed (4x)
1.0