Text to generate a speech from













Audio Speech Endpoints












Examples
Real world code examples
Speech
POST /v1/audio/speech
AdditionalProperties
input
metadata
model
ref_audio
The audio reference for generating the speech.
response_format
stream
Default Value: false
voice_id
The preset or custom voice to use for generating the speech.
200 (application/json)
200 (text/event-stream)
Speech audio data.
audio_data
Base64 encoded audio data
Playground
Test the endpoints live
curl https://api.mistral.ai/v1/audio/speech \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"input": "Example input."
}'curl https://api.mistral.ai/v1/audio/speech \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"input": "Example input."
}'200 (application/json)
200 (text/event-stream)
{
"audio_data": "base64-encoded-audio-data"
}{
"audio_data": "base64-encoded-audio-data"
}nullnull