POST
/v2/minimax/generateMiniMax 提供商生成 API
通过集成的 MiniMax 提供程序生成音乐。
POST
https://udioapi.pro/api/v2/minimax/generatetips
MiniMax 提供商:仅在你明确需要接入 MiniMax 时使用此 endpoint。默认音乐生成流程仍是 /v2/generate。
Provider 任务:此路由会创建异步 MiniMax 任务并返回 task_id。
积分消耗:每次生成请求 30 credits。
轮询:每 5-10 秒调用 /v2/minimax/feed?workId=...,直到任务为 SUCCESS 或 FAILED。
回调:传入 callback_url,任务到达 SUCCESS 或 FAILED 时会收到 POST 通知。
requestHeaders
| name | required | description |
|---|---|---|
Authorization | yes | 用于身份验证的承载令牌 |
Content-Type | yes | application/json |
requestBody
MiniMax 生成请求
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
prompt | string | yes | 音乐生成提示 | Cinematic orchestral pop, emotional female vocal, warm piano, strings, gradual build, polished studio mix. |
lyrics | string | no | 可选歌词 | Verse 1: The city lights are fading\nChorus: We rise into the morning glow |
bitrate | number | no | 音频比特率 | 256000 |
sample_rate | number | no | 音频采样率 | 44100 |
callback_url | string | no | 可选回调 URL | https://api.example.com/webhooks/minimax |
public | boolean | no | 任务是否可以公开 | false |
响应字段
生成响应
| field | paramType | description | example |
|---|---|---|---|
code | number | 响应码。200 表示任务创建成功。 | 200 |
message | string | 人类可读的响应消息。 | success |
data.task_id | string | MiniMax 生成任务 ID。轮询 feed 端点时将其用作 workId。 | n74abc123music |
data.status | string | 任务初始状态。 | IN_PROGRESS |
responses
json
{
"code": 200,
"message": "success",
"data": {
"task_id": "n74abc123music",
"status": "IN_PROGRESS",
"type": "text2music"
}
}codeExamples
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"
}'