Retrieve Music
September 25, 2024 (August 17, 2026)
Table of contents
Retrieve a single song created with POST music/create. Poll this endpoint until statusFinal is true, at which point audio_url holds the MP3 and duration is set.
Supplying a replyUrl on the original create call avoids polling altogether — we POST this same object to your URL as soon as the track finishes.
https://api.useapi.net/v1/minimax/music/{musicId}
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Query Parameters
musicIdis required, the value returned by POST music/create. Path parameter, for exampleuser:12345-minimax:123456789012345678-music:987654321098765.
Notes:
- Poll every 15 to 20 seconds. Generation time varies with the model, the length of the song, and how busy MiniMax is.
- When
quantitywas greater than1, eachmusicIdfinishes independently — poll each one.
Status values
| status | statusLabel | statusFinal | Notes |
|---|---|---|---|
| 0 | pending | false | Queued, not started |
| 1 | processing | false | Rendering — audio_url empty, duration 0 |
| 2 | completed | true | audio_url and duration are set |
| 4 | moderated | true | Rejected by content moderation |
Responses
-
{ "musicId": "user:12345-minimax:123456789012345678-music:987654321098765", "title": "Lisbon Rain", "idea": "warm nylon guitar, slow bossa nova, about a rainy afternoon in Lisbon", "lyrics": "[Verse]\nThe tram climbs up the hill\n[Chorus]\nAnd the rain keeps falling still", "audio_url": "https://cdn.hailuoai.video/moss/prod/2026-08-16-02/moss-audio/user_music/1700000000000000000-987654321098765.mp3", "cover_url": "https://cdn.hailuoai.video/moss/staging/2025-06-22-16/music_cover/1700000000000000001-other_43.png", "model": "music-3.0", "status": 2, "statusLabel": "completed", "statusFinal": true, "instrumental": false, "duration": 138472, "create_time": 1786849532637, "update_time": 1786849671000, "is_favorite": false, "author_info": { "user_name": "Your Name", "avatar": "https://cdn.hailuoai.video/moss/prod/2026-03-02-06/user/user_avatar/1700000000000000003-avatar_123456789012345678" }, "tag_list": [ { "tag_name": "warm nylon guitar, slow bossa nova, about a rainy afternoon in Lisbon", "tag_type": 1 } ] } -
{ "error": "Path parameter musicId (bogus) has incorrect format", "code": 400 } -
{ "error": "Unauthorized", "code": 401 } -
{ "error": "Music user:12345-minimax:123456789012345678-music:987654321098765 not found. Possibly moderated prompt." } -
596 Account Error
{ "error": "Your minimax account has pending error. Please address this issue at https://useapi.net/docs/api-minimax-v1/post-minimax-accounts-account before making any new API calls.", "code": 596 }
Model
{ // TypeScript, all fields are optional
musicId: string,
title: string,
idea: string, // The prompt used to generate this track
lyrics: string, // Yours, or written by the model
audio_url: string, // MP3, 256 kbps 44.1 kHz stereo. Empty until complete
cover_url: string,
model: string, // music-3.0 | music-2.6
status: number, // See the status table above
statusLabel: string,
statusFinal: boolean,
instrumental: boolean,
duration: number, // Milliseconds, 0 until complete
create_time: number,
update_time: number,
is_favorite: boolean,
author_info: { user_name: string, avatar: string },
tag_list: [{ tag_name: string, tag_type: number }]
}
Examples
-
curl "https://api.useapi.net/v1/minimax/music/user:12345-minimax:123456789012345678-music:987654321098765" \ -H "Authorization: Bearer …" -
const musicId = "user:12345-minimax:123456789012345678-music:987654321098765"; while (true) { const response = await fetch(`https://api.useapi.net/v1/minimax/music/${musicId}`, { headers: { "Authorization": "Bearer …" } }); const track = await response.json(); if (track.statusFinal) { console.log(track.status === 2 ? track.audio_url : "moderated"); break; } await new Promise(resolve => setTimeout(resolve, 20000)); } -
import requests, time music_id = "user:12345-minimax:123456789012345678-music:987654321098765" while True: response = requests.get( f"https://api.useapi.net/v1/minimax/music/{music_id}", headers={"Authorization": "Bearer …"} ) track = response.json() if track["statusFinal"]: print(track["audio_url"] if track["status"] == 2 else "moderated") break time.sleep(20)
Try It
Once the song is finished the response includes an audio_url, and the console shows a player so you can listen to it here.