Music Cover Preprocess
curl --request POST \
--url https://api.minimax.io/v1/music_cover_preprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "music-cover",
"audio_url": "https://example.com/song.mp3"
}
'import requests
url = "https://api.minimax.io/v1/music_cover_preprocess"
payload = {
"model": "music-cover",
"audio_url": "https://example.com/song.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-cover', audio_url: 'https://example.com/song.mp3'})
};
fetch('https://api.minimax.io/v1/music_cover_preprocess', 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_cover_preprocess",
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-cover',
'audio_url' => 'https://example.com/song.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_cover_preprocess"
payload := strings.NewReader("{\n \"model\": \"music-cover\",\n \"audio_url\": \"https://example.com/song.mp3\"\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_cover_preprocess")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"model\": \"music-cover\",\n \"audio_url\": \"https://example.com/song.mp3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/music_cover_preprocess")
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-cover\",\n \"audio_url\": \"https://example.com/song.mp3\"\n}"
response = http.request(request)
puts response.read_body{
"cover_feature_id": "a1b2c3d4e5f67890abcdef1234567890",
"formatted_lyrics": "[Verse 1]\nFirst line of the song\nSecond line continues\n\n[Chorus]\nThis is the chorus\nSinging out loud",
"structure_result": "{\"num_segments\":4,\"segments\":[{\"start\":0,\"end\":15.5,\"label\":\"intro\"},{\"start\":15.5,\"end\":45.2,\"label\":\"verse\"},{\"start\":45.2,\"end\":75.0,\"label\":\"chorus\"},{\"start\":75.0,\"end\":90.0,\"label\":\"outro\"}]}",
"audio_duration": 90,
"trace_id": "061e5f144eb7f10b1fdde81126e24f91",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Music Cover Preprocess
Preprocess reference audio to extract features and lyrics for two-step cover generation.
POST
/
v1
/
music_cover_preprocess
Music Cover Preprocess
curl --request POST \
--url https://api.minimax.io/v1/music_cover_preprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "music-cover",
"audio_url": "https://example.com/song.mp3"
}
'import requests
url = "https://api.minimax.io/v1/music_cover_preprocess"
payload = {
"model": "music-cover",
"audio_url": "https://example.com/song.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-cover', audio_url: 'https://example.com/song.mp3'})
};
fetch('https://api.minimax.io/v1/music_cover_preprocess', 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_cover_preprocess",
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-cover',
'audio_url' => 'https://example.com/song.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_cover_preprocess"
payload := strings.NewReader("{\n \"model\": \"music-cover\",\n \"audio_url\": \"https://example.com/song.mp3\"\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_cover_preprocess")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"model\": \"music-cover\",\n \"audio_url\": \"https://example.com/song.mp3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/music_cover_preprocess")
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-cover\",\n \"audio_url\": \"https://example.com/song.mp3\"\n}"
response = http.request(request)
puts response.read_body{
"cover_feature_id": "a1b2c3d4e5f67890abcdef1234567890",
"formatted_lyrics": "[Verse 1]\nFirst line of the song\nSecond line continues\n\n[Chorus]\nThis is the chorus\nSinging out loud",
"structure_result": "{\"num_segments\":4,\"segments\":[{\"start\":0,\"end\":15.5,\"label\":\"intro\"},{\"start\":15.5,\"end\":45.2,\"label\":\"verse\"},{\"start\":45.2,\"end\":75.0,\"label\":\"chorus\"},{\"start\":75.0,\"end\":90.0,\"label\":\"outro\"}]}",
"audio_duration": 90,
"trace_id": "061e5f144eb7f10b1fdde81126e24f91",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}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.
Authorizations
HTTP: Bearer Auth
- Security Scheme Type: http
- HTTP Authorization Scheme:
Bearer API_key, can be found in Account Management>API Keys.
Headers
Body
application/json
Response
200 - application/json
Unique identifier for the preprocessed audio features. Valid for 24 hours. Pass this to the Music Generation API cover_feature_id parameter for two-step cover generation.
Same audio content returns the same cover_feature_id (MD5-based deduplication).