Skip to main content
POST
/
v1
/
audio
/
speech
Generate speech from text (TTS)
curl --request POST \
  --url https://tokens.flex.ai/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "voxtral-4b-tts",
  "input": "<string>",
  "voice": "neutral_female"
}
'
"<string>"

Authorizations

Authorization
string
header
required

Virtual API key. Create one from the FlexAI dashboard. Pass as Authorization: Bearer sk-xxxx.

Body

application/json
model
string
required
Example:

"voxtral-4b-tts"

input
string
required

Text to synthesize.

voice
string
Example:

"neutral_female"

Response

Audio bytes (WAV).

The response is of type file.