Create Music Generation Task
curl --request POST \
--url https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Acoustic, indie folk, gentle and reflective mood",
"lyrics_prompt": "[Intro]\n(Guitar strumming)\n\n[Verse]\nSitting by the window\nWatching the rain fall down\n\n[Chorus]\nBut I know tomorrow\nWill bring a brand new day"
}
'import requests
url = "https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation"
payload = {
"prompt": "Acoustic, indie folk, gentle and reflective mood",
"lyrics_prompt": "[Intro]
(Guitar strumming)
[Verse]
Sitting by the window
Watching the rain fall down
[Chorus]
But I know tomorrow
Will bring a brand new day"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'Acoustic, indie folk, gentle and reflective mood',
lyrics_prompt: '[Intro]\n(Guitar strumming)\n\n[Verse]\nSitting by the window\nWatching the rain fall down\n\n[Chorus]\nBut I know tomorrow\nWill bring a brand new day'
})
};
fetch('https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-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.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-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([
'prompt' => 'Acoustic, indie folk, gentle and reflective mood',
'lyrics_prompt' => '[Intro]
(Guitar strumming)
[Verse]
Sitting by the window
Watching the rain fall down
[Chorus]
But I know tomorrow
Will bring a brand new day'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation"
payload := strings.NewReader("{\n \"prompt\": \"Acoustic, indie folk, gentle and reflective mood\",\n \"lyrics_prompt\": \"[Intro]\\n(Guitar strumming)\\n\\n[Verse]\\nSitting by the window\\nWatching the rain fall down\\n\\n[Chorus]\\nBut I know tomorrow\\nWill bring a brand new day\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Acoustic, indie folk, gentle and reflective mood\",\n \"lyrics_prompt\": \"[Intro]\\n(Guitar strumming)\\n\\n[Verse]\\nSitting by the window\\nWatching the rain fall down\\n\\n[Chorus]\\nBut I know tomorrow\\nWill bring a brand new day\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"Acoustic, indie folk, gentle and reflective mood\",\n \"lyrics_prompt\": \"[Intro]\\n(Guitar strumming)\\n\\n[Verse]\\nSitting by the window\\nWatching the rain fall down\\n\\n[Chorus]\\nBut I know tomorrow\\nWill bring a brand new day\"\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "8e1e315e-b50d-4334-a231-be7d19a372f4",
"status": "pending",
"created_at": "2026-03-03T00:00:00Z",
"updated_at": "2026-03-03T00:00:00Z"
}
}Music 2.5 Text-To-Music
MiniMax Music 2.5 Text to Music
Create a music generation task using the music-2.5 model.
POST
/
vendors
/
minimax
/
v1
/
music-2.5
/
text-to-music
/
generation
Create Music Generation Task
curl --request POST \
--url https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Acoustic, indie folk, gentle and reflective mood",
"lyrics_prompt": "[Intro]\n(Guitar strumming)\n\n[Verse]\nSitting by the window\nWatching the rain fall down\n\n[Chorus]\nBut I know tomorrow\nWill bring a brand new day"
}
'import requests
url = "https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation"
payload = {
"prompt": "Acoustic, indie folk, gentle and reflective mood",
"lyrics_prompt": "[Intro]
(Guitar strumming)
[Verse]
Sitting by the window
Watching the rain fall down
[Chorus]
But I know tomorrow
Will bring a brand new day"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'Acoustic, indie folk, gentle and reflective mood',
lyrics_prompt: '[Intro]\n(Guitar strumming)\n\n[Verse]\nSitting by the window\nWatching the rain fall down\n\n[Chorus]\nBut I know tomorrow\nWill bring a brand new day'
})
};
fetch('https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-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.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-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([
'prompt' => 'Acoustic, indie folk, gentle and reflective mood',
'lyrics_prompt' => '[Intro]
(Guitar strumming)
[Verse]
Sitting by the window
Watching the rain fall down
[Chorus]
But I know tomorrow
Will bring a brand new day'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation"
payload := strings.NewReader("{\n \"prompt\": \"Acoustic, indie folk, gentle and reflective mood\",\n \"lyrics_prompt\": \"[Intro]\\n(Guitar strumming)\\n\\n[Verse]\\nSitting by the window\\nWatching the rain fall down\\n\\n[Chorus]\\nBut I know tomorrow\\nWill bring a brand new day\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Acoustic, indie folk, gentle and reflective mood\",\n \"lyrics_prompt\": \"[Intro]\\n(Guitar strumming)\\n\\n[Verse]\\nSitting by the window\\nWatching the rain fall down\\n\\n[Chorus]\\nBut I know tomorrow\\nWill bring a brand new day\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/minimax/v1/music-2.5/text-to-music/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"Acoustic, indie folk, gentle and reflective mood\",\n \"lyrics_prompt\": \"[Intro]\\n(Guitar strumming)\\n\\n[Verse]\\nSitting by the window\\nWatching the rain fall down\\n\\n[Chorus]\\nBut I know tomorrow\\nWill bring a brand new day\"\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "8e1e315e-b50d-4334-a231-be7d19a372f4",
"status": "pending",
"created_at": "2026-03-03T00:00:00Z",
"updated_at": "2026-03-03T00:00:00Z"
}
}Overview
Generate music from text descriptions and lyrics using the MiniMax Music 2.5 model. Music 2.5 is the latest version with improved quality:- Style description — specify music style, mood, and scenario via
prompt - Lyrics support — provide song lyrics with
lyrics_prompt - Structure tags — organize songs with
[Intro],[Verse],[Chorus],[Bridge],[Outro]tags - Up to 5 minutes — generate songs up to 5 minutes long
- Audio customization — configurable format (MP3/PCM/FLAC), sample rate, and bitrate
- Improved quality — enhanced music generation compared to Music 2.0
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
A description of the music, specifying style, mood, and scenario. 10-2000 characters.
Required string length:
10 - 2000Lyrics of the song. Use \n to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. 10-3000 characters.
Required string length:
10 - 3000Audio configuration settings.
Show child attributes
Show child attributes
Response
202 - application/json
Accepted - Task created successfully
Show child attributes
Show child attributes
⌘I

