Music 2.6
A powerful music generation model optimized for high-quality song production, capable of creating fully arranged tracks from lyrics and style instructions with precise control over tempo, key, structure, vocal performance, and emotional progression.
How to Make a Call
API Schemas
Generate music sample
This endpoint generates a music piece based on the prompt (which includes style instructions) and the provided lyrics. It returns a generation task ID, its status, and related metadata.
A description of the music, specifying style, mood, and scenario. Length: 10–2000 characters.
Lyrics of the song. Use ( ) to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. Length: 10–3000 characters.
[Verse] Streetlights flicker, the night breeze sighs Shadows stretch as I walk alone An old coat wraps my silent sorrow Wandering, longing, where should I go [Chorus] Pushing the wooden door, the aroma spreads In a familiar corner, a stranger gazesWhether to automatically generate lyrics based on the prompt description. When set to true and lyrics is empty, the system will automatically generate lyrics from the prompt.
falseWhether to generate instrumental music (no vocals). When set to true, the lyrics field is not required.
falseThe ID of the generated audio.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl -L \
--request POST \
--url 'https://api.aimlapi.com/v2/generate/audio' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"model": "minimax/music-2.0",
"prompt": "Lo-fi pop hip-hop ambient music, slow intro: 10 s, then faster and with loud bass: 10 s",
"lyrics": "[Verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes back\nWarm lights flicker, memories awaken\nIn this small cafe, I find my way\n[Verse]\nRaindrops tap on the windowpane\nA melody plays, soft and low\nThe clink of cups, the murmur of dreams\nIn this haven, I find my home\n[Chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes back\nWarm lights flicker, memories awaken\nIn this small cafe, I find my way..."
}'{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"audio_file": {
"url": "https://cdn.aimlapi.com/generations/hippopotamus/1757963033314-8ca7729d-b78c-4d4c-9ef9-89b2fb3d07e8.mp3"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}Retrieve the generated music sample from the server
After sending a request for music generation, this task is added to the queue. This endpoint lets you check the status of a audio generation task using its id, obtained from the endpoint described above.
If the video generation task status is complete, the response will include the final result — with the generated audio URL and additional metadata.
Bearer key
<REPLACE_WITH_YOUR_GENERATION_ID>The ID of the generated audio.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl -L \
--request GET \
--url 'https://api.aimlapi.com/v2/generate/audio?generation_id=<REPLACE_WITH_YOUR_GENERATION_ID>' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>'{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"audio_file": {
"url": "https://cdn.aimlapi.com/eagle/files/lion/5N4F_QWb5K8rDSHfpUN0S_output.wav"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000
}
}
}Quick Code Example
Here’s an example of generating an audio file using a prompt with style instructions and a separate parameter for the lyrics.
Listen to the track we generated:
Last updated
Was this helpful?