Lyrics Generation
curl --request POST \
--url https://api.minimax.io/v1/lyrics_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"mode": "write_full_song",
"prompt": "A cheerful love song about a summer day at the beach"
}
'import requests
url = "https://api.minimax.io/v1/lyrics_generation"
payload = {
"mode": "write_full_song",
"prompt": "A cheerful love song about a summer day at the beach"
}
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({
mode: 'write_full_song',
prompt: 'A cheerful love song about a summer day at the beach'
})
};
fetch('https://api.minimax.io/v1/lyrics_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/lyrics_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([
'mode' => 'write_full_song',
'prompt' => 'A cheerful love song about a summer day at the beach'
]),
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/lyrics_generation"
payload := strings.NewReader("{\n \"mode\": \"write_full_song\",\n \"prompt\": \"A cheerful love song about a summer day at the beach\"\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/lyrics_generation")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"mode\": \"write_full_song\",\n \"prompt\": \"A cheerful love song about a summer day at the beach\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/lyrics_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 \"mode\": \"write_full_song\",\n \"prompt\": \"A cheerful love song about a summer day at the beach\"\n}"
response = http.request(request)
puts response.read_body{
"song_title": "Summer Breeze Promise",
"style_tags": "Pop, Summer Vibe, Romance, Lighthearted, Beach Pop",
"lyrics": "[Intro]\n(Ooh-ooh-ooh)\n(Yeah)\nSunlight dancing on the waves\n\n[Verse 1]\nSea breeze gently through your hair\nSmiling face, like a summer dream\nWaves are crashing at our feet\nLeaving footprints, you and me\nLaughter echoes on the sand\nEvery moment, a sweet melody\nI see the sparkle in your eyes\nLike the stars in the deep blue sea\n\n[Pre-Chorus]\nYou say this feeling is so wonderful\n(So wonderful)\nWant to stay in this moment forever\n(Right here, right now)\nHeartbeat racing like the ocean waves\n\n[Chorus]\nOh, summer by the sea, our promise true\nIn the sunlight, your silhouette so beautiful\nThe breeze blows away our worries, leaving only sweet\nThis moment, I just want to be with you, eternally\n(Forever with you)\n\n[Verse 2]\n...",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Lyrics Generation
Use this API to generate lyrics, supporting full song creation and lyrics editing/continuation.
POST
/
v1
/
lyrics_generation
Lyrics Generation
curl --request POST \
--url https://api.minimax.io/v1/lyrics_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"mode": "write_full_song",
"prompt": "A cheerful love song about a summer day at the beach"
}
'import requests
url = "https://api.minimax.io/v1/lyrics_generation"
payload = {
"mode": "write_full_song",
"prompt": "A cheerful love song about a summer day at the beach"
}
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({
mode: 'write_full_song',
prompt: 'A cheerful love song about a summer day at the beach'
})
};
fetch('https://api.minimax.io/v1/lyrics_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/lyrics_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([
'mode' => 'write_full_song',
'prompt' => 'A cheerful love song about a summer day at the beach'
]),
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/lyrics_generation"
payload := strings.NewReader("{\n \"mode\": \"write_full_song\",\n \"prompt\": \"A cheerful love song about a summer day at the beach\"\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/lyrics_generation")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("{\n \"mode\": \"write_full_song\",\n \"prompt\": \"A cheerful love song about a summer day at the beach\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimax.io/v1/lyrics_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 \"mode\": \"write_full_song\",\n \"prompt\": \"A cheerful love song about a summer day at the beach\"\n}"
response = http.request(request)
puts response.read_body{
"song_title": "Summer Breeze Promise",
"style_tags": "Pop, Summer Vibe, Romance, Lighthearted, Beach Pop",
"lyrics": "[Intro]\n(Ooh-ooh-ooh)\n(Yeah)\nSunlight dancing on the waves\n\n[Verse 1]\nSea breeze gently through your hair\nSmiling face, like a summer dream\nWaves are crashing at our feet\nLeaving footprints, you and me\nLaughter echoes on the sand\nEvery moment, a sweet melody\nI see the sparkle in your eyes\nLike the stars in the deep blue sea\n\n[Pre-Chorus]\nYou say this feeling is so wonderful\n(So wonderful)\nWant to stay in this moment forever\n(Right here, right now)\nHeartbeat racing like the ocean waves\n\n[Chorus]\nOh, summer by the sea, our promise true\nIn the sunlight, your silhouette so beautiful\nThe breeze blows away our worries, leaving only sweet\nThis moment, I just want to be with you, eternally\n(Forever with you)\n\n[Verse 2]\n...",
"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
Successful response
Generated lyrics with structure tags. Can be directly used in the lyrics parameter of the Music Generation API to generate songs.
Supported structure tags (14 types): [Intro], [Verse], [Pre-Chorus], [Chorus], [Hook], [Drop], [Bridge], [Solo], [Build-up], [Instrumental], [Breakdown], [Break], [Interlude], [Outro]