OpenAI TTS API
Generates speech audio from the provided text using OpenAI's Text-to-Speech service
Request Body
application/json
Optionaltext
RequiredstringMinimum length:
1
Maximum length: 4096
voice
stringThe voice to use for speech generation
Default:
"alloy"
Value in: "alloy" | "ash" | "ballad" | "coral" | "echo" | "fable" | "onyx" | "nova" | "sage" | "shimmer"
model
stringThe TTS model to use
Default:
"tts-1"
Value in: "tts-1" | "tts-1-hd" | "gpt-4o-mini-tts"
instructions
stringAdditional instructions for the speech
token
RequiredstringOpenAI API key for authentication
Minimum length:
1
Response Body
Audio file containing the generated speech
response
Requiredunknown