MAI Voice technical docs
Endpoint, auth header, parameters, prices, and tested request examples for MAI Voice 2.
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 mai-voice-2.
input required
Text to synthesize.
voice
Explicit MAI voice name.
language_code
Locale hint such as fr-FR or en-US.
style
Expressive style.
happy, excited, sad, shouting, softvoice, whispering, angry, hopeful, joyfulstyle_degree
Expressive style intensity.
output_format
Azure Speech output format.
audio-24khz-160kbitrate-mono-mp3, riff-24khz-16bit-mono-pcmTested 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": "mai-voice-2",
"input": "Bonjour. Bienvenue sur Imole.",
"language_code": "fr-FR",
"output_format": "audio-24khz-160kbitrate-mono-mp3"
}' \
--output mai-voice-2.mp3curl -X POST "https://api.imole.app/v1/audio/speech" \
-H "Authorization: Bearer $IMOLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mai-voice-2",
"input": "Imole est pret pour votre prochain projet.",
"language_code": "fr-FR",
"style": "happy",
"style_degree": "1.2",
"output_format": "audio-24khz-160kbitrate-mono-mp3"
}' \
--output mai-voice-2-happy.mp3curl -X POST "https://api.imole.app/v1/audio/speech" \
-H "Authorization: Bearer $IMOLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mai-voice-2",
"input": "Ceci utilise une voix MAI explicite.",
"voice": "fr-FR-Soleil:MAI-Voice-2",
"language_code": "fr-FR",
"output_format": "audio-24khz-160kbitrate-mono-mp3"
}' \
--output mai-voice-2-explicit.mp3