Guides

Generating audio

Text-to-speech and music generation.

4 min read

Audio generations cover two distinct workflows: TTS (read a prompt aloud) and Music (generate a music clip from a description). Both go through POST /v1/generations.

Text-to-speech: pick a voice

Pick a specific voice by passing its id as modelVoiceId. Run /v1/generation-options to list available voices per TTS model.

1curl -X POST $BASE_URL/v1/generations \
2 -H "x-api-key: $SIXART_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "prompt": "Say cheerfully: Have a wonderful day!",
6 "modelId": "gemini-3.1-flash-tts-preview",
7 "attachments": [],
8 "options": { "modelVoiceId": "Kore" }
9}'

Text-to-speech: pick by gender

Don't care about the specific voice? Pass a gender and Sixart picks a default voice for you.

1curl -X POST $BASE_URL/v1/generations \
2 -H "x-api-key: $SIXART_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "prompt": "Welcome to our show.",
6 "modelId": "gemini-3.1-flash-tts-preview",
7 "attachments": [],
8 "options": { "gender": "male" }
9}'

Music generation

Music models take a free-form description. Use the format option to control the output container.

1curl -X POST $BASE_URL/v1/generations \
2 -H "x-api-key: $SIXART_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "prompt": "Upbeat synthwave with driving bass, 120 BPM, energetic, instrumental only",
6 "modelId": "lyria-3-clip-preview",
7 "attachments": [],
8 "options": { "format": "mp3" }
9}'

Audio outputs don't use aspectRatio — leave it off the body.