MiniMax Format (MiniMax Music)
Generate songs via POST /v1/chat/completions with SSE streaming. Available models: minimax-music-v2.6 / minimax-music-v3.0 (priced separately, see the Model Plaza). Heartbeat chunks arrive every 15 seconds during generation, followed by the song download URL — no task submission or polling, and no risk of "billed but never delivered" from intermediate timeouts.
Music generation is also available in the Volcengine Format: the async task API (doubao-music-bgm / doubao-music-song, submit → poll → download) and the pre-upgrade synchronous endpoint (Legacy Guide) — choose by model and integration style.
Call Flow
- Send the request:
POST /v1/chat/completionswithstream: true(mandatory) and the creation parameters insidemetadata; - Read the stream: during generation (about 40–341 seconds; instrumental takes longer) an empty heartbeat chunk arrives every 15 seconds; once done, one chunk's
delta.contentis the song mp3 URL; - Download the audio: open the URL and save the file. The URL is valid for 12 hours — transfer it promptly.
stream must be true, and the request must carry a messages array. Set the client timeout to 600 seconds or more.
Request Parameters
At least one of prompt / lyrics / is_instrumental is required. Three usage patterns:
- Custom lyrics:
lyrics(required) + optionalprompt(style description) - Auto lyrics:
lyrics_optimizer: true+prompt(song theme), nolyrics - Instrumental:
is_instrumental: true+prompt(required), nolyrics
Examples
Streaming response excerpt (heartbeats omitted):
Billing & Errors
- Billing: the final chunk's
usage.prompt_tokensis the usage for this request (100000 per song), priced by model ratio; check the console "Usage Logs" for details. - Failures: upstream business errors arrive quickly as
delta.contenttext ("生成失败(未计费): ..." — generation failed, not billed) with little to no charge; you will never be billed without receiving the result. - The audio URL is valid for 12 hours — download and transfer promptly.
Appendix: Suno Task Format (Deprecated)
The Suno task format was deprecated on 2026-09-21: the /suno/* endpoints are offline and return 404. Use "MiniMax Music (chat streaming)" above or the new Volcengine async task API instead. The content below is kept for reference only.
Async task protocol (Suno format): submitting returns a task ID immediately, and the client polls the task status until the song is done. It suits scenarios that need batch submission and poll-based management in a task queue; the currently available model is minimax-music-2.0 (MiniMax Music 2.0, billed per song, subject to the Model Plaza).
Call Flow
- Submit the task:
POST /suno/submit/music, returns a task ID; - Poll the task:
GET /suno/fetch/{task_id}(single) orPOST /suno/fetch(batch, body{"ids": [...]}), untilstatusbecomesSUCCESS/FAIL; - Download the audio: the task object's
data[].audio_urlis the song mp3 URL (valid for 7 days — transfer it to your own storage promptly).
Submit Parameters
Fill in at least one of gpt_description_prompt (inspiration mode) and prompt (custom-mode lyrics); when both are provided, generation follows "lyrics + style".
Submit response: {"code":"success","message":"","data":"<task ID>"}; on failure {"code":"fail","message":"<error reason>"}.
Task Object
Submit body example for custom mode (lyrics + style):
mv must be passed explicitly as minimax-music-2.0: with this protocol a missing model name gets filled by the gateway with a Suno default (chirp-v3-0), which is not supported on this site — the request returns an "unsupported model" error.
Billing is per song, regardless of song duration (in our testing, an auto-written-lyrics ~3-minute full song and a short-lyrics snippet cost the same); generation takes 1–5 minutes, which is normal — poll every 10 seconds and allow at least 5 minutes total. The song mp3 URL is valid for 7 days; for commercial use, transfer it to your own storage promptly.
