curl --request POST \ --url https://api.minimax.io/v1/music_generation \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: <content-type>' \ --data '{ "model": "music-3.0", "prompt": "Indie folk, melancholic, introspective, longing, solitary walk, coffee shop", "lyrics": "[verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes", "audio_setting": { "sample_rate": 44100, "bitrate": 256000, "format": "mp3" }}'
import requests
url = "https://api.minimax.io/v1/music_generation"
payload = {
"model": "music-3.0",
"prompt": "Indie folk, melancholic, introspective, longing, solitary walk, coffee shop",
"lyrics": "[verse]
Streetlights flicker, the night breeze sighs
Shadows stretch as I walk alone
An old coat wraps my silent sorrow
Wandering, longing, where should I go
[chorus]
Pushing the wooden door, the aroma spreads
In a familiar corner, a stranger gazes",
"audio_setting": {
"sample_rate": 44100,
"bitrate": 256000,
"format": "mp3"
}
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
model: 'music-3.0',
prompt: 'Indie folk, melancholic, introspective, longing, solitary walk, coffee shop',
lyrics: '[verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes',
audio_setting: {sample_rate: 44100, bitrate: 256000, format: 'mp3'}
})
};
fetch('https://api.minimax.io/v1/music_generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimax.io/v1/music_generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'music-3.0',
'prompt' => 'Indie folk, melancholic, introspective, longing, solitary walk, coffee shop',
'lyrics' => '[verse]
Streetlights flicker, the night breeze sighs
Shadows stretch as I walk alone
An old coat wraps my silent sorrow
Wandering, longing, where should I go
[chorus]
Pushing the wooden door, the aroma spreads
In a familiar corner, a stranger gazes',
'audio_setting' => [
'sample_rate' => 44100,
'bitrate' => 256000,
'format' => 'mp3'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.minimax.io/v1/music_generation"
payload := strings.NewReader("{\n \"model\": \"music-3.0\",\n \"prompt\": \"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop\",\n \"lyrics\": \"[verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes\",\n \"audio_setting\": {\n \"sample_rate\": 44100,\n \"bitrate\": 256000,\n \"format\": \"mp3\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.minimax.io/v1/music_generation")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"model\": \"music-3.0\",\n \"prompt\": \"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop\",\n \"lyrics\": \"[verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes\",\n \"audio_setting\": {\n \"sample_rate\": 44100,\n \"bitrate\": 256000,\n \"format\": \"mp3\"\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/music_generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"model\": \"music-3.0\",\n \"prompt\": \"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop\",\n \"lyrics\": \"[verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes\",\n \"audio_setting\": {\n \"sample_rate\": 44100,\n \"bitrate\": 256000,\n \"format\": \"mp3\"\n }\n}"
response = http.request(request)
puts response.read_body
Use this API to generate a song from lyrics and a prompt.
POST
/
v1
/
music_generation
Music Generation
curl --request POST \ --url https://api.minimax.io/v1/music_generation \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: <content-type>' \ --data '{ "model": "music-3.0", "prompt": "Indie folk, melancholic, introspective, longing, solitary walk, coffee shop", "lyrics": "[verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes", "audio_setting": { "sample_rate": 44100, "bitrate": 256000, "format": "mp3" }}'
import requests
url = "https://api.minimax.io/v1/music_generation"
payload = {
"model": "music-3.0",
"prompt": "Indie folk, melancholic, introspective, longing, solitary walk, coffee shop",
"lyrics": "[verse]
Streetlights flicker, the night breeze sighs
Shadows stretch as I walk alone
An old coat wraps my silent sorrow
Wandering, longing, where should I go
[chorus]
Pushing the wooden door, the aroma spreads
In a familiar corner, a stranger gazes",
"audio_setting": {
"sample_rate": 44100,
"bitrate": 256000,
"format": "mp3"
}
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: 'Bearer <token>'},
body: JSON.stringify({
model: 'music-3.0',
prompt: 'Indie folk, melancholic, introspective, longing, solitary walk, coffee shop',
lyrics: '[verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes',
audio_setting: {sample_rate: 44100, bitrate: 256000, format: 'mp3'}
})
};
fetch('https://api.minimax.io/v1/music_generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimax.io/v1/music_generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'music-3.0',
'prompt' => 'Indie folk, melancholic, introspective, longing, solitary walk, coffee shop',
'lyrics' => '[verse]
Streetlights flicker, the night breeze sighs
Shadows stretch as I walk alone
An old coat wraps my silent sorrow
Wandering, longing, where should I go
[chorus]
Pushing the wooden door, the aroma spreads
In a familiar corner, a stranger gazes',
'audio_setting' => [
'sample_rate' => 44100,
'bitrate' => 256000,
'format' => 'mp3'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.minimax.io/v1/music_generation"
payload := strings.NewReader("{\n \"model\": \"music-3.0\",\n \"prompt\": \"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop\",\n \"lyrics\": \"[verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes\",\n \"audio_setting\": {\n \"sample_rate\": 44100,\n \"bitrate\": 256000,\n \"format\": \"mp3\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.minimax.io/v1/music_generation")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"model\": \"music-3.0\",\n \"prompt\": \"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop\",\n \"lyrics\": \"[verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes\",\n \"audio_setting\": {\n \"sample_rate\": 44100,\n \"bitrate\": 256000,\n \"format\": \"mp3\"\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/music_generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"model\": \"music-3.0\",\n \"prompt\": \"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop\",\n \"lyrics\": \"[verse]\\nStreetlights flicker, the night breeze sighs\\nShadows stretch as I walk alone\\nAn old coat wraps my silent sorrow\\nWandering, longing, where should I go\\n[chorus]\\nPushing the wooden door, the aroma spreads\\nIn a familiar corner, a stranger gazes\",\n \"audio_setting\": {\n \"sample_rate\": 44100,\n \"bitrate\": 256000,\n \"format\": \"mp3\"\n }\n}"
response = http.request(request)
puts response.read_body
Starting August 20, 2026, the paid APIs (Music Generation and Lyrics Generation) will no longer be available to new users; existing paying users can continue to use the current API services. The free music generation APIs (Music-3.0-free, Music-2.6-free, music-cover-free) will be discontinued.To experience or use music generation capabilities, please visit MiniMax Audio, or use the open-source MiniMax Music 3 model on Hugging Face.
For music-cover / music-cover-free: Optional. If omitted, lyrics are automatically extracted from the reference audio via ASR. Length: 10–1000 characters.
When lyrics_optimizer: true and lyrics is empty, the system will auto-generate lyrics from prompt.
URL of the reference audio. Only used with music-cover / music-cover-free model. Exactly one of audio_url or audio_base64 must be provided. Mutually exclusive with cover_feature_id.
Reference audio constraints:
Duration: 6 seconds to 6 minutes
Size: max 50 MB
Format: common audio formats (mp3, wav, flac, etc.)
Base64-encoded reference audio. Only used with music-cover / music-cover-free model. Exactly one of audio_url or audio_base64 must be provided. Mutually exclusive with cover_feature_id.
Reference audio constraints:
Duration: 6 seconds to 6 minutes
Size: max 50 MB
Format: common audio formats (mp3, wav, flac, etc.)
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MiniMax API Docs","colors":{"primary":"#181E25","dark":"#181E25"},"logo":{"light":"https://mintcdn.com/minimax-cac98058/XYzsL2L2ynonu2Q_/logo/light.svg?fit=max\u0026auto=format\u0026n=XYzsL2L2ynonu2Q_\u0026q=85\u0026s=9c99bb2678d62388d8a4e7cce1750858","dark":"https://mintcdn.com/minimax-cac98058/XYzsL2L2ynonu2Q_/logo/dark.svg?fit=max\u0026auto=format\u0026n=XYzsL2L2ynonu2Q_\u0026q=85\u0026s=e62ef6e36d7512de91c8c48322614594","href":"https://minimax.io"},"favicon":"https://mintcdn.com/minimax-cac98058/3KE0RwwD41Lh3xt2/favicon.ico?fit=max\u0026auto=format\u0026n=3KE0RwwD41Lh3xt2\u0026q=85\u0026s=6a58247013972686c0a551c6c6b98d66","api":{"examples":{"prefill":true}},"appearance":{"default":"system","strict":false},"navbar":{"primary":{"type":"button","label":"Console","href":"https://platform.minimax.io/console/home"}},"footer":{"socials":{"discord":"https://www.minimax.io/discord","x":"https://x.com/MiniMax_AI","linkedin":"https://www.linkedin.com/company/minimax-ai","github":"https://github.com/MiniMax-AI"},"links":[{"header":"Model","items":[{"label":"MiniMax M3.1 Flash","href":"https://www.minimax.io/blog/minimax-m31f"},{"label":"MiniMax M3","href":"https://www.minimax.io/blog/minimax-m3"},{"label":"MiniMax H3","href":"https://www.minimax.io/blog/minimax-h3"},{"label":"MiniMax Speech 2.8","href":"https://www.minimax.io/news/minimax-speech-28"},{"label":"MiniMax Music 3.0","href":"https://www.minimax.io/blog/minimax-music-3-0-next-generation-open-weights-production-ready-versatile-music-model"}]},{"header":"Product","items":[{"label":"MiniMax Code","href":"https://agent.minimax.io/"},{"label":"MiniMax Design","href":"https://design.minimax.io/"},{"label":"MiniMax Audio","href":"https://www.minimax.io/audio"}]},{"header":"API Platform","items":[{"label":"Developer Docs","href":"https://platform.minimax.io/docs/guides/models-intro"},{"label":"M Plan Subscription","href":"https://www.minimax.io/m-plan"},{"label":"Pricing","href":"https://platform.minimax.io/docs/pricing/overview"},{"label":"Console Login","href":"https://platform.minimax.io/console/home"},{"label":"Status","href":"https://status.minimax.io/"}]},{"header":"Company","items":[{"label":"About Us","href":"https://www.minimax.io/about"},{"label":"News","href":"https://www.minimax.io/news"},{"label":"Investor Relations","href":"https://ir.minimax.io/"},{"label":"Careers","href":"https://www.minimax.io/careers"}]}]},"seo":{"metatags":{"title":"MiniMax API Docs","description":"MiniMax Open Platform developer documentation with model API references, integration guides, tool setup, and billing information for building AI applications.","charset":"UTF-8","canonical":"https://platform.minimax.io/docs","viewport":"width=device-width, initial-scale=1.0"},"indexing":"all"},"fonts":{"family":"DM Sans"},"icons":{"library":"lucide"},"integrations":{"telemetry":{"enabled":true},"cookies":{"key":"minimax_docs_feedback_consent","value":"v1:granted"}},"banner":{"content":"The next-generation image model MiniMax H3 Image is now available! [View docs →](/docs/guides/image-generation)","dismissible":true},"contextual":{"options":["copy","view","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"minimax-cac98058","hasAudioNarration":false,"actualSubdomain":"minimax-cac98058","customDomains":["platform.minimax.io"],"gitSource":{"type":"github","owner":"minimax-ai-dev","repo":"docs","deployBranch":"main","contentDirectory":"packages/docs-en","isPrivate":true,"mountPath":"","label":""},"feedback":{"issues":false,"thumbs":true,"edits":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af4231d0b89564432bc4e43","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API","count":49},{"language":"default","tag":"Developer Guides","count":33},{"language":"default","tag":"Use Guides","count":23},{"language":"default","tag":"M Plan","count":18},{"language":"default","tag":"Speech","count":17},{"language":"default","tag":"Text","count":14},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"Tools","count":9},{"language":"default","tag":"Legacy APIs","count":8},{"language":"default","tag":"Video","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableAskAiSearchBar":false},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".audio-container{height:50px;margin:16px 0}.video-agent-templates{width:300px;height:180px;object-fit:cover}video{border-radius:12px}table{overflow-x:auto}th,td{vertical-align:middle!important}td .video-agent-templates{margin:0}#navbar .docs-platform-brand{display:inline-flex;align-items:center;flex-shrink:0}#navbar .docs-platform-name{margin-left:20px;padding-left:20px;border-left:1px solid #e5e7eb;color:#6b7280;font-size:14px;font-weight:400;line-height:20px;white-space:nowrap}.dark #navbar .docs-platform-name{border-color:#374151;color:#9ca3af}#topbar-cta-button>a>span,#navbar .docs-console-mobile>span{background-color:#242424;border-radius:8px}#topbar-cta-button>a:hover>span,#navbar .docs-console-mobile:hover>span{background-color:#3a3a3a}#navbar .docs-console-mobile{display:none}#navbar nav:has(#topbar-cta-button){margin-right:0}@media (max-width: 1023px){#navbar .docs-platform-name{margin-left:12px;padding-left:12px;font-size:12px}#navbar .docs-console-mobile{position:relative;display:inline-flex;align-items:center;flex-shrink:0;padding:8px 10px;font-size:12px;font-weight:500;white-space:nowrap}}@media (max-width: 480px){#navbar .docs-topbar-row{column-gap:4px}#navbar .docs-platform-brand .nav-logo{width:80px;height:auto}#navbar .docs-platform-name{max-width:60px;margin-left:8px;padding-left:8px;font-size:11px;line-height:14px;white-space:normal}#navbar .docs-console-mobile{padding:8px;font-size:11px}#navbar :has(>#search-bar-entry-mobile){gap:6px}#navbar #search-bar-entry-mobile{width:24px}}#content-container p{font-size:1rem;line-height:1.5rem}.eyebrow{text-transform:uppercase}.method-nav-pill>span{font-weight:400}*:has(>.method-pill){border:none}.navbar-link>a{font-weight:400}.nav-tabs-item{font-weight:400}.nav-tabs-item.text-gray-800{font-weight:500}*:has(>.navbar-link)>.navbar-link:first-child>a{color:#181e25;font-weight:500}.dark *:has(>.navbar-link)>.navbar-link:first-child>a{color:#fff}#navbar,#sidebar{letter-spacing:0.02em}.callout{margin-top:2rem;margin-bottom:2rem}#content:has(>.model-retirement-notice:first-child){margin-top:1rem}.callout.model-retirement-notice{margin-top:0}.mplan-tool-intro{margin:16px 0;padding:12px 16px;border-left:4px solid #d97706;border-radius:6px;background:#fffbeb}.dark .mplan-tool-intro{background:rgba(120, 53, 15, 0.22);color:#e5e7eb}.dark .mplan-tool-intro a{color:#fbbf24!important;border-bottom-color:#fbbf24!important}.card span{line-height:1.4rem;margin-top:8px!important}#banner a{border-bottom-color:#181E25;color:#FFF}#footer a[href=\"mailto:api@minimax.io\"] svg{-webkit-mask-image:url('https://filecdn.minimax.chat/public/45f6ad6e-f42e-45ed-938e-7de67bfd367f.svg')!important;mask-image:url('https://filecdn.minimax.chat/public/45f6ad6e-f42e-45ed-938e-7de67bfd367f.svg')!important}#sidebar:has(a[href$=\"/pricing/overview\"]),#sidebar:has(a[href$=\"/pricing/overview/\"]){visibility:hidden}.pricing-sidebar-navigation{display:none}@media (min-width: 1024px){#content:has([data-pricing-sidebar]){container-type:normal;contain:none;isolation:auto}.pricing-sidebar-navigation{--pricing-sidebar-top: calc(var(--mintlify-slot-header-height, calc(4rem + var(--topbar-tabs-height, 3rem))) + var(--banner-height, 0px));display:block;position:fixed;z-index:20;top:var(--pricing-sidebar-top);left:max(2rem, calc((100vw - 92rem) / 2 + 2rem));width:var(--sidebar-width, 18rem);height:calc(100dvh - var(--pricing-sidebar-top));box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:40px 24px 32px 0;margin:0}}[data-pricing-overview-active] [data-pricing-original]{display:none!important}.pricing-anchor-navigation{font-size:14px;line-height:1.5}.pricing-navigation-group+.pricing-navigation-group{margin-top:28px}.pricing-navigation-title{display:block;margin:0 0 10px;padding-left:16px;color:#111827;font-size:inherit;font-weight:600;line-height:1.5}.pricing-anchor-navigation .pricing-anchor-link{display:block;padding:6px 12px 6px 16px;margin:1px 0;border:0;border-radius:12px;color:#374151;line-height:1.5;text-decoration:none;overflow-wrap:anywhere}.pricing-anchor-navigation .pricing-anchor-link:hover{background:rgba(75, 85, 99, .05);color:#111827}.pricing-anchor-navigation .pricing-anchor-link[aria-current=\"location\"]{background:rgba(24, 30, 37, .075);color:#181e25;font-weight:600}.pricing-anchor-link:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.pricing-section-toc{font-size:14px;line-height:1.5}.pricing-toc-title{margin-bottom:12px;color:#374151;font-weight:500}.pricing-section-toc .pricing-anchor-link{display:block;border:0;padding:5px 0 5px 12px;border-left:1px solid #e5e7eb;color:#6b7280;text-decoration:none;overflow-wrap:anywhere}.pricing-section-toc .pricing-anchor-link[aria-current=\"location\"]{border-left:2px solid #181e25;color:#181e25;font-weight:500}.pricing-mobile-navigation{display:none}#pricing-document .pricing-section,#pricing-document .pricing-section [id]{scroll-margin-top:10rem}.dark .pricing-navigation-title,.dark .pricing-toc-title{color:#e5e7eb}.dark .pricing-anchor-navigation .pricing-anchor-link,.dark .pricing-section-toc .pricing-anchor-link{color:#9ca3af}.dark .pricing-anchor-navigation .pricing-anchor-link:hover{background:rgba(229, 231, 235, .05);color:#d1d5db}.dark .pricing-anchor-navigation .pricing-anchor-link[aria-current=\"location\"]{background:rgba(229, 231, 235, .1);color:#f3f4f6}.dark .pricing-section-toc .pricing-anchor-link{border-left-color:#374151}.dark .pricing-section-toc .pricing-anchor-link[aria-current=\"location\"]{border-left-color:#e5e7eb;color:#e5e7eb}@media (max-width: 1023px){#pricing-document .pricing-mobile-navigation{display:block;margin:0 0 24px}#pricing-document .pricing-mobile-navigation>.accordion{margin-bottom:0}#pricing-document .pricing-mobile-navigation .pricing-anchor-navigation{max-height:min(65vh, 560px);overflow-y:auto;padding:8px 12px 20px;overscroll-behavior:contain}}#pricing-document>.pricing-section{margin-top:56px;padding-top:40px;border-top:1px solid #e5e7eb}#pricing-document>.pricing-overview+.pricing-section{margin-top:36px;border-top:0}#pricing-document>.pricing-section>h2:first-child{margin-top:0}#pricing-document .pricing-overview>span[data-as=\"p\"],#pricing-document .pricing-section>span[data-as=\"p\"]{display:block;margin:1em 0}.dark #pricing-document>.pricing-section{border-color:#374151}@media (max-width: 767px){#pricing-document>.pricing-section{margin-top:40px;padding-top:28px}}#pricing-document section[id=\"models/text\"] table{table-layout:fixed;width:100%}#pricing-document section[id=\"models/text\"] table th:first-child,#pricing-document section[id=\"models/text\"] table td:first-child{width:32%}#pricing-document section[id=\"models/video\"] table{table-layout:fixed;width:100%}#pricing-document section[id=\"models/video\"] table th:first-child,#pricing-document section[id=\"models/video\"] table td:first-child{width:30%}#pricing-document .video-price-table,#pricing-document .video-task-table{display:table;table-layout:fixed;width:100%}#pricing-document .video-price-table td:has(>strong)+td,#pricing-document .video-price-table tbody tr:not(:has(strong))>td:first-child{padding-left:24px}#pricing-document .video-price-table thead th:nth-child(2){padding-left:24px}.restricted-doc{--restricted-border: rgba(15, 23, 42, .12);--restricted-border-strong: rgba(15, 23, 42, .18);--restricted-muted: #64748b;--restricted-surface: rgba(15, 23, 42, .035);--restricted-surface-hover: rgba(15, 23, 42, .055);--restricted-link: #2563eb;color:inherit}.dark .restricted-doc{--restricted-border: rgba(255, 255, 255, .12);--restricted-border-strong: rgba(255, 255, 255, .18);--restricted-muted: #94a3b8;--restricted-surface: rgba(255, 255, 255, .045);--restricted-surface-hover: rgba(255, 255, 255, .07);--restricted-link: #60a5fa}.restricted-doc-loading{min-height:12rem;display:flex;align-items:center;justify-content:center}.restricted-doc-spinner{width:1.75rem;height:1.75rem;border:2px solid rgba(98,112,132,.24);border-top-color:#627084;border-radius:50%;animation:restricted-doc-spin .75s linear infinite}@keyframes restricted-doc-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.restricted-doc-spinner{animation-duration:1.5s}}.restricted-doc>h1{margin:0 0 .75rem;font-size:2.25rem;line-height:1.2;font-weight:700;letter-spacing:-.025em}.restricted-doc-description{margin:0 0 2rem;color:var(--restricted-muted);font-size:1.05rem;line-height:1.7}.restricted-doc h2,.restricted-doc h3,.restricted-doc h4{scroll-margin-top:6rem;font-weight:650;letter-spacing:-.015em}.restricted-doc h2{margin:2.75rem 0 1rem;padding-top:.25rem;font-size:1.65rem;line-height:1.35}.restricted-doc h3{margin:2.1rem 0 .75rem;font-size:1.3rem;line-height:1.4}.restricted-doc h4{margin:1.6rem 0 .5rem;font-size:1.1rem;line-height:1.45}.restricted-doc>p{margin:1rem 0}.restricted-doc p,.restricted-doc li{line-height:1.75}.restricted-doc ul,.restricted-doc ol{margin:1rem 0;padding-left:1.5rem}.restricted-doc li{padding-left:.15rem}.restricted-doc li+li{margin-top:.3rem}.restricted-doc li>p{margin:.25rem 0}.restricted-doc a{color:var(--restricted-link);text-decoration:underline;text-decoration-color:color-mix(in srgb, var(--restricted-link) 35%, transparent);text-underline-offset:.2em}.restricted-doc a:hover{text-decoration-color:currentColor}.restricted-doc :not(pre)>code{padding:.15rem .4rem;border:1px solid var(--restricted-border);border-radius:.35rem;background:var(--restricted-surface);font-size:.875em;font-weight:500}.restricted-doc-table-wrap{max-width:100%;margin:1.5rem 0;overflow-x:auto;border:1px solid var(--restricted-border-strong);border-radius:.75rem}.restricted-doc table{width:100%;border-collapse:separate;border-spacing:0;font-size:.925rem;line-height:1.55}.restricted-doc th,.restricted-doc td{min-width:7rem;padding:.75rem 1rem;border-bottom:1px solid var(--restricted-border);vertical-align:top;text-align:left}.restricted-doc th+th,.restricted-doc td+td{border-left:1px solid var(--restricted-border)}.restricted-doc th{background:var(--restricted-surface);font-weight:600;color:inherit}.restricted-doc tbody tr{transition:background-color .15s ease}.restricted-doc tbody tr:hover{background:var(--restricted-surface-hover)}.restricted-doc tr:last-child td{border-bottom:0}.restricted-doc-code{position:relative;margin:1.5rem 0;border:1px solid rgba(255,255,255,.09);border-radius:.75rem;background:#0f172a;color:#e5e7eb;box-shadow:0 1px 2px rgba(15,23,42,.08);overflow:hidden}.restricted-doc-code pre{margin:0;padding:1.1rem 1.2rem;overflow-x:auto;background:transparent}.restricted-doc-code code{display:block;min-width:max-content;padding-right:3.5rem;font-size:.85rem;line-height:1.7;white-space:pre;tab-size:2}.restricted-doc-code button{position:absolute;z-index:1;top:.65rem;right:.65rem;padding:.3rem .6rem;border:1px solid rgba(255,255,255,.16);border-radius:.4rem;background:rgba(30,41,59,.92);color:#cbd5e1;font-size:.75rem;line-height:1.25rem;cursor:pointer;transition:color .15s ease, border-color .15s ease, background-color .15s ease}.restricted-doc-code button:hover{border-color:rgba(255,255,255,.28);background:#334155;color:#fff}.restricted-doc-code .hljs-comment,.restricted-doc-code .hljs-quote{color:#7f8ea3;font-style:italic}.restricted-doc-code .hljs-keyword,.restricted-doc-code .hljs-selector-tag,.restricted-doc-code .hljs-literal,.restricted-doc-code .hljs-section,.restricted-doc-code .hljs-link{color:#c792ea}.restricted-doc-code .hljs-string,.restricted-doc-code .hljs-title,.restricted-doc-code .hljs-name,.restricted-doc-code .hljs-type,.restricted-doc-code .hljs-attribute,.restricted-doc-code .hljs-symbol,.restricted-doc-code .hljs-bullet,.restricted-doc-code .hljs-addition,.restricted-doc-code .hljs-variable,.restricted-doc-code .hljs-template-tag,.restricted-doc-code .hljs-template-variable{color:#addb67}.restricted-doc-code .hljs-number,.restricted-doc-code .hljs-meta,.restricted-doc-code .hljs-built_in,.restricted-doc-code .hljs-builtin-name,.restricted-doc-code .hljs-params{color:#f78c6c}.restricted-doc-code .hljs-attr,.restricted-doc-code .hljs-selector-id,.restricted-doc-code .hljs-selector-class,.restricted-doc-code .hljs-selector-attr,.restricted-doc-code .hljs-selector-pseudo{color:#ffcb6b}.restricted-doc-code .hljs-function,.restricted-doc-code .hljs-class .hljs-title{color:#82aaff}.restricted-doc-code .hljs-regexp,.restricted-doc-code .hljs-deletion{color:#ff5370}.restricted-doc-code .hljs-emphasis{font-style:italic}.restricted-doc-code .hljs-strong{font-weight:700}.restricted-doc-callout{margin:1.5rem 0;padding:.9rem 1rem;border:1px solid rgba(59,130,246,.22);border-radius:.65rem;background:rgba(59,130,246,.07)}.restricted-doc-callout>:first-child{margin-top:0}.restricted-doc-callout>:last-child{margin-bottom:0}.restricted-doc blockquote{margin:1.5rem 0;padding:.1rem 0 .1rem 1.1rem;border-left:2px solid var(--restricted-border-strong);color:var(--restricted-muted);font-style:italic}.restricted-doc blockquote>:first-child{margin-top:0}.restricted-doc blockquote>:last-child{margin-bottom:0}.restricted-doc-toc ul{margin:.6rem 0 0;padding:0;list-style:none}.restricted-doc-toc li{margin:.35rem 0;line-height:1.35}.restricted-doc-toc li[data-level=\"3\"]{padding-left:.75rem}.restricted-doc-toc li[data-level=\"4\"]{padding-left:1.5rem}.restricted-doc-toc a{color:var(--restricted-muted);text-decoration:none}.restricted-doc-toc a:hover{color:var(--restricted-link)}.restricted-doc-toc-title{font-weight:600}.restricted-doc-not-found{min-height:20rem;padding:4rem 0;text-align:center}.restricted-doc-not-found h1{font-size:3rem}@media (max-width: 768px){.restricted-doc>h1{font-size:1.85rem}.restricted-doc th,.restricted-doc td{min-width:6.5rem;padding:.65rem .75rem}.restricted-doc-code pre{padding:1rem}}"}],"page":{"pagePath":"api-reference/music-generation","slug":"/api-reference/music-generation","pageMetadata":{"title":"Music Generation","description":"Use this API to generate a song from lyrics and a prompt.","openapi":"POST /v1/music_generation","href":"/api-reference/music-generation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use this API to generate a song from lyrics and a prompt.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,p:`p`,..._provideComponents(),...props.components},{Note}=_components;if(!Note)_missingMdxReference(`Note`,true);return _jsxs(Note,{title:`Music API Service Adjustment Notice`,children:[_jsx(_components.p,{children:`Starting August 20, 2026, the paid APIs (Music Generation and Lyrics Generation) will no longer be available to new users; existing paying users can continue to use the current API services. The free music generation APIs (Music-3.0-free, Music-2.6-free, music-cover-free) will be discontinued.`}),_jsxs(_components.p,{children:[`To experience or use music generation capabilities, please visit `,_jsx(_components.a,{href:`https://www.minimax.io/audio`,children:`MiniMax Audio`}),`, or use the open-source `,_jsx(_components.a,{href:`https://huggingface.co/MiniMaxAI/MiniMax-Music3`,children:`MiniMax Music 3 model on Hugging Face`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Music Generation","description":"Use this API to generate a song from lyrics and a prompt.","openapi":"POST /v1/music_generation","href":"/api-reference/music-generation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/minimax-cac98058/74cbedfd7ddc6a81/scripts/auto-token.js","/docs/_mintlify/custom/minimax-cac98058/08175b8daa74cd64/scripts/logo.js","/docs/_mintlify/custom/minimax-cac98058/bdfa294452778802/scripts/head-userinfo.js","/docs/_mintlify/custom/minimax-cac98058/ee26a6e83cc5ae7f/scripts/navbar-same-tab.js","/docs/_mintlify/custom/minimax-cac98058/b2a91de372d716f8/scripts/pricing-dropdown.js","/docs/_mintlify/custom/minimax-cac98058/c76999ca41eb4aec/scripts/domain-link-rewrite.js","/docs/_mintlify/custom/minimax-cac98058/4fe58d73df53e822/scripts/cookie-consent.js","/docs/_mintlify/custom/minimax-cac98058/444224329a77c4b1/scripts/page-view-tracking.js","/docs/_mintlify/custom/minimax-cac98058/07d15e8ada8d8bbf/scripts/restricted-docs-core.js","/docs/_mintlify/custom/minimax-cac98058/409396746d530a03/scripts/restricted-docs-highlight.js","/docs/_mintlify/custom/minimax-cac98058/728362c2608a54be/scripts/restricted-docs.js","/docs/_mintlify/custom/minimax-cac98058/50d87c5c4c9a98b0/scripts/rum.js","/docs/_mintlify/custom/minimax-cac98058/fbc61270b1626c86/scripts/pricing-navigation.js","/docs/_mintlify/custom/minimax-cac98058/b067abec70d0dbb6/scripts/feedback-consent.js"],"openApiReferenceData":{"operation":{"summary":"Music Generation","operationId":"generateMusic","tags":["Music"],"parameters":["b9435221-7381-4b82-b983-b7eac2338617"],"requestBody":"d7d009ac-1949-4818-bfc7-0beafde6cd0a","responses":{"200":"bf91441c-3cfd-486d-8d63-cceaf9742655"},"method":"post","type":"path","servers":["42931e50-1364-4778-9582-d76814d1f44b"],"security":["76aa86d1-2ecd-49b4-8461-980ba1d61c0b"],"path":"/v1/music_generation","baseUrlOptions":["https://api.minimax.io"],"title":"Music Generation","description":"Use this API to generate a song from lyrics and a prompt.","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.model":"music-3.0","body.prompt":"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop","body.lyrics":"[verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes","body.audio_setting.sample_rate":44100,"body.audio_setting.bitrate":256000,"body.audio_setting.format":"mp3"}]},"dependencies":{"parameters":{"b9435221-7381-4b82-b983-b7eac2338617":{"name":"Content-Type","in":"header","required":true,"description":"The media type of the request body. Must be set to `application/json` to ensure the data is sent in JSON format.","schema":{"type":"string","enum":["application/json"],"default":"application/json","isRequired":true,"description":"The media type of the request body. Must be set to `application/json` to ensure the data is sent in JSON format.","uniqueKey":"","typeLabel":"enum\u003cstring>"}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string","description":"The model name. Options:\n\n- `music-3.0` (recommended): Text-to-music generation. Rate limit: 120 RPM.\n- `music-2.6`: Previous-generation text-to-music model. Rate limit: 120 RPM.\n- `music-cover`: Cover generation from a reference audio. Rate limit: 120 RPM.\n- `music-3.0-free`: Free-tier version of `music-3.0`. Rate limit: 3 RPM.\n- `music-2.6-free`: Free-tier version of `music-2.6`. Rate limit: 3 RPM.\n- `music-cover-free`: Free-tier version of `music-cover`. Rate limit: 3 RPM.","enum":["music-3.0","music-2.6","music-cover","music-3.0-free","music-2.6-free","music-cover-free"],"isRequired":true,"uniqueKey":"model","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","description":"A description of the music, specifying style, mood, and scenario.\n\nFor example: \"`Pop, melancholic, perfect for a rainy night`\".\n\u003cbr>\nNote:\n- For `music-3.0` / `music-3.0-free` / `music-2.6` / `music-2.6-free` with `is_instrumental: true`: Required. Length: 1–2000 characters.\n- For `music-3.0` / `music-3.0-free` / `music-2.6` / `music-2.6-free` (non-instrumental): Optional. Length: 0–2000 characters.\n- For `music-cover` / `music-cover-free`: Required. Describes the target cover style. Length: 10–300 characters.","maxLength":2000,"uniqueKey":"prompt","typeLabel":"string"},"lyrics":{"type":"string","description":"Song lyrics, using `\\n` to separate lines. Supports structure tags: `[Intro]`, `[Verse]`, `[Pre Chorus]`, `[Chorus]`, `[Interlude]`, `[Bridge]`, `[Outro]`, `[Post Chorus]`, `[Transition]`, `[Break]`, `[Hook]`, `[Build Up]`, `[Inst]`, `[Solo]`.\n\u003cbr>\nNote:\n- For `music-3.0` / `music-3.0-free` / `music-2.6` / `music-2.6-free` with `is_instrumental: true`: Not required.\n- For `music-3.0` / `music-3.0-free` / `music-2.6` / `music-2.6-free` (non-instrumental): Required. Length: 1–3500 characters.\n- For `music-cover` / `music-cover-free`: Optional. If omitted, lyrics are automatically extracted from the reference audio via ASR. Length: 10–1000 characters.\n- When `lyrics_optimizer: true` and `lyrics` is empty, the system will auto-generate lyrics from `prompt`.","minLength":1,"maxLength":3500,"uniqueKey":"lyrics","typeLabel":"string"},"stream":{"type":"boolean","description":"Whether to use streaming output.","default":false,"uniqueKey":"stream","typeLabel":"boolean"},"output_format":{"type":"string","description":"The output format of the audio. Options: `url` or `hex`.\n\nWhen `stream` is `true`, only `hex` is supported.\n\n⚠️ Note: `url` links expire after 24 hours, so download promptly.","enum":["url","hex"],"default":"hex","uniqueKey":"output_format","typeLabel":"enum\u003cstring>"},"audio_setting":{"type":"object","description":"Audio output configuration","properties":{"sample_rate":{"type":"integer","description":"Sampling rate. Options: `16000`, `24000`, `32000`, `44100`.","uniqueKey":"audio_setting.sample_rate","typeLabel":"integer"},"bitrate":{"type":"integer","description":"Bitrate. Options: `32000`, `64000`, `128000`, `256000`.","uniqueKey":"audio_setting.bitrate","typeLabel":"integer"},"format":{"type":"string","description":"Audio format. Options: `mp3`, `wav`, `pcm`.","enum":["mp3","wav","pcm"],"uniqueKey":"audio_setting.format","typeLabel":"enum\u003cstring>"}},"uniqueKey":"audio_setting","typeLabel":"object"},"lyrics_optimizer":{"type":"boolean","description":"Whether to automatically generate lyrics based on the `prompt` description. Only supported on `music-3.0` / `music-3.0-free` / `music-2.6` / `music-2.6-free`.\n\nWhen set to `true` and `lyrics` is empty, the system will automatically generate lyrics from the prompt. Default: `false`.","default":false,"uniqueKey":"lyrics_optimizer","typeLabel":"boolean"},"is_instrumental":{"type":"boolean","description":"Whether to generate instrumental music (no vocals). Only supported on `music-3.0` / `music-3.0-free` / `music-2.6` / `music-2.6-free`.\n\nWhen set to `true`, the `lyrics` field is not required. Default: `false`.","default":false,"uniqueKey":"is_instrumental","typeLabel":"boolean"},"audio_url":{"type":"string","description":"URL of the reference audio. Only used with `music-cover` / `music-cover-free` model. Exactly one of `audio_url` or `audio_base64` must be provided. Mutually exclusive with `cover_feature_id`.\n\nReference audio constraints:\n- Duration: 6 seconds to 6 minutes\n- Size: max 50 MB\n- Format: common audio formats (mp3, wav, flac, etc.)","uniqueKey":"audio_url","typeLabel":"string"},"audio_base64":{"type":"string","description":"Base64-encoded reference audio. Only used with `music-cover` / `music-cover-free` model. Exactly one of `audio_url` or `audio_base64` must be provided. Mutually exclusive with `cover_feature_id`.\n\nReference audio constraints:\n- Duration: 6 seconds to 6 minutes\n- Size: max 50 MB\n- Format: common audio formats (mp3, wav, flac, etc.)","uniqueKey":"audio_base64","typeLabel":"string"},"cover_feature_id":{"type":"string","description":"Feature ID returned by the [Music Cover Preprocess](/api-reference/music-cover-preprocess) API. Used in the **two-step cover workflow** to generate a cover with modified lyrics.\n\nOnly used with `music-cover` / `music-cover-free` model. Mutually exclusive with `audio_url` and `audio_base64`.\n\n- When provided, `lyrics` is required (length: 10–1000 characters)\n- The `cover_feature_id` is valid for 24 hours\n- Same audio content returns the same `cover_feature_id`","uniqueKey":"cover_feature_id","typeLabel":"string"}},"example":{"model":"music-3.0","prompt":"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop","lyrics":"[verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes","audio_setting":{"sample_rate":44100,"bitrate":256000,"format":"mp3"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"music-3.0","prompt":"Indie folk, melancholic, introspective, longing, solitary walk, coffee shop","lyrics":"[verse]\nStreetlights flicker, the night breeze sighs\nShadows stretch as I walk alone\nAn old coat wraps my silent sorrow\nWandering, longing, where should I go\n[chorus]\nPushing the wooden door, the aroma spreads\nIn a familiar corner, a stranger gazes","audio_setting":{"sample_rate":44100,"bitrate":256000,"format":"mp3"}}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"bf91441c-3cfd-486d-8d63-cceaf9742655":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"integer","description":"Music generation status:\n\n1: In progress\n\n2: Completed","uniqueKey":"data.status","typeLabel":"integer"},"audio":{"type":"string","description":"Returned when `output_format` is `hex`.\n\nContains the audio file as a hexadecimal-encoded string.","uniqueKey":"data.audio","typeLabel":"string"}},"uniqueKey":"data","typeLabel":"object"},"base_resp":{"type":"object","description":"Status code and details","properties":{"status_code":{"type":"integer","description":"Status codes and their meanings:\n\n`0`: Success\n\n`1002`: Rate limit triggered, retry later\n\n`1004`: Authentication failed, check API Key\n\n`1008`: Insufficient balance\n\n`1026`: Content flagged for sensitive material\n\n`2013`: Invalid parameters, check input\n\n`2049`: Invalid API Key\n\nFor more information, please refer to the [Error Code Reference](/api-reference/errorcode).","uniqueKey":"base_resp.status_code","typeLabel":"integer"},"status_msg":{"type":"string","description":"Detailed error message","uniqueKey":"base_resp.status_msg","typeLabel":"string"}},"uniqueKey":"base_resp","typeLabel":"object"}},"example":{"data":{"audio":"hex-encoded audio data","status":2},"trace_id":"04ede0ab069fb1ba8be5156a24b1e081","extra_info":{"music_duration":25364,"music_sample_rate":44100,"music_channel":2,"bitrate":256000,"music_size":813651},"analysis_info":null,"base_resp":{"status_code":0,"status_msg":"success"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"audio":"hex-encoded audio data","status":2},"trace_id":"04ede0ab069fb1ba8be5156a24b1e081","extra_info":{"music_duration":25364,"music_sample_rate":44100,"music_channel":2,"bitrate":256000,"music_size":813651},"analysis_info":null,"base_resp":{"status_code":0,"status_msg":"success"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"76aa86d1-2ecd-49b4-8461-980ba1d61c0b":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"`HTTP: Bearer Auth`\n- Security Scheme Type: http\n- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account Management>API Keys](https://platform.minimax.io/user-center/basic-information/interface-key).","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"42931e50-1364-4778-9582-d76814d1f44b":{"url":"https://api.minimax.io"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"`HTTP: Bearer Auth`\n- Security Scheme Type: http\n- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account Management>API Keys](https://platform.minimax.io/user-center/basic-information/interface-key).","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"`HTTP: Bearer Auth`\n- Security Scheme Type: http\n- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account Management>API Keys](https://platform.minimax.io/user-center/basic-information/interface-key).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/music/api/openapi.json"},"subdomain":"minimax-cac98058","siteName":"MiniMax API Docs","title":"Music Generation - MiniMax API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-18T07:45:40.185Z","originalFileLocation":"api-reference/music-generation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use this API to generate a song from lyrics and a prompt.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MiniMax API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Music Generation - MiniMax API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use this API to generate a song from lyrics and a prompt.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MiniMax API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://platform.minimax.io/docs/api-reference/music-generation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://minimax-cac98058.mintlify.site/docs/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Music+Generation\u0026amp;description=Use+this+API+to+generate+a+song+from+lyrics+and+a+prompt.\u0026amp;theme=329045bc9618e343e09b4393\u0026amp;signature=8060dc94602f8f7cac0c3f8b4bcaeea3cdc04638cb61a164677fb13aaa9d3631\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Music Generation - MiniMax API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use this API to generate a song from lyrics and a prompt.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://minimax-cac98058.mintlify.site/docs/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Music+Generation\u0026amp;description=Use+this+API+to+generate+a+song+from+lyrics+and+a+prompt.\u0026amp;theme=329045bc9618e343e09b4393\u0026amp;signature=8060dc94602f8f7cac0c3f8b4bcaeea3cdc04638cb61a164677fb13aaa9d3631\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MiniMax API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#181E25\">\u003cmeta data-mint-head name=\"charset\" content=\"UTF-8\">\u003cmeta data-mint-head name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://platform.minimax.io/docs/api-reference/music-generation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/music-generation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://platform.minimax.io/#organization\",\"name\":\"MiniMax API Docs\",\"url\":\"https://platform.minimax.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/minimax-cac98058/XYzsL2L2ynonu2Q_/logo/light.svg?fit=max\u0026auto=format\u0026n=XYzsL2L2ynonu2Q_\u0026q=85\u0026s=9c99bb2678d62388d8a4e7cce1750858\"}},{\"@type\":\"WebSite\",\"@id\":\"https://platform.minimax.io/docs#website\",\"name\":\"MiniMax API Docs\",\"url\":\"https://platform.minimax.io/docs\",\"publisher\":{\"@id\":\"https://platform.minimax.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://platform.minimax.io/docs/api-reference/music-generation#webpage\",\"url\":\"https://platform.minimax.io/docs/api-reference/music-generation\",\"name\":\"Music Generation\",\"description\":\"Use this API to generate a song from lyrics and a prompt.\",\"dateModified\":\"2026-08-18T07:45:40.185Z\",\"isPartOf\":{\"@id\":\"https://platform.minimax.io/docs#website\"}},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://platform.minimax.io/docs/api-reference/music-generation#apireference\",\"headline\":\"Music Generation\",\"name\":\"Music Generation\",\"description\":\"Use this API to generate a song from lyrics and a prompt.\",\"url\":\"https://platform.minimax.io/docs/api-reference/music-generation\",\"mainEntityOfPage\":{\"@id\":\"https://platform.minimax.io/docs/api-reference/music-generation#webpage\"},\"dateModified\":\"2026-08-18T07:45:40.185Z\",\"publisher\":{\"@id\":\"https://platform.minimax.io/#organization\"},\"isPartOf\":{\"@id\":\"https://platform.minimax.io/docs#website\"}}]}\u003c/script>","agentPointerHref":"/docs/api-reference/music-generation.md","siteName":"MiniMax API Docs","nav":{"global":null,"tabs":[{"tab":"Developer Guides","groups":[{"group":"Get started","pages":[{"title":"Models","href":"/guides/models-intro"},{"group":"Quick Start","pages":[{"title":"Prerequisites","href":"/guides/quickstart-preparation"},{"title":"Integrate via SDK","href":"/guides/quickstart-sdk"}]}]},{"group":"Use Guides","pages":[{"group":"Text","pages":[{"title":"Model Invocation","href":"/guides/text-generation"},{"title":"Prompt Caching","href":"/api-reference/text-prompt-caching"},{"title":"Tool Use \u0026 Interleaved Thinking","href":"/guides/text-m3-function-call"},{"title":"Server Tools","sidebarTitle":"Server Tools","tag":"Beta","href":"/guides/server-tools"},{"group":"Tech Blog","pages":[{"title":"Aligning to What? Rethinking Agent Generalization in MiniMax M2","sidebarTitle":"Agent Generalization in MiniMax M2","href":"/guides/text-m2-agent-generalization"},{"title":"Why Did MiniMax M2 End Up as a Full Attention Model?","sidebarTitle":"MiniMax M2: Full Attention Model","href":"/guides/text-m2-full-attention"},{"title":"What makes good reasoning data","href":"/guides/text-m2-reasoning"}]}]},{"group":"Video","pages":[{"title":"Video Generation","href":"/guides/video-generation"},{"title":"H3 Feature Highlights","href":"/guides/video-prompt"}]},{"group":"Image","pages":[{"title":"Image Generation Guide","href":"/guides/image-generation"}]},{"group":"Speech","pages":[{"title":"Speech-to-Text","href":"/guides/speech-to-text"},{"title":"Voice Clone","href":"/guides/speech-voice-clone"},{"title":"Synchronous Text-to-Speech Guide (WebSocket)","href":"/guides/speech-t2a-websocket"},{"title":"Async Long TTS Guide","href":"/guides/speech-t2a-async"},{"title":"System Voice ID List","mode":"wide","href":"/faq/system-voice-id"}]},{"group":"MCP","pages":[{"title":"Introduction to the Model Context Protocol (MCP)","href":"/guides/mcp-guide"},{"title":"M Plan MCP Guide","href":"/guides/token-plan-mcp-guide"}]},{"group":"Local \u0026 Self-hosted","pages":[{"title":"Run and self-host MiniMax Open Models","href":"/guides/local-deploy"},{"title":"Self-host MiniMax-M3.1-Flash","href":"/guides/local-deploy-m3-1-flash"},{"title":"Self-host MiniMax-M3","href":"/guides/local-deploy-m3"},{"title":"Deploy MiniMax-M2.7","href":"/guides/local-deploy-m2-7"},{"title":"Self-host MiniMax Music 3","href":"/guides/local-deploy-music-3"},{"title":"Run and self-host MiniMax H3","href":"/guides/local-deploy-h3"}]}]},{"group":"FAQs","pages":[{"title":"Model List","href":"/faq/models"},{"title":"About APIs","href":"/faq/about-apis"},{"title":"About Account","href":"/faq/about-account"},{"title":"Contact Us","href":"/faq/contact-us"}]},{"group":"Terms \u0026 Policy","pages":[{"title":"Terms of Service","url":"https://platform.minimax.io/protocol/terms-of-service","href":"/guides/terms-of-service"},{"title":"Privacy Policy","url":"https://platform.minimax.io/protocol/privacy-policy","href":"/guides/privacy-policy"},{"title":"Transparency","href":"/guides/transparency"}]}]},{"tab":"API","groups":[{"group":"Using the API","pages":[{"title":"API Overview","sidebarTitle":"API Overview","href":"/api-reference/api-overview"},{"title":"Rate Limits","href":"/guides/rate-limits"},{"title":"Error Codes","sidebarTitle":"Error Code Reference","href":"/api-reference/errorcode"}]},{"group":"Text","icon":"text-align-start","pages":[{"title":"Anthropic SDK","sidebarTitle":"Anthropic SDK (Recommended)","href":"/api-reference/text-anthropic-api"},{"title":"OpenAI SDK","sidebarTitle":"OpenAI SDK","href":"/api-reference/text-openai-api"},{"title":"AI SDK","sidebarTitle":"AI SDK","href":"/api-reference/text-ai-sdk"},{"group":"Anthropic Messages API","pages":[{"title":"Create Message","sidebarTitle":"Create Message","openapi":"api-reference/text/api/openapi-chat-anthropic.json POST /anthropic/v1/messages","href":"/api-reference/text-chat-anthropic"}]},{"group":"OpenAI Chat Completions API","pages":[{"title":"Create Chat Completion","sidebarTitle":"Create Chat Completion","openapi":"api-reference/text/api/openapi-chat-openai.json POST /v1/chat/completions","href":"/api-reference/text-chat-openai"}]},{"group":"OpenAI Responses API","pages":[{"title":"Create Response","sidebarTitle":"Create Response","openapi":"api-reference/text/api/openapi-responses.json POST /v1/responses","href":"/api-reference/responses-create"},{"title":"Estimate Input Tokens","sidebarTitle":"Estimate Input Tokens","openapi":"api-reference/text/api/openapi-responses.json POST /v1/responses/input_tokens","href":"/api-reference/responses-input-tokens"}]}]},{"group":"Video","icon":"video","pages":[{"group":"MiniMax-H3","pages":[{"title":"Create Video Generation Task","sidebarTitle":"Create Video Generation Task","openapi":"api-reference/video/generation/api/v2-video-generation.json POST /v2/video_generation","href":"/api-reference/video-generation-v2-create"},{"title":"Query Task","sidebarTitle":"Query Task","openapi":"api-reference/video/generation/api/v2-video-generation.json GET /v2/query/video_generation/{task_id}","href":"/api-reference/video-generation-v2-query"},{"title":"List Tasks","sidebarTitle":"List Tasks","openapi":"api-reference/video/generation/api/v2-video-generation.json GET /v2/query/video_generation","href":"/api-reference/video-generation-v2-list"},{"title":"Cancel or Delete Task","sidebarTitle":"Cancel or Delete Task","openapi":"api-reference/video/generation/api/v2-video-generation.json DELETE /v2/video_generation/{task_id}","href":"/api-reference/video-generation-v2-delete"},{"title":"Create H3-Context-IR Task","sidebarTitle":"Create H3-Context-IR Task","openapi":"api-reference/video/generation/api/v2-video-generation.json POST /v2/h3_context_ir","href":"/api-reference/video-generation-v2-h3-context-ir"},{"title":"Create Video Regeneration Task","sidebarTitle":"Create Video Regeneration Task","openapi":"api-reference/video/generation/api/v2-video-generation.json POST /v2/video_regeneration","href":"/api-reference/video-generation-v2-regeneration"}]}]},{"group":"Image","icon":"image","pages":[{"group":"MiniMax-H3-Image","tag":"NEW","pages":[{"title":"Text-to-Image","sidebarTitle":"Text-to-Image","openapi":"api-reference/image/generation/api/h3-image-generations.json POST /v1/images/generations","href":"/api-reference/image-generation-h3-generations"},{"title":"Image Edit","sidebarTitle":"Image Edit","openapi":"api-reference/image/generation/api/h3-image-edits.json POST /v1/images/edits","href":"/api-reference/image-generation-h3-edits"},{"title":"H3-Image-Context-IR","sidebarTitle":"H3-Image-Context-IR","openapi":"api-reference/image/generation/api/h3-image-context-ir.json POST /v1/h3_image_context_ir","href":"/api-reference/image-generation-h3-context-ir"},{"title":"Streaming Events","sidebarTitle":"Streaming Events","href":"/api-reference/image-generation-h3-streaming"}]}]},{"group":"Speech","icon":"audio-lines","pages":[{"group":"Speech to Text","pages":[{"title":"Speech to Text","sidebarTitle":"Speech to Text","openapi":"api-reference/speech/speech-to-text/api/openapi.json POST /v1/speech_to_text","href":"/api-reference/speech-to-text"}]},{"group":"Text to Speech","pages":[{"title":"Synchronous Text to Speech","openapi":"api-reference/speech/t2a/api/openapi.json POST /v1/t2a_v2","href":"/api-reference/speech-t2a-http"},{"title":"Synchronous Text to Speech","asyncapi":"api-reference/speech/t2a/api/asyncapi.json t2a_v2_websocket","href":"/api-reference/speech-t2a-websocket"},{"title":"Bidirectional Streaming Text to Speech","asyncapi":"api-reference/speech/t2a/api/asyncapi-bidi.json t2a_v2_bidi_websocket","href":"/api-reference/speech-t2a-websocket-bidi"}]},{"group":"Async Text to Speech","pages":[{"title":"Create Speech Generation Task","openapi":"api-reference/speech/t2a-async/api/openapi.json POST /v1/t2a_async_v2","href":"/api-reference/speech-t2a-async-create"},{"title":"Query Speech Generation Task Status","openapi":"api-reference/speech/t2a-async/api/openapi.json GET /v1/query/t2a_async_query_v2","href":"/api-reference/speech-t2a-async-query"}]},{"group":"Voice Cloning","pages":[{"title":"Upload Audio for Voice Cloning","sidebarTitle":"Upload Audio File","openapi":"api-reference/speech/voice-cloning/api/upload-file.json POST /v1/files/upload","href":"/api-reference/voice-cloning-uploadcloneaudio"},{"title":"Upload Prompt Audio","sidebarTitle":"Upload Prompt Audio","openapi":"api-reference/speech/voice-cloning/api/upload-prompt.json POST /v1/files/upload","href":"/api-reference/voice-cloning-uploadprompt"},{"title":"Voice Clone","openapi":"api-reference/speech/voice-cloning/api/openapi.json POST /v1/voice_clone","href":"/api-reference/voice-cloning-clone"}]},{"group":"Voice Design","pages":[{"title":"Voice Design","openapi":"api-reference/speech/voice-design/api/openapi.json POST /v1/voice_design","href":"/api-reference/voice-design-design"}]},{"group":"Voice Management","pages":[{"title":"Get Voice","openapi":"api-reference/speech/voice-management/api/openapi.json POST /v1/get_voice","href":"/api-reference/voice-management-get"},{"title":"Delete Voice","openapi":"api-reference/speech/voice-management/api/openapi.json POST /v1/delete_voice","href":"/api-reference/voice-management-delete"}]}]},{"group":"File","icon":"file-code","pages":[{"group":"File Management","pages":[{"title":"Upload File","sidebarTitle":"Upload","openapi":"api-reference/file/management/api/openapi.json POST /v1/files/upload","href":"/api-reference/file-management-upload"},{"title":"List Files","sidebarTitle":"List","openapi":"api-reference/file/management/api/openapi.json GET /v1/files/list","href":"/api-reference/file-management-list"},{"title":"Retrieve File","sidebarTitle":"Retrieve","openapi":"api-reference/file/management/api/openapi.json GET /v1/files/retrieve","href":"/api-reference/file-management-retrieve"},{"title":"Retrieve Content","sidebarTitle":"Retrieve File Content","openapi":"api-reference/file/management/api/openapi.json GET /v1/files/retrieve_content","href":"/api-reference/file-management-retrieve-content"},{"title":"Delete File","sidebarTitle":"Delete","openapi":"api-reference/file/management/api/openapi.json POST /v1/files/delete","href":"/api-reference/file-management-delete"}]}]},{"group":"Models","icon":"boxes","pages":[{"group":"OpenAI Compatible","pages":[{"title":"List Models","openapi":"api-reference/models/openai/api/list-models.json GET /v1/models","href":"/api-reference/models/openai/list-models"},{"title":"Retrieve Model","openapi":"api-reference/models/openai/api/retrieve-model.json GET /v1/models/{model_id}","href":"/api-reference/models/openai/retrieve-model"}]},{"group":"Anthropic Compatible","pages":[{"title":"List Models","openapi":"api-reference/models/anthropic/api/list-models.json GET /anthropic/v1/models","href":"/api-reference/models/anthropic/list-models"},{"title":"Retrieve Model","openapi":"api-reference/models/anthropic/api/retrieve-model.json GET /anthropic/v1/models/{model_id}","href":"/api-reference/models/anthropic/retrieve-model"}]}]},{"group":"Legacy APIs","icon":"history","pages":[{"group":"Video Generation","pages":[{"title":"Create Text-to-Video Generation Task","sidebarTitle":"Text to Video","openapi":"api-reference/video/generation/api/text-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-t2v"},{"title":"Image-to-Video Task","sidebarTitle":"Image to Video","openapi":"api-reference/video/generation/api/image-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-i2v"},{"title":"Create First \u0026 Last Frame Video Generation Task","sidebarTitle":"Start / End to Video","openapi":"api-reference/video/generation/api/start-end-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-fl2v"},{"title":"Subject-Reference to Video Generation Task","sidebarTitle":"Subject Reference to Video","openapi":"api-reference/video/generation/api/subject-reference-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-s2v"},{"title":"Query Video Generation Task Status","openapi":"api-reference/video/generation/api/openapi.json GET /v1/query/video_generation","href":"/api-reference/video-generation-query"},{"title":"Video Download","sidebarTitle":"Download the Video File","openapi":"api-reference/video/generation/api/openapi.json GET /v1/files/retrieve","href":"/api-reference/video-generation-download"}]},{"group":"Image Generation","pages":[{"title":"Text to Image Generation","sidebarTitle":"Text-to-Image","openapi":"api-reference/image/generation/api/text-to-image.json POST /v1/image_generation","href":"/api-reference/image-generation-t2i"},{"title":"Image-to-Image Generation","sidebarTitle":"Image to Image","openapi":"api-reference/image/generation/api/image-to-image.json POST /v1/image_generation","href":"/api-reference/image-generation-i2i"}]}]}]},{"tab":"M Plan","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/m-plan/intro"},{"title":"FAQ","href":"/m-plan/faq"}]},{"group":"Subscription","pages":[{"title":"Usage","href":"/m-plan/usage-rules"},{"title":"Manage","href":"/m-plan/change-plan"}]},{"group":"Guides","pages":[{"title":"Quickstart","href":"/m-plan/quickstart"},{"group":"Tools","pages":[{"title":"MiniMax Code","tag":"Official","href":"/m-plan/minimax-code"},{"title":"Claude Code","href":"/m-plan/claude-code"},{"title":"Codex","href":"/m-plan/codex"},{"title":"Cursor","href":"/m-plan/cursor"},{"title":"OpenCode","href":"/m-plan/opencode"},{"title":"Pi","href":"/m-plan/pi"},{"title":"Hermes Agent","href":"/m-plan/hermes-agent"},{"title":"OpenClaw","href":"/m-plan/openclaw"},{"title":"Other tools","href":"/m-plan/other-tools"}]},{"group":"MCP","pages":[{"title":"Web search","href":"/m-plan/mcp-guide"}]},{"title":"MiniMax CLI","href":"/m-plan/minimax-cli"}]},{"group":"Announcements","pages":[{"title":"Monthly offer","href":"/m-plan/monthly-offer"},{"title":"Token Plan updates","href":"/m-plan/token-plan-notice"}]}]},{"tab":"Pricing","pages":[{"title":"Pricing Overview","sidebarTitle":"Pricing Overview","href":"/pricing/overview"}]},{"tab":"Release Notes","pages":[{"title":"Models","href":"/release-notes/models"},{"title":"APIs","href":"/release-notes/apis"}]},{"tab":"Developer Program","href":"https://platform.minimax.io/activity/contact-us-en"}]},"basePath":"","title":"Music Generation - MiniMax API Docs","buildId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","deploymentId":"dpl_2AK98Hxhwu4fUXpx9atbv41cC328","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-CK-IGkvh.js","dist-PCbBHBTv.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-Y_UC780V.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-EBSrFTg1.js","utils-Y_7TcRh4.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D1wvvkPH.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-aT0ty6oN.js","snippetPresets-DoNRuyJc.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-CXRajFpn.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BAyOsINj.js","shallow-CIcHqV1v.js","getApiPlaygroundDisplay-C5igZwEf.js","CodeSnippet-BFWnQLNh.js","CodeSnippets-Cx2mFgZW.js","Page-DCFaZE46.js","getPastedJson-BOy09PZp.js","icon-BwmYtB6R.js","MethodPill-DAIhq-iu.js","DuplicateIcon-DFM8Q3ph.js","createIcon-0UdvzB4Z.js","DynamicMarkdown-DYYZTGpa.js","SectionHeading-BFCDRUuH.js","axios-vUo_bRtp.js","Markdown-C6TcKjiR.js","AssistantPageLink-D4q_oRML.js"]}