Minimax Music 2.6 API Documentation

Minimax Music 2.6 API Documentation

Playground

Try it on WaveSpeedAI!

MiniMax Music 2.6 generates complete songs with vocals and instrumentals from text prompts and lyrics. Supports instrumental-only mode, auto lyrics generation, structure tags for song arrangement, and configurable audio quality. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

MiniMax Music 2.6 generates complete songs with vocals and instrumentals from a text prompt and lyrics. Describe the genre, mood, instruments, and tempo — the model composes and sings a full track with your lyrics, with support for structure tags, instrumental-only mode, auto lyrics generation, and configurable audio quality up to 256kbps/44.1kHz.


Why Choose This?

  • Complete song generation Produces full vocal and instrumental tracks from a single prompt and lyrics input — not just clips or loops.

  • Structure tag support Use tags like [Verse], [Chorus], [Bridge], and more in your lyrics to precisely control song arrangement and flow.

  • Auto lyrics generation Leave the lyrics field empty and the model will generate lyrics automatically from your prompt description.

  • Instrumental mode Enable is_instrumental to generate a backing track without any vocals — ideal for music beds, soundtracks, and production use.

  • Configurable audio quality Adjust bitrate (up to 256kbps) and sample rate (up to 44.1kHz) to match your delivery requirements.

  • Wide genre support Pop, rock, folk, electronic, orchestral, lo-fi, and more — all controllable through your prompt.


Parameters

ParameterRequiredDescription
promptYesMusic style description including genre, mood, instruments, and tempo. Max 2000 characters.
lyricsYesSong lyrics with optional structure tags. 10–3000 characters. Leave empty for auto-generation.
bitrateNoAudio bitrate: 32000, 60000, 64000, 128000, or 256000 (default).
sample_rateNoAudio sample rate: 16000, 24000, 32000, or 44100 (default).
is_instrumentalNoGenerate instrumental music without vocals. Default: off.

Lyrics Structure Tags

Use these tags in your lyrics to control song arrangement:

[Intro], [Verse], [Pre Chorus], [Chorus], [Post Chorus], [Interlude], [Bridge], [Outro], [Hook], [Build Up], [Break], [Transition], [Inst], [Solo]


How to Use

  1. Write your prompt — describe the genre, instrumentation, BPM, mood, and production style. Use the Prompt Enhancer for better results.
  2. Enter your lyrics — add structure tags to control arrangement (e.g., [Verse], [Chorus]). Leave empty for auto-generated lyrics.
  3. Set bitrate and sample_rate (optional) — adjust for your target delivery format.
  4. Enable is_instrumental (optional) — check this to generate a backing track without any vocals.
  5. Submit — generate and download your track.

Example Prompt

warm acoustic folk, fingerpicked guitar, soft female vocal, cozy afternoon feeling, gentle reverb, intimate recording, storytelling mood, BPM 72

Example Lyrics

[Verse] Sunlight through the window pane Coffee getting cold again

[Chorus] Time moves slow on days like these Carried softly by the breeze


Pricing

Just $0.15 per song (up to 5 minutes).


Best Use Cases

  • Songwriting & demos — Turn lyrics and a style description into a full demo track instantly.
  • Content creation — Generate original songs or background music for videos, podcasts, and social media.
  • Music production — Use instrumental mode to create backing tracks for further mixing and production.
  • Custom soundtracks — Produce original music for games, ads, and film with precise style control.
  • Creative exploration — Rapidly prototype different musical styles and arrangements from the same lyrics.

Pro Tips

  • Be specific in your prompt — include genre, BPM, key instruments, vocal style, and production cues like “gentle reverb” or “intimate recording.”
  • Use structure tags in your lyrics to define verse, chorus, and bridge sections for a more polished arrangement.
  • Leave lyrics empty to let the model auto-generate them from your prompt — great for quick ideation.
  • Try instrumental mode first to validate the musical feel before committing to a full vocal version.
  • Higher bitrate and sample rate settings deliver better audio quality for professional delivery.

Notes

  • Both prompt and lyrics are required fields; leave lyrics empty to trigger auto-generation.
  • Lyrics length: 10–3000 characters. Prompt length: up to 2000 characters.
  • Generated audio URLs expire after 24 hours — download your output promptly.
  • Please ensure your content complies with MiniMax’s usage policies.

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'
{
  "prompt": "A cinematic ocean wave at sunrise, highly detailed",
  "bitrate": 256000,
  "sample_rate": 44100,
  "is_instrumental": false
}
JSON
)

# 1. Submit the prediction once. Never retry this request automatically:
# a retry after an unclear failure can create a second, billed task.
CHECK='The task may already exist. Check History or the predictions list before submitting again.'
if ! SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  --connect-timeout 10 --max-time 60 \
  -X POST "https://api.wavespeed.ai/api/v3/minimax/music-2.6" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}"); then
  printf 'Submit failed. %s\n' "${CHECK}" >&2
  exit 1
fi

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. %s\n' "${CHECK}" >&2
  exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"

# 2. Poll until the prediction reaches a final status.
BODY_FILE=$(mktemp)
trap 'rm -f "${BODY_FILE}"' EXIT
while true; do
  # Transient errors (429, 5xx) are retried, honoring Retry-After.
  HTTP_CODE=$(curl --silent --show-error --fail-with-body \
    --connect-timeout 10 --max-time 60 --retry 5 --retry-delay 2 \
    --output "${BODY_FILE}" --write-out '%{http_code}' \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}" || true)
  case "${HTTP_CODE}" in
    2??) ;;
    000|429|5??)  # dropped connection or temporary error: keep polling
      printf 'Task %s: HTTP %s, polling again in 10s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
      sleep 10; continue ;;
    *) printf 'Task %s: HTTP %s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
      cat "${BODY_FILE}" >&2; exit 1 ;;
  esac
  RESULT=$(jq 'if type == "object" and has("data") then .data else . end' "${BODY_FILE}")
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

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

Retry temporary errors only while polling, never the submit request. Errors, retries and timeouts

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-Prompt for the music generation.
lyricsstringNo--Lyrics with optional formatting. You can use a newline to separate each line of lyrics. You can use two newlines to add a pause between lines. You can use double hash marks (##) at the beginning and end of the lyrics to add accompaniment. Valid input: 10-3000 characters.
bitrateintegerNo25600060000, 32000, 64000, 128000, 256000Bitrate for the generated music
sample_rateintegerNo4410016000, 24000, 32000, 44100Sample rate for the generated music
is_instrumentalbooleanNofalse-Whether to generate instrumental music (no vocals).

Every model also accepts the global request options enable_sync_mode and enable_base64_output; see their pages for details.

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.