- Third-party
- Zero data retention
MiniMax's music generation model that creates full-length songs with vocals from text prompts and lyrics, or instrumental tracks. Supports BPM/key control and auto-generated lyrics.
| Model Info | |
|---|---|
| Terms and License | link ↗ |
| More information | link ↗ |
| Zero data retention | Yes |
| Pricing | View pricing in the Cloudflare dashboard ↗ |
Usage
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt: 'An upbeat electronic dance track with a catchy synth melody and driving beat',
is_instrumental: false,
lyrics_optimizer: true,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "minimax/music-2.6",
"input": {
"prompt": "An upbeat electronic dance track with a catchy synth melody and driving beat",
"is_instrumental": false,
"lyrics_optimizer": true
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"audio": "https://minimax-algeng-chat-tts-us.oss-us-east-1.aliyuncs.com/music%2Fprod%2Ftts-20260417092034-QxSPMzdbiRxBSbDb.mp3"
},
"state": "Completed"
}Examples
With Lyrics — Generate a song with custom lyrics
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt: 'A warm acoustic folk ballad with fingerpicked guitar and gentle vocals',
is_instrumental: false,
lyrics:
'Walking down a dusty road\nWith the sunset painting gold\nEvery step a story told\nOf the places I call home',
lyrics_optimizer: false,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "minimax/music-2.6",
"input": {
"prompt": "A warm acoustic folk ballad with fingerpicked guitar and gentle vocals",
"is_instrumental": false,
"lyrics": "Walking down a dusty road\nWith the sunset painting gold\nEvery step a story told\nOf the places I call home",
"lyrics_optimizer": false
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"audio": "https://minimax-algeng-chat-tts-us.oss-us-east-1.aliyuncs.com/music%2Fprod%2Ftts-20260417091919-YiIxwmvIqXtREDcu.mp3"
},
"state": "Completed"
}Instrumental — Generate instrumental music without vocals
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt: 'A calm lo-fi hip hop instrumental with vinyl crackle and mellow piano chords',
is_instrumental: true,
lyrics_optimizer: false,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "minimax/music-2.6",
"input": {
"prompt": "A calm lo-fi hip hop instrumental with vinyl crackle and mellow piano chords",
"is_instrumental": true,
"lyrics_optimizer": false
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"audio": "https://minimax-algeng-chat-tts-us.oss-us-east-1.aliyuncs.com/music%2Fprod%2Ftts-20260417092057-LOwvBOOdyGvAyHkQ.mp3"
},
"state": "Completed"
}High Quality Audio — Specify audio format and sample rate
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt: 'An orchestral cinematic score building to an epic crescendo with full symphony',
format: 'wav',
is_instrumental: false,
lyrics_optimizer: true,
sample_rate: 44100,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "minimax/music-2.6",
"input": {
"prompt": "An orchestral cinematic score building to an epic crescendo with full symphony",
"format": "wav",
"is_instrumental": false,
"lyrics_optimizer": true,
"sample_rate": 44100
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"audio": "https://minimax-algeng-chat-tts-us.oss-us-east-1.aliyuncs.com/music%2Fprod%2Ftts-20260417092208-UGTfqDggHaemCDAW.wav"
},
"state": "Completed"
}Auto-Generated Lyrics — Let the model generate lyrics from the prompt
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt: 'A cheerful pop song about a summer road trip with friends',
is_instrumental: false,
lyrics_optimizer: true,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "minimax/music-2.6",
"input": {
"prompt": "A cheerful pop song about a summer road trip with friends",
"is_instrumental": false,
"lyrics_optimizer": true
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"audio": "https://minimax-algeng-chat-tts-us.oss-us-east-1.aliyuncs.com/music%2Fprod%2Ftts-20260417092245-UlqOBbhqSXtRPopt.mp3"
},
"state": "Completed"
}Parameters
prompt
stringrequiredmaxLength: 2000Description of the music style, mood, and scenariolyrics
stringminLength: 1maxLength: 3500Song lyrics, using \n to separate lines▶sample_rate
one of▶bitrate
one offormat
stringenum: mp3, wavAudio formatlyrics_optimizer
booleanrequireddefault: falseAutomatically generate lyrics based on the prompt descriptionis_instrumental
booleanrequireddefault: falseGenerate instrumental music (no vocals)audio
stringformat: uriURL to the generated audio file