MiniMax Music 3.0 API 呼叫參考
立體聲完整成曲,可有人聲也可純音樂
只要一把 PopNow API 金鑰,就能在自己的程式裡呼叫 MiniMax Music 3.0。以下列出要填的呼叫名稱、這個型號接受的每個輸入欄位、每次請求花多少點數,以及一段可以直接貼進終端機執行的請求。
參數說明直接取自型號的輸入 schema,目前只有英文。
總覽
- 開發商
- MiniMax
- 產出
- 音訊
- 起價
- 27 點 每次請求 ($0.27)
1 點 = 0.01 美元。任務受理時會先保留可能的最高費用,完成後依實際用量結算、無條件進位到整點,多保留的會退回;失敗的任務不扣點數。想在執行前知道確切數字,請先呼叫 POST /api/v1/jobs/quote。
音樂
minimax/music-3.0/text-to-audio
價格
| 選項 | 點數 (每次請求) | 美元 |
|---|---|---|
預設 | 27 | $0.27 |
參數
| 欄位 | 型別 | 預設值 | 可用值 | 用途 |
|---|---|---|---|---|
prompt必填 | string | — | 最多 2000 個字元 | Style brief for the song: genre, mood, tempo, instruments and the kind of voice. The words to sing go in lyrics. |
lyrics選填 | string | — | 最多 3000 個字元 | Words to sing, one line per row. Section tags such as [Verse], [Chorus] and [Bridge] on their own rows shape the arrangement. |
generate_lyrics選填 | boolean | true | — | Write lyrics from the prompt when lyrics is empty. Lyrics you send are sung as written. |
instrumental選填 | boolean | false | — | Generate music with no vocals; lyrics are not needed. |
bitrate選填 | integer | 256000 | 32000, 64000, 128000, 256000 | MP3 bitrate in bits per second. |
sample_rate選填 | integer | 44100 | 16000, 24000, 32000, 44100 | Sample rate in Hz. |
請求範例
這段請求原樣就能執行,沒寫的欄位都用預設值。執行前請先把金鑰放進環境變數 POPNOW_API_KEY。
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "minimax/music-3.0/text-to-audio",
"input": {
"prompt": "An upbeat indie pop song about a summer road trip, bright guitars, hand claps and a catchy whistled hook"
}
}'回應會立刻帶回 taskId。之後用 GET /api/v1/jobs/recordInfo 取得結果,或在請求裡加上 callBackUrl 等候通知。
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
