v2
latestOpenAPI 3.1.02026-07-26232135.9 KBAudio
Generate Speech from Text
Generate speech from text using the specified voice and model.
This endpoint synchronously generates audio and returns the binary data directly. The request will block until the TTS generation is complete.
post/v1/audio/text-to-speech/{voice_id}
Path parameters
voice_idstring required
Voice ID to use for TTS generation
Voice ID to use for TTS generation
Headers
x-api-keystring required
API Key for authentication
API Key for authentication
Request body
Example request
{
"text": "Hello, welcome to Mirage!",
"model": "mirage-audio-1"
}Response
Returns the generated audio file as binary data
{"stackTrail":"paths:/v1/audio/text-to-speech/{voice_id}:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}