PopNowAPI 文件
主要內容

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選填booleantrue—Write lyrics from the prompt when lyrics is empty. Lyrics you send are sung as written.
instrumental選填booleanfalse—Generate music with no vocals; lyrics are not needed.
bitrate選填integer25600032000, 64000, 128000, 256000MP3 bitrate in bits per second.
sample_rate選填integer4410016000, 24000, 32000, 44100Sample rate in Hz.

請求範例

這段請求原樣就能執行,沒寫的欄位都用預設值。執行前請先把金鑰放進環境變數 POPNOW_API_KEY。

POST /api/v1/jobs/createTask
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 等候通知。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

接下來

本頁內容