Mage API · 音訊模型
MiniMax Music 3 API
依你的歌詞生成完整歌曲,開放權重
POST https://api.mage.space/v1/minimax_music/generate重點速覽
MiniMax Music 3 API 透過 Mage 在 POST https://api.mage.space/v1/minimax_music/generate 執行 MiniMax Music 3。使用預設設定的一次請求費用為 125 Gems(約 0.125 美元),無需訂閱。MiniMax Music 3 不支援 @handle 提及。
- 音訊輸出
- 1版本
- 125預設每段影片所需 Gems
- $0.125約合美元
總覽
MiniMax Music 3 API 能做什麼
MiniMax 的開放歌曲模型:可生成長達 5 分鐘的完整歌曲,由人聲演唱你的歌詞,也可以是純音樂,並依你描述的曲風、嗓音和編曲來塑造。支援 LoRA。
MiniMax 的開放權重歌曲模型:可生成長達 5 分鐘、人聲依你的歌詞演唱的完整歌曲,或純音樂,輸出為 44.1 kHz 立體聲 MP3,支援 LoRA。歌詞放在 `lyrics`,聲音風格寫在提示詞中。
僅憑提示詞即可生成。
快速開始
呼叫 MiniMax Music 3 API
設定 MAGE_API_KEY,提交到 /minimax_music/generate,然後輪詢 status_url,直到請求完成。
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/minimax_music/generate' \
--header "Authorization: Bearer $MAGE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Acoustic pop, 96 BPM, C major, warm and intimate, building into the chorus. Soft female lead, close and breathy, light harmonies in the chorus. Fingerpicked guitar and soft piano; brushed drums and upright bass enter in the chorus.",
"duration": "120",
"lyrics": "[verse]\nMorning light filtering through the pine\nEvery quiet street is yours and mine\n[chorus]\nSoftly the world begins to breathe",
"model_id": "minimax-music-3"
}' | jq -r '.status_url')
# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';
const mage = new Mage(); // reads MAGE_API_KEY
const request = await mage.run('minimax_music', {
prompt: 'Acoustic pop, 96 BPM, C major, warm and intimate, building into the chorus. Soft female lead, close and breathy, light harmonies in the chorus. Fingerpicked guitar and soft piano; brushed drums and upright bass enter in the chorus.',
duration: '120',
lyrics: '[verse]\nMorning light filtering through the pine\nEvery quiet street is yours and mine\n[chorus]\nSoftly the world begins to breathe',
model_id: 'minimax-music-3',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("minimax_music", {
"prompt": "Acoustic pop, 96 BPM, C major, warm and intimate, building into the chorus. Soft female lead, close and breathy, light harmonies in the chorus. Fingerpicked guitar and soft piano; brushed drums and upright bass enter in the chorus.",
"duration": "120",
"lyrics": "[verse]\nMorning light filtering through the pine\nEvery quiet street is yours and mine\n[chorus]\nSoftly the world begins to breathe",
"model_id": "minimax-music-3",
})
print(request["result"]["url"])模型
MiniMax Music 3 的 model_id 值
傳入 model_id 即可選擇版本。未指定時,請求會使用預設版本。
| model_id | 名稱 | 預設 |
|---|---|---|
| minimax-music-3 | MiniMax Music 3 | 是 |
選項
MiniMax Music 3 參數
以下為所有版本可接受的值;個別版本可能提供較少選項。各版本的選項請參閱文件。
| 欄位 | 可用值 |
|---|---|
| duration | 30, 60, 120, 180, 240, 300 |
規則
MiniMax Music 3 API 的限制
- 提示詞用來描述音樂,最多 4000 個字元:曲風、節奏與調性、情緒與層次推進、演唱者(請指定嗓音,否則歌曲可能變成純音樂)以及樂器。
- `lyrics` 放要演唱的歌詞,最多 6000 個字元。請把每個段落標籤([intro]、[verse]、[pre-chorus]、[chorus]、[bridge]、[outro])單獨放在一行:與標籤同一行的文字會被捨棄。
- 若要生成純音樂,請將 `lyrics` 留空,或把 `instrumental` 設為 true。
- `duration` 是歌曲的最長時長,也是計價依據;模型會在歌詞和編曲完成時結束歌曲,通常會更早結束。
更多音訊模型
Mage 上的其他 AI 音訊生成 API
Seed Audio API
一個提示詞,生成人聲、音樂和音效
Eleven Music API
ElevenLabs 歌曲生成,有人聲或純音樂皆可
Eleven Speech API
ElevenLabs v4:可自由掌控的擬真語音
常見問題
常見問題
MiniMax Music 3 API 的費用是多少?
使用預設設定(MiniMax Music 3)的一次 MiniMax Music 3 請求費用為 125 Gems,約 0.125 美元。其他解析度、時長和版本會改變價格,實際扣款金額以回應內容為準。生成失敗會退款;被 Mage 內容政策攔截的生成則不予退款。
MiniMax Music 3 API 的端點是什麼?
使用 POST https://api.mage.space/v1/minimax_music/generate,並在 Authorization: Bearer 標頭中帶入你的 Mage API 金鑰。回應中會包含 status_url,可用來輪詢結果。
可以呼叫哪些 MiniMax Music 3 模型?
minimax-music-3(MiniMax Music 3)。預設為 MiniMax Music 3。
MiniMax Music 3 支援參考圖片或角色嗎?
MiniMax Music 3 不接受圖片、影片或音訊輸入,也不支援 @handle 提及。
可以在 Claude 或 ChatGPT 中使用 MiniMax Music 3 嗎?
可以。將 Mage MCP 伺服器連接到 Claude、ChatGPT、Claude Code、Grok 或 Cursor,直接說出 MiniMax Music 3 的名稱即可。你的助理會用 get_model 讀取它的選項,並在生成前告知價格。
MiniMax Music 3 的生成結果會保存多久?
結果與輸入內容會保存 30 天。想留存的內容,請自行下載到你的儲存空間。
開始使用 Mage 打造你的作品
一個帳號、一份 Gems 餘額,通用所有模型。只需為你生成的內容付費。