Minimax Lyrics Generation API Documentation

Minimax Lyrics Generation API Documentation

Playground

Try it on WaveSpeedAI!

MiniMax Lyrics Generation creates complete song lyrics from natural-language prompts, and can edit or continue existing lyrics with structured output including a title, style tags, and lyrics ready for music generation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

MiniMax Lyrics Generation creates complete song lyrics or edits and continues an existing draft from natural-language instructions. It returns a song title, comma-separated style tags, and lyrics with structure tags that can be used directly with MiniMax Music 3.0.


Why Choose This?

  • Complete song lyrics
    Turn a theme, mood, genre, or story idea into structured lyrics for a full song.

  • Editing and continuation
    Revise, rewrite, or continue existing lyrics while preserving the creative direction you provide.

  • Music-ready structure
    The generated lyrics can include tags such as [Verse], [Chorus], [Bridge], and [Outro] for downstream song generation.

  • Useful metadata
    Each result includes a song title and style tags alongside the lyrics.

  • Simple fixed pricing
    Every generation or edit request has the same price, regardless of prompt length.


Parameters

ParameterRequiredDescription
modeYeswrite_full_song creates complete lyrics; edit edits or continues existing lyrics. Default: write_full_song.
promptNoSong theme, style, mood, story, or editing instruction. Maximum length: 2000 characters. Leave empty in full-song mode for a random song.
lyricsNoExisting lyrics to edit or continue. Used only in edit mode. Maximum length: 3500 characters.
titleNoOptional song title. When provided, the output keeps this title unchanged.

How to Use

  1. Choose a mode — use write_full_song for new lyrics or edit for an existing draft.
  2. Describe the song — provide the theme, genre, mood, story, voice, or editing direction in prompt.
  3. Add existing lyrics when editing — paste the draft into lyrics when using edit mode.
  4. Optionally set a title — provide title when it must remain unchanged.
  5. Submit — receive a title, style tags, and structured lyrics.

Example Prompt

A cinematic synth-pop love song set in a neon city at midnight, dreamy female vocals, intimate verses, a memorable soaring chorus, bittersweet but hopeful, with vivid rain and streetlight imagery.


Pricing

Just $0.02 per request.


Output

The model returns:

  • song_title — generated or preserved song title
  • style_tags — comma-separated musical and vocal style tags
  • lyrics — generated lyrics with song structure tags

Supported structure tags include [Intro], [Verse], [Pre-Chorus], [Chorus], [Hook], [Drop], [Bridge], [Solo], [Build-up], [Instrumental], [Breakdown], [Break], [Interlude], and [Outro].


Best Use Cases

  • Songwriting ideation — create a complete first draft from a concept.
  • Verse and chorus development — strengthen or continue unfinished sections.
  • Lyric rewriting — change mood, genre, imagery, or point of view.
  • Demo preparation — generate structured lyrics ready for AI music creation.
  • Creative content — write themed songs for videos, ads, games, and social media.

Pro Tips

  • Include the genre, mood, narrator, setting, imagery, and desired emotional arc.
  • Ask for a clear verse/chorus/bridge structure when arrangement matters.
  • In edit mode, explain exactly what to preserve and what to change.
  • Set title when your project already has a fixed song name.
  • Pass the returned lyrics into MiniMax Music 3.0 to generate a complete song.

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result

set -euo pipefail

export WAVESPEED_API_KEY="your-api-key"

REQUEST_BODY=$(cat <<'JSON'
{
  "mode": "write_full_song"
}
JSON
)

# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  -X POST "https://api.wavespeed.ai/api/v3/minimax/lyrics-generation" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}")

TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
  printf 'Submission response did not contain a prediction id
' >&2
  exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"

# 2. Poll until the prediction finishes.
while true; do
  RESPONSE=$(curl --silent --show-error --fail-with-body \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}")
  RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

  case "${STATUS}" in
    completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
    failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
    *) sleep 2 ;;
  esac
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
modestringYeswrite_full_songwrite_full_song, editGeneration mode. Use write_full_song to create complete lyrics or edit to modify or continue existing lyrics.
promptstringNo-Song theme, style, or editing instruction. Leave empty in write_full_song mode to generate a random song.
lyricsstringNo--Existing lyrics to edit or continue. Only used when mode is edit.
titlestringNo--Optional song title. When provided, the generated output keeps this title unchanged.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<string | object>Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model.
data.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.