OpenAI TTS technical docs
Endpoint, auth header, parameters, prices, and tested request examples for GPT 4o Mini TTS.
Endpoint and pricing
Request headers
Authorization required
Bearer Imole API key.
Content-Type required
Use application/json for JSON requests.
Request parameters
model required
Use gpt-4o-mini-tts.
input required
Text to synthesize.
voice required
Built-in voice.
alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, verse, marin, cedarresponse_format
Audio output format.
mp3, opus, aac, flac, wav, pcminstructions
Delivery instructions for tone, pace, and style.
speed
Speech speed multiplier.
0.25-4.0Tested request examples
curl -X POST "https://api.imole.app/v1/audio/speech" \
-H "Authorization: Bearer $IMOLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini-tts",
"input": "Welcome to Imole.",
"voice": "alloy",
"response_format": "mp3"
}' \
--output gpt-4o-mini-tts.mp3curl -X POST "https://api.imole.app/v1/audio/speech" \
-H "Authorization: Bearer $IMOLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini-tts",
"input": "Bonjour. Bienvenue sur Imole.",
"voice": "alloy",
"response_format": "mp3",
"instructions": "Warm, clear, and confident. Medium pace.",
"speed": 1.05
}' \
--output gpt-4o-mini-tts-directed.mp3curl -X POST "https://api.imole.app/v1/audio/speech" \
-H "Authorization: Bearer $IMOLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini-tts",
"input": "Imole confirms your request.",
"voice": "sage",
"response_format": "wav",
"speed": 0.95
}' \
--output gpt-4o-mini-tts-sage.wav