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

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,
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Response 200

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',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Response 200
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,
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Response 200
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',
lyrics_optimizer: true,
sample_rate: 44100,
format: 'wav',
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Response 200
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,
},
{
gateway: { id: 'default' },
}
)
console.log(response)
Response 200

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

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"prompt": {
"description": "Description of the music style, mood, and scenario",
"type": "string",
"maxLength": 2000
},
"lyrics": {
"description": "Song lyrics, using \\n to separate lines",
"type": "string",
"minLength": 1,
"maxLength": 3500
},
"sample_rate": {
"description": "Audio sample rate",
"anyOf": [
{
"type": "number",
"const": 16000
},
{
"type": "number",
"const": 24000
},
{
"type": "number",
"const": 32000
},
{
"type": "number",
"const": 44100
}
]
},
"bitrate": {
"description": "Audio bitrate",
"anyOf": [
{
"type": "number",
"const": 32000
},
{
"type": "number",
"const": 64000
},
{
"type": "number",
"const": 128000
},
{
"type": "number",
"const": 256000
}
]
},
"format": {
"description": "Audio format",
"type": "string",
"enum": [
"mp3",
"wav"
]
},
"lyrics_optimizer": {
"description": "Automatically generate lyrics based on the prompt description",
"default": false,
"type": "boolean"
},
"is_instrumental": {
"description": "Generate instrumental music (no vocals)",
"default": false,
"type": "boolean"
}
},
"required": [
"prompt",
"lyrics_optimizer",
"is_instrumental"
],
"additionalProperties": false
}