Skip to content
Docs
MiniMax logo

MiniMax Music 2.6

Music GenerationMiniMax

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',
is_instrumental: false,
lyrics_optimizer: true,
},
)
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',
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)
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',
is_instrumental: true,
lyrics_optimizer: false,
},
)
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',
format: 'wav',
is_instrumental: false,
lyrics_optimizer: true,
sample_rate: 44100,
},
)
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',
is_instrumental: false,
lyrics_optimizer: true,
},
)
console.log(response)

Parameters

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

API Schemas (Raw)

Input
Output