Skip to content
MiniMax logo

MiniMax Music 2.6

Music GenerationMiniMaxProxied

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 Licenselink
More informationlink
PricingView pricing in the Cloudflare dashboard

Usage

TypeScript
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt:
'An upbeat electronic dance track with a catchy synth melody and driving beat',
lyrics_optimizer: true,
is_instrumental: false,
},
{
gateway: { id: 'default' },
}
)
console.log(response)

Examples

With Lyrics — Generate a song with custom lyrics
TypeScript
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt:
'A warm acoustic folk ballad with fingerpicked guitar and gentle vocals',
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,
is_instrumental: false,
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Instrumental — Generate instrumental music without vocals
TypeScript
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',
lyrics_optimizer: false,
is_instrumental: true,
},
{
gateway: { id: 'default' },
}
)
console.log(response)
High Quality Audio — Specify audio format and sample rate
TypeScript
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt:
'An orchestral cinematic score building to an epic crescendo with full symphony',
sample_rate: 44100,
format: 'wav',
lyrics_optimizer: true,
is_instrumental: false,
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Auto-Generated Lyrics — Let the model generate lyrics from the prompt
TypeScript
const response = await env.AI.run(
'minimax/music-2.6',
{
prompt: 'A cheerful pop song about a summer road trip with friends',
lyrics_optimizer: true,
is_instrumental: false,
},
{
gateway: { id: 'default' },
}
)
console.log(response)

Parameters

prompt
stringrequiredmaxLength: 2000Description of the music style, mood, and scenario
lyrics
stringminLength: 1maxLength: 3500Song lyrics, using \n to separate lines
format
stringenum: mp3, wavAudio format
lyrics_optimizer
booleanrequireddefault: falseAutomatically generate lyrics based on the prompt description
is_instrumental
booleanrequireddefault: falseGenerate instrumental music (no vocals)

API Schemas (Raw)

Input
Output