agentleFS
joeVennerjoeVenner/awesome-minimax-h3/minimax-music/SKILL.md

minimax-music

Skill9 starsChanged 3 months agoMITView on GitHub

Generate professional-quality music using the MiniMax CLOUD Music API (music-3.0). Supports full songs with vocals, purely instrumental tracks, AI lyrics writing, and cover generation from reference audio. Typical output is 2-3 minutes of finished stereo audio. Use when the user asks to create music, generate a song, write lyrics, compose an instrumental, make a cover of an existing song, produce background or underscore music for a video, film or advert, create a jingle or soundtrack, or any task involving AI music creation with MiniMax. Keywords: music, song, compose, generate music, lyrics, instrumental, underscore, background music, music bed, cover song, jingle, soundtrack, score, beat, melody, audio generation, music production, AI music, MiniMax, music-3.0, songwriting, genre, BPM, vocal style.

  • Reads credentials
  • Sends data out

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. justl9169/minimax-skills★ 3same name
    2. agentrix-ai/skills★ 1same name
    3. huashaoya/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No defaults are documented — set all three explicitly.

    line 134
  2. Very specific:

    Always check base_resp.status_code == 0.

    line 287

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MiniMax Music — Cloud Music Generation

This skill covers the CLOUD platform API only (api.minimax.io, Bearer auth with a platform API key). It does not cover the local Electron gateway — see minimax-local-audio for that, and do not mix their parameter shapes: this API takes real JSON types ("is_instrumental": true), the local gateway takes strings ("is_instrumental": "instrumental").


Quick start — instrumental bed

curl -s -X POST "https://api.minimax.io/v1/music_generation" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "music-3.0",
    "is_instrumental": true,
    "prompt": "Cinematic indie folk, warm, nostalgic, hopeful, felt piano, soft string swell, slow tempo, 76 BPM",
    "audio_setting": {"sample_rate": 44100, "bitrate": 256000, "format": "mp3"},
    "output_format": "url"
  }' -o resp.json

jq -r '.data.audio' resp.json | xargs curl -sL -o track.mp3

⏱ Generation takes ~3 minutes and the call blocks the whole time. Set a client timeout of at least 600s and run it in the background. A 120s shell timeout will kill it mid-flight.


✅ Verified facts that contradict older documentation

Older claimReality (verified 2026-08-04)
Output is ~25 seconds~161 seconds measured. The "25364" in the docs is an example value, not a limit
Audio returns as hex onlyoutput_format: "url" returns a signed download URL in data.audio
data.audio is a separate field from any URLSame field carries either hex or the URL, depending on output_format
Only music-3.0 and music-cover existSix models exist, including free-tier variants

There is still no duration parameter and no way to place a climax at a chosen timestamp. Output length is emergent — but it is long, so for anything under ~2 minutes the practical approach is: generate, measure, then trim and fade to fit in ffmpeg.


Phase 0: The brief

[1. GENRE & STYLE] — musical DNA: genre, subgenre, era, reference sound, BPM, key
[2. MOOD & EMOTION] — emotional arc, energy, atmosphere, time of day
[3. LYRICS & THEME] — the story (skip entirely for instrumentals)
[4. ARRANGEMENT] — instrumentation, dynamics, section structure, production style

Decide first: song with vocals, instrumental, or cover? That choice determines which parameters are required — see the table in Phase 2.


Phase 1: Models

ModelUseRPMCost
music-3.0Best quality. Default choice.120$0.15 per track (up to 5 min)
music-2.6Previous generation120$0.15 per track
music-coverCover from reference audio120Not stated
music-3.0-freeFree tier of music-3.0 — ideal for auditioning prompts3Free
music-2.6-freeFree tier of music-2.63Free
music-cover-freeFree tier of cover3Free

Paid models require a Token Plan or paid account; -free variants work on any API key.

💡 Billing is flat per generation, bucketed at "up to 5 minutes". A 30-second track costs the same $0.15 as a 5-minute one — there is no incentive to aim short. And since the peak position cannot be controlled, plan on generating several takes and selecting. Audition prompts on music-3.0-free first (3 RPM = one every 20s), then spend on the winner.


Phase 2: Parameters

FieldTypeRequiredNotes
modelstring✅One of the six above
promptstringconditionalComma-separated descriptors. See the table below
lyricsstringconditional\n line breaks + [section tags]. Max 3500 chars
is_instrumentalbooleannotrue = no vocals. Default false
lyrics_optimizerbooleannotrue + empty lyrics → auto-writes lyrics from prompt
output_formatstringnourl or hex. Default hex
streambooleannoDefault false. Only hex is supported when streaming
audio_settingobjectnoSee below
audio_url / audio_base64stringconditionalCover only. Exactly one. Mutually exclusive
cover_feature_idstringconditionalCover only, two-step flow. Mutually exclusive with the above

What is required, by mode

Modepromptlyrics
Instrumental (is_instrumental: true)✅ Required, 1–2000 charsNot required — omit the key entirely
Song with vocalsOptional, 0–2000 chars✅ Required, 1–3500 chars
Vocals with auto-lyrics✅ RequiredOmit, and set lyrics_optimizer: true
Cover✅ Required, 10–300 chars — describes the target styleOptional (ASR-extracted if omitted)

⚠️ Instrumental is the one mode where prompt is mandatory. And although the docs only say lyrics is "not required" there, the schema sets minLength: 1 — so sending "lyrics": "" may be rejected. Omit the key rather than passing an empty string.

is_instrumental and lyrics_optimizer are supported on the four text-to-music models only, not on music-cover.

audio_setting

FieldOptionsNotes
sample_rate16000, 24000, 32000, 44100Use 44100
bitrate32000, 64000, 128000, 256000Use 256000
formatmp3, wav, pcmwav if the track will be heavily edited

No defaults are documented — set all three explicitly.

Lyrics section tags

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

⚠️ The lyrics-generation endpoint emits a slightly different set — it can return [Drop], [Instrumental], [Breakdown], [Pre-Chorus] (hyphenated) and [Build-up] (hyphenated), none of which appear in the list above. Whether the music API errors on, ignores, or interprets an unlisted tag is undocumented. Normalise tags before passing lyrics from one endpoint to the other. Official code examples use lowercase ([verse]), so case appears not to matter.

There is no BPM, key, arrangement or climax-placement parameter. Naming a BPM inside the prompt string is an accepted convention and does influence the result, but it is a hint, not a control. Section tags are not documented to affect instrumental arrangement at all.


Phase 3: Writing the prompt

The prompt is a comma-separated list of descriptors — think of it as tagging a track.

{genre}, {subgenre}, {mood ×2-3}, {scenario}, {instrumentation}, {production}, {tempo}, {BPM}

Worked examples:

Cinematic indie folk, neoclassical, warm, nostalgic, hopeful, intimate, golden hour wedding,
felt piano, fingerpicked acoustic guitar, soft string swell, cello, brushed drums,
sparse opening building to a full emotional crescendo then gentle resolve, analog warmth,
slow tempo, 76 BPM
Synthwave, retro electro, euphoric, driving, night city drive, pulsating analog synthesizers,
gated reverb drums, neon atmosphere, 80s production, medium tempo, 110 BPM
Lo-fi hip-hop, chill, laid-back, rainy coffee shop, warm vinyl crackle, jazzy piano samples,
relaxed boom bap drums, slow tempo, 78 BPM

⚠️ When is_instrumental: true, strip every vocal descriptor from the prompt. Many stock genre strings contain warm harmonies, female vocals, choir or layered vocals — these contradict the instrumental flag. choir counts as a vocal token even though it reads as orchestral.

Deeper vocabulary — genres, BPM ranges, instrumentation, mood lexicon — lives in references/genre-style-reference.md.


Phase 4: Lyrics generation (optional)

curl -s -X POST "https://api.minimax.io/v1/lyrics_generation" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" -H "Content-Type: application/json" \
  -d '{"mode": "write_full_song", "prompt": "A melancholic ballad about lost love in a rainy city", "title": "Rain on Windows"}'
ParamRequiredNotes
mode✅write_full_song or edit
promptnoMax 2000 chars. Empty → a random song
lyricsnoExisting lyrics; edit mode only. Max 3500
titlenoPreserved in the output if given

Returns song_title, style_tags, lyrics, base_resp.

💡 style_tags is a comma-separated descriptor string designed to be dropped straight into a music prompt. Even for an instrumental, one lyrics call gives you model-native style vocabulary — then discard the lyrics. Costs $0.01 per song.

Craft guidance in references/lyrics-guide.md.


Phase 5: Cover generation

One-step — pass the reference directly:

curl -s -X POST "https://api.minimax.io/v1/music_generation" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "music-cover",
       "audio_url": "https://example.com/original.mp3",
       "prompt": "Lo-fi bedroom pop, dreamy, soft vocals, ukulele, intimate, warm",
       "audio_setting": {"sample_rate": 44100, "bitrate": 256000, "format": "mp3"},
       "output_format": "url"}'

Two-step — preprocess first when you want to rewrite the lyrics. Preprocessing is free.

curl -s -X POST "https://api.minimax.io/v1/music_cover_preprocess" \
  -H "Authorization: Bearer $MINIMAX_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "music-cover", "audio_url": "https://example.com/original.mp3"}'

Returns cover_feature_id (valid 24h), formatted_lyrics (ASR-extracted with section tags), structure_result (JSON with per-section start/end timestamps in seconds) and audio_duration. Then pass cover_feature_id + your rewritten lyrics (10–1000 chars) to music_generation.

Reference audio limits: 6 seconds – 6 minutes, ≤ 50 MB, mp3/wav/flac.

⚠️ The Files API cannot host it. /v1/files/upload has no music-related purpose value, and the music endpoints accept no file_id. Your only options are a publicly reachable audio_url or inline audio_base64 (which inflates the request ~33%). A signed object-storage URL is the clean route.

music_cover_preprocess accepts music-cover only — not music-cover-free.


Phase 6: Response handling

✅ Verified live response:

{
  "data": {
    "audio": "<hex string, OR a signed download URL when output_format=url>",
    "status": 2
  },
  "trace_id": "06c11f46...",
  "extra_info": {
    "music_duration": 160992,
    "music_sample_rate": 44100,
    "music_channel": 2,
    "bitrate": 256000,
    "music_size": 5158939
  },
  "analysis_info": null,
  "base_resp": { "status_code": 0, "status_msg": "success" }
}

Key facts, all verified:

  • output_format: "url" puts a signed URL in data.audio. There is no separate audio_url field. The default hex puts hex-encoded bytes in that same field. Always set output_format explicitly so you know what you are parsing.
  • The URL is signed and expires in 24 hours. It must be used whole — truncating it strips the signature and the download returns an AccessDenied XML body that will masquerade as an audio file. Always verify with ffprobe after downloading.
  • extra_info.music_duration is in milliseconds (160992 = 161 s). data.status: 1 = in progress, 2 = complete.
  • trace_id, extra_info and analysis_info sit at the top level, siblings of data — not nested inside it.
  • Always check base_resp.status_code == 0. HTTP 200 does not imply success.
# url
jq -r '.data.audio' resp.json | xargs curl -sL -o track.mp3
# hex (default)
jq -r '.data.audio' resp.json | xxd -r -p > track.mp3
# always verify
ffprobe -v error -show_entries format=duration -of default=nw=1 track.mp3

Phase 7: Post-processing

Because length is emergent and the climax cannot be placed, fitting the track to picture happens here.

# Inspect
ffprobe -v quiet -print_format json -show_format -show_streams track.mp3

# Find the loudest moment — locates the natural crescendo to cut against
ffmpeg -i track.mp3 -af astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level -f null - 2>&1 | grep RMS

# Trim a window and fade (e.g. 48s ending at a fade-out)
ffmpeg -i track.mp3 -ss 12 -t 48 -af "afade=t=in:d=2,afade=t=out:st=43:d=5" bed_48s.mp3

# Normalise (do this on the FINAL mix, not the bed alone)
ffmpeg -i mix.wav -af "loudnorm=I=-14:LRA=11:TP=-1.5" master.wav

# Waveform graphic
ffmpeg -i track.mp3 -filter_complex "showwavespic=s=1920x400:colors=#d97757|#ededed" wave.png

Technique for hitting a specific emotional beat: generate 2–3 takes, run the RMS scan on each, and pick the take whose natural crescendo sits nearest your target — then slide the trim window so it lands exactly. Selection plus trimming replaces the control the API does not offer.


Error codes

CodeMeaning
0Success
1002Rate limit — back off (free tier is 3 RPM = one per 20s)
1004Authentication failed
1008Insufficient balance
1026Content flagged as sensitive
1039Token limit
2013Invalid parameters
2049Invalid API key
2056Usage limit exceeded — wait for the next 5-hour window

Rate limits: paid models 120 RPM, 20 concurrent · free variants 3 RPM.


Common failures and fixes

SymptomCauseFix
Command killed at ~2 minGeneration takes ~3 min and blocksTimeout ≥ 600s; run in background
Downloaded "audio" is a few hundred bytesSigned URL was truncatedNever truncate the URL; ffprobe every download
Corrupt audio from hex decodeResponse was a URL, not hexSet output_format explicitly and branch
Vocals on an "instrumental"Vocal tokens left in the promptStrip vocals, harmonies, choir
400 on instrumentalprompt missing, or lyrics: "" sentprompt is required here; omit lyrics entirely
Track too short/long for pictureNo duration control existsGenerate, measure, trim + fade in ffmpeg
Crescendo in the wrong placeNo timestamp control existsGenerate several takes, RMS-scan, pick and slide the trim window
1002 on every other callFree tier is 3 RPMSleep 20s between free calls

Supporting files

  • Complete API reference — every parameter, full schemas, error codes
  • Genre & style reference — genre encyclopedia, BPM ranges, instrumentation
  • Lyrics writing guide — meter, rhyme, storytelling, structure

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.