POST
/v2/minimax/generateMiniMax Music Generate API
Generate music through the integrated MiniMax engine.
POST
https://udioapi.pro/api/v2/minimax/generateTips
MiniMax engine: Use this endpoint only when you specifically want the integrated MiniMax engine. The default Music Generate flow remains /v2/generate.
Engine task: This route creates an async MiniMax task and returns a task_id.
Credit cost: 30 credits per generation request.
Polling: Call /v2/minimax/feed?workId=... every 5-10 seconds until the task is SUCCESS or FAILED.
Callback: Pass callback_url to receive a POST notification when the task reaches SUCCESS or FAILED.
Request Headers
| Name | Required | Description |
|---|---|---|
NameAuthorization | RequiredYes | DescriptionBearer token for authentication |
NameContent-Type | RequiredYes | Descriptionapplication/json |
Request Body
MiniMax generation request
Common Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Parameterprompt | Typestring | RequiredYes | DescriptionMusic generation prompt | ExampleCinematic orchestral pop, emotional female vocal, warm piano, strings, gradual build, polished studio mix. |
Parameterlyrics | Typestring | RequiredYes | DescriptionRequired for MiniMax Music 2.5; 10–3000 characters. | ExampleVerse 1: The city lights are fading\nChorus: We rise into the morning glow |
Parameterbitrate | Typenumber | RequiredNo | DescriptionAudio bitrate | Example256000 |
Parametersample_rate | Typenumber | RequiredNo | DescriptionAudio sample rate | Example44100 |
Parametercallback_url | Typestring | RequiredNo | DescriptionOptional callback URL | Examplehttps://api.example.com/webhooks/minimax |
Parameterpublic | Typeboolean | RequiredNo | DescriptionWhether task can be public | Examplefalse |
Response Fields
Generate Response
| Field | Type | Description | Example |
|---|---|---|---|
Fieldcode | Typenumber | DescriptionResponse code. 200 means the task was created successfully. | Example200 |
Fieldmessage | Typestring | DescriptionHuman-readable response message. | Examplesuccess |
Fielddata.task_id | Typestring | DescriptionMiniMax generation task ID. Use it as workId when polling the feed endpoint. | Examplen74abc123music |
Fielddata.status | Typestring | DescriptionInitial task status. | ExampleIN_PROGRESS |
Responses
json
{
"code": 200,
"message": "success",
"data": {
"task_id": "n74abc123music",
"status": "IN_PROGRESS",
"type": "text2music"
}
}Code Examples
curl
curl -X POST "https://udioapi.pro/api/v2/minimax/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Cinematic orchestral pop, emotional female vocal, warm piano, strings, gradual build, polished studio mix.",
"lyrics": "Verse 1: The city lights are fading\nChorus: We rise into the morning glow",
"bitrate": 256000,
"sample_rate": 44100,
"callback_url": "https://api.example.com/webhooks/minimax"
}'