The MiniMax Lyrics API is a dedicated JSON endpoint for writing a complete song or revising and continuing an existing lyric draft. It returns a title, comma-separated style tags, and structured lyrics that MiniMax documents as suitable for the lyrics field of its Music Generation API.
Independent-site notice: MiniMax-AI.chat is an independent educational website. It is not owned by, operated by, endorsed by, or affiliated with MiniMax. MiniMax supplies the API, account, billing system, moderation, and generated output through its official Open Platform.
Last verified: August 20, 2026. The endpoint, fields, modes, limits, response structure, tags, and listed price were checked against MiniMax’s official Lyrics Generation API schema, Music Generation API schema, and pay-as-you-go pricing. MiniMax says the paid Lyrics Generation API is no longer available to new users; existing paying users may continue using the current service. The $0.01 figure is now a legacy list price, not a new-account offer. MiniMax directs new music users to MiniMax Audio or the downloadable Music 3 checkpoint, but neither is documented as a drop-in replacement for this standalone Lyrics endpoint.
Evidence status: The Node.js and Python examples were checked for language syntax and matched to the documented request schema. No billable lyrics request or Music 3.0 generation was run for this article. Examples are implementation templates, not samples produced by MiniMax, and this page makes no claim about rhyme quality, originality, adherence, latency, or billing observed in a live account.
MiniMax Lyrics API quick answer
- If an existing paying account still has access, send a server-side
POSTrequest tohttps://api.minimax.io/v1/lyrics_generation. New API users cannot activate this paid endpoint. - Authenticate with
Authorization: Bearer YOUR_API_KEYand sendContent-Type: application/json. - Use
mode: "write_full_song"for a complete lyric ormode: "edit"to revise or continue existing lyrics. - Describe the task in
prompt. In edit mode, also send the source draft inlyrics. - Read
song_title,style_tags,lyrics, andbase_respfrom the response. - Review the output before passing it to
POST /v1/music_generation.
The Lyrics API does not accept a music model ID. Do not add model: "music-3.0" to this request. Model selection belongs to the separate Music Generation call. The documented Lyrics endpoint is a synchronous JSON request; it does not expose a task ID, polling route, streaming field, or file-retrieval step.
Request fields and exact limits
| Field | Required? | Documented behavior |
|---|---|---|
mode | Yes | write_full_song writes a complete song; edit edits or continues an existing lyric. |
prompt | No | Instruction for theme, style, or editing direction; maximum 2,000 characters. An empty prompt produces a random song. |
lyrics | Effective only in edit mode | Existing lyrics to modify or continue; maximum 3,500 characters. |
title | No | If supplied, the response keeps this title unchanged. |
The schema does not document a model field, temperature, seed, language parameter, target word count, rhyme switch, or separate continuation cursor. Put creative and editing constraints in prompt, but do not describe those instructions as guaranteed controls. Validate the resulting text in your application.
What the response contains
| Field | Meaning | Recommended handling |
|---|---|---|
song_title | Generated title, or the request’s title when one was provided. | Store it separately from the lyric body. |
style_tags | Comma-separated labels, such as genre, energy, or vocal style. | Treat as descriptive text, not a guaranteed controlled vocabulary. |
lyrics | The generated or revised lyric with section tags. | Keep as the candidate document; review and version it before music generation. |
base_resp.status_code | Application-level status code. | Require zero for success even when the HTTP status is 200. |
base_resp.status_msg | Status or error detail. | Log a redacted version with an internal request ID. |
Supported lyric structure tags
The Lyrics Generation response documents 14 tag types:
[Intro]
[Verse]
[Pre-Chorus]
[Chorus]
[Hook]
[Drop]
[Bridge]
[Solo]
[Build-up]
[Instrumental]
[Breakdown]
[Break]
[Interlude]
[Outro]
Use tags as structural instructions rather than lines to be sung. Put each tag on its own line and separate lyric lines with newline characters. Tags can help the generation stage understand sections, but they do not guarantee a fixed duration, bar count, rhyme scheme, or exact repetition.
There is a documentation detail worth preserving: the Lyrics endpoint lists forms such as [Pre-Chorus], [Build-up], and [Instrumental], while the Music Generation request page lists [Pre Chorus], [Build Up], and [Inst] among its accepted input tags. MiniMax nevertheless states that Lyrics API output can be passed directly to Music Generation. Preserve the endpoint’s returned tags instead of applying an untested rename rule. For manually written lyrics, the shared forms such as [Intro], [Verse], [Chorus], [Bridge], [Hook], [Solo], [Break], [Interlude], and [Outro] reduce ambiguity.
Node.js: generate a full song lyric
Run this code on a server with Node.js 18 or a later release that provides fetch. It checks both the HTTP response and MiniMax’s application-level status.
import { writeFile } from "node:fs/promises";
const API_KEY = process.env.MINIMAX_API_KEY;
if (!API_KEY) throw new Error("Set MINIMAX_API_KEY on the server.");
async function generateLyrics(payload) {
const response = await fetch(
"https://api.minimax.io/v1/lyrics_generation",
{
method: "POST",
headers: {
Authorization: "Bearer " + API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
}
);
const raw = await response.text();
let result;
try {
result = raw ? JSON.parse(raw) : {};
} catch {
throw new Error("MiniMax returned non-JSON data (HTTP " + response.status + ").");
}
if (!response.ok) {
throw new Error("MiniMax HTTP " + response.status + ": " + raw);
}
const code = result?.base_resp?.status_code;
if (typeof code === "number" && code !== 0) {
const message = result?.base_resp?.status_msg || "No message";
throw new Error("MiniMax error " + code + ": " + message);
}
if (!result.song_title || !result.lyrics) {
throw new Error("The response is missing a title or lyrics.");
}
return result;
}
const result = await generateLyrics({
mode: "write_full_song",
title: "Paper Constellations",
prompt:
"Write an original English indie-pop song about two siblings mapping " +
"constellations during a power cut. First-person plural, warm but not " +
"sentimental. Use two verses, a pre-chorus, a memorable chorus, a short " +
"bridge, and an outro. Avoid brand names and references to real artists."
});
await writeFile(
"paper-constellations.json",
JSON.stringify(
{
title: result.song_title,
styleTags: result.style_tags,
lyrics: result.lyrics
},
null,
2
)
);
console.log({
title: result.song_title,
styleTags: result.style_tags,
characterCount: result.lyrics.length
});
The request includes title, so the API contract says the response will retain “Paper Constellations.” If your system needs a generated title, omit the field. Do not send an empty prompt unless random generation is genuinely desired.
Edit mode: revise or continue existing lyrics
MiniMax uses the same edit mode for revision and continuation. The prompt explains the operation; lyrics contains the source document. The response is a complete lyric string, not a patch. Diff the output against the submitted version and require approval if preserving exact lines matters.
Node.js: revise one section while preserving the title
const sourceLyrics = `[Verse]
The hallway hums beneath the rain
We count the windows of the train
[Chorus]
Small lights, small lights, carry us through
Every paper star points back to you
[Outro]
We fold the sky and leave it blue`;
const revision = await generateLyrics({
mode: "edit",
title: "Paper Constellations",
lyrics: sourceLyrics,
prompt:
"Keep the title, Verse, and Outro wording unchanged. Rewrite only the " +
"Chorus as four concise lines. Preserve first-person plural and the " +
"paper-star image. Return a complete structured lyric."
});
console.log(revision.lyrics);
The instruction asks for unchanged sections, but the schema does not promise character-perfect preservation. Compare those sections programmatically and reject the candidate when protected lines change.
Node.js: continue an incomplete draft
const continuation = await generateLyrics({
mode: "edit",
title: "Northbound",
lyrics: `[Verse]
The station clock is losing time
Your note is folded into mine
[Chorus]
Northbound, where the cold lines meet`,
prompt:
"Continue this incomplete English lyric. Preserve every supplied line, " +
"finish the Chorus, add a second Verse and a Bridge, then repeat the " +
"completed Chorus and end with a short Outro. Return the complete song."
});
There is no documented cursor marker or append-only option. A direct “preserve every supplied line” instruction is clearer than inventing a control token, but the result still needs a diff check.
Python: edit and validate a lyric
import os
import requests
api_key = os.environ.get("MINIMAX_API_KEY")
if not api_key:
raise RuntimeError("Set MINIMAX_API_KEY on the server.")
payload = {
"mode": "edit",
"title": "Northbound",
"lyrics": """[Verse]
The station clock is losing time
Your note is folded into mine
[Chorus]
Northbound, where the cold lines meet""",
"prompt": (
"Continue the English lyric, preserve all supplied lines, finish the "
"Chorus, add one Verse and one Bridge, and return a complete song."
),
}
response = requests.post(
"https://api.minimax.io/v1/lyrics_generation",
headers={
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json",
},
json=payload,
timeout=60,
)
response.raise_for_status()
result = response.json()
code = result.get("base_resp", {}).get("status_code")
if code not in (None, 0):
message = result.get("base_resp", {}).get("status_msg", "No message")
raise RuntimeError(f"MiniMax error {code}: {message}")
if result.get("song_title") != "Northbound":
raise RuntimeError("The requested title was not preserved.")
if not result.get("lyrics"):
raise RuntimeError("The response did not contain lyrics.")
print(result["lyrics"])
A practical lyrics prompt format
A useful prompt establishes the creative brief and the constraints a reviewer will later check. This compact format works for both modes:
- Task: write, rewrite, simplify, localize, or continue.
- Theme and scene: identify a concrete situation rather than a list of abstract moods.
- Voice: language, point of view, tone, and intended audience.
- Structure: requested sections and approximate line pattern.
- Protected material: lines or sections that must remain unchanged.
- Exclusions: names, trademarks, explicit content, clichés, or real-artist imitation.
- Return form: ask for a complete structured lyric when using edit mode.
Example: “Rewrite only the second Verse in plain Brazilian Portuguese. Keep the title and Chorus unchanged, preserve the travel metaphor, avoid English phrases, and return the complete lyric with the existing section labels.” The endpoint has no separate language field, so language belongs in this instruction.
Pass approved lyrics to Music 3.0
Lyrics Generation creates text; it does not produce audio. After human review, send the returned lyric to the separate POST /v1/music_generation endpoint with an appropriate music model. This minimal Node.js request assumes the generateLyrics helper and its result from the earlier example:
const musicResponse = await fetch(
"https://api.minimax.io/v1/music_generation",
{
method: "POST",
headers: {
Authorization: "Bearer " + API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "music-3.0",
prompt:
"Indie pop, warm duet, clean guitars, soft drums, restrained verses, " +
"wider final chorus",
lyrics: result.lyrics,
stream: false,
output_format: "hex",
audio_setting: {
sample_rate: 44100,
bitrate: 256000,
format: "mp3"
}
})
}
);
For download handling, instrumentals, cover routing, and response metadata, use the MiniMax Music API guide. For generating from reference audio, use the MiniMax Music Cover API guide.
Quality, originality, and rights review
- Structure: confirm that sections are complete, ordered, and not duplicated unintentionally.
- Singability: read lines aloud and check stress, syllable density, breath points, and repeated phrases.
- Adherence: compare protected lines, language, point of view, exclusions, and requested sections against the brief.
- Originality: search distinctive phrases and remove suspicious resemblance to existing lyrics.
- Rights: verify ownership or permission for any source lyrics supplied in edit mode.
- Safety: review output for personal data, defamation, hate, sexual content, or other prohibited material relevant to the audience.
- Versioning: store the prompt, source revision, generated candidate, human edits, and approval state.
Do not present generated text as copyright-cleared merely because an API returned it. Questions about authorship, ownership, similarity, and disclosure vary by jurisdiction and platform. For unreleased or confidential writing, also review MiniMax’s API privacy policy and the service terms before submitting the text.
Pricing and rate-limit cautions
MiniMax’s pay-as-you-go table preserves a $0.01 per song legacy price for Lyrics Generation and editing, while the August 20 notice closes the paid endpoint to new users and allows existing paying users to continue. Treat the figure as relevant only to an eligible existing account and verify the console before budgeting. Treat that as a dated list price rather than a hard-coded business rule: verify the account’s billing route and console before a budget commitment. Keep lyrics charges separate from the cost of the later Music Generation request.
The public rate-limit table lists Music Generation models but does not give a distinct Lyrics Generation RPM in its music table. Do not automatically apply the 120 RPM music-model figure to /v1/lyrics_generation. Inspect account limits, handle code 1002, queue requests, and use capped exponential backoff with jitter. See the independent MiniMax API rate-limits guide for queue design.
Error handling
| Code | Documented meaning in the Lyrics schema | Application response |
|---|---|---|
0 | Success | Continue only after checking required output fields. |
1002 | Rate limit triggered | Queue and retry with bounded backoff. |
1004 | Authentication failed | Check the Bearer header and key environment. |
1008 | Insufficient balance | Stop retries and inspect billing. |
1026 | Input contains sensitive content | Route to a content-review path; do not loop unchanged input. |
2013 | Invalid parameters | Check mode spelling and length limits. |
2049 | Invalid API key | Verify the key source and account. |
Check HTTP status, JSON parsing, and base_resp.status_code independently. Use MiniMax’s error-code reference for operational updates instead of treating a copied table as permanent.
MiniMax Lyrics API FAQ
Is the Lyrics API available to new users?
No. MiniMax says paid Lyrics Generation access closed to new users on August 20, 2026; existing paying users may continue with their current service.
Which model ID should I send to the Lyrics API?
None. The documented request has no model field. Send mode, and optionally prompt, lyrics, and title.
What is the difference between edit and continue?
Both use mode: "edit". The prompt tells MiniMax whether to revise existing sections or continue an incomplete draft.
Can MiniMax preserve my song title?
Yes. The schema states that a supplied title is kept unchanged in song_title.
Does this endpoint generate audio?
No. It returns lyrics and metadata. An eligible existing paying account can send the approved lyric to the Music Generation API. New users should follow MiniMax’s current MiniMax Audio or open-weight Music 3 routes instead.
Can I leave the prompt empty?
The documentation says an empty prompt generates a random song. Supply a prompt when repeatable editorial constraints matter.
