Preface¶
When working inside an Agent to “generate a piece of BGM” or “write lyrics and produce a track,” the common approach involves temporarily checking MiniMax documentation, hand-writing curl commands or scattered scripts, and then piecing together the API Key, model, and output paths. This involves multiple steps, and it is easy to miss authentication or mix up the required subscription plans (套餐) for the “lyrics API” versus the “music API.”
The following is an introduction to the community Skill @user_c9d52b8e/minimax-music-v2 (Name: Use minimax’s TokenPlanKey to generate music). It encapsulates lyrics generation, music generation, and local playback into reusable SKILL.md files and scripts. The Agent automatically triggers this skill when a user mentions intentions such as composing or AI music.
What is this¶
One-sentence positioning: An Agent Skill based on the MiniMax Music Generation API that uses scripts to call official interfaces to generate lyrics and audio.
- Coordinates:
@user_c9d52b8e/minimax-music-v2 - Version: 1.0.0
- Source: SkillHub Community (
community), Publisheruser_c9d52b8e - Category: design-media
- SkillHub Page: https://www.skillhub.cn/skills/user_c9d52b8e/minimax-music-v2
- Resource URL: https://api.skillhub.cn/user_c9d52b8e/minimax-music-v2
Trigger scenarios declared by the Skill: When a user requests to generate music, create songs, compose music, or mentions “AI music” or “generate songs,” etc. The tag requires_api_key=true indicates that a MiniMax API Key must be configured before use.
Core Features¶
The following capabilities are derived from the SKILL.md and reference documentation bundled with the Skill, verified against the installation package.
- Lyrics Generation: Generates complete lyrics based on a thematic description, supporting multiple modes (such as
write_full_song,write_lyrics_only,optimize_lyrics). - Music Generation: Generates audio based on style/emotion/scene descriptions; can include lyrics or use
--instrumentalto generate pure instrumental music without vocals. - Local Playback: After generation,
play_music.pycan be used to play mp3/wav files (depends onpyglet). - Models and Formats: Default model is
music-2.6(marked as verified and available by the Skill); optional outputs include mp3/wav/pcm, with configuration for sample rate, bitrate, etc.
API and Key Description (From Skill Documentation)
- Music Generation API:
POST https://api.minimaxi.com/v1/music_generation, HeaderAuthorization: Bearer <API_KEY>. - Key Acquisition: https://platform.minimaxi.com/user-center/basic-information/interface-key
- Lyrics Generation can use a Coding Plan Key; Music Generation requires a separate Music Plan. The recommended model
music-2.6requires a Music Plan;music-2.6-freeis a limited-free version requiring a separate application. The correspondence between the Token Plan Key in the name and the Token Plan / paid subscription in the official documentation depends on the actual Plan activated in the MiniMax console.
Generated files default to the minimax-music-output/ directory under the workspace; lyrics are printed to the terminal by default but can also be written to a specified path using -o.
Installation and Enablement¶
1. Install SkillHub CLI (if not already installed)¶
command -v skillhub && skillhub --version
If not installed, follow the SkillHub installation instructions (full installation example):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
2. Install this Skill to the current Agent’s skills directory¶
SkillHub requires using --dir to point to the Agent-recognized skills directory during installation; otherwise, the default ./skills/ may not be loaded.
skillhub install @user_c9d52b8e/minimax-music-v2 --dir <your skills directory>
Common paths (from SkillHub installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
Alternatively, you can ask the Agent to install @user_c9d52b8e/minimax-music-v2 following the instructions at https://skillhub.cn/install/skillhub.md.
3. Configure API Key¶
Choose one of the following:
- Fill in the
api_keyfield inconfig.jsonunder the Skill directory; - Set the environment variable
MINIMAX_API_KEY.
config.json structure example:
{
"api_key": ""
}
4. Python Dependencies¶
The scripts pull dependencies on demand via uv run; you can also pre-install them:
uv pip install --python python requests pyglet
requests is used for HTTP; pyglet is only used when playback via --play is required.
Typical Usage¶
Replace <skill> with the installed Skill root directory (e.g., ~/.cursor/skills/@user_c9d52b8e/minimax-music-v2).
Generate Lyrics
uv run --with requests python <skill>/scripts/lyrics_generate.py "A cheerful love song about a summer海边"
Save to file:
uv run --with requests python <skill>/scripts/lyrics_generate.py "description" -o lyrics.txt
Generate Music with Vocals (Requires Music Plan, defaults to music-2.6)
uv run --with requests --with pyglet python <skill>/scripts/music_generate.py "Pop music, cheerful, sunny" \
--lyrics "[Verse]\nStreetside leaves\nSunlight passing through the gaps" \
--play
Instrumental Music (No Vocals)
uv run --with requests --with pyglet python <skill>/scripts/music_generate.py "Piano solo, quiet, relaxing" --instrumental --play
Specify Model and Play Existing Files
uv run --with requests --with pyglet python <skill>/scripts/music_generate.py "..." -m music-2.6
uv run --with pyglet python <skill>/scripts/play_music.py audio.mp3
Recommended prompt writing style (Skill reference): style, emotion, scene, separated by commas for multiple dimensions, e.g., "Electronic music, energetic, gym". Lyrics can use structural tags like [Verse], [Chorus].
In clients like Cursor that support Skills, after installation and Key configuration, simply describe your needs in natural language; the Agent will read the SKILL.md and execute via the script paths mentioned above.
Applicable Scenarios and Notes¶
Who is it for
- Developers who have already activated an interface Key on MiniMax and possess a Music Plan (or are trialing limited-free models like
music-2.6-free). - Teams that want to complete “Write Lyrics → Generate Track → Local Listening” within an Agent conversation without hand-writing HTTP requests every time.
Limitations and Common Issues
- Subscription (Plan): If only a Coding Plan Key is configured, the lyrics API may be available, but music generation like
music-2.6remains restricted by the Music Plan. In case of insufficient balance or authentication failure, official error codes include1004,1008,2049, etc. (seereferences/models.mdwithin the Skill). - Rate Limiting and Content:
1002indicates rate limiting;1026indicates sensitive content, requiring adjustments to the prompt or lyrics. - Runtime Environment: Playback depends on
pyglet, which may fail in remote sandboxes without graphics/audio environments; you can remove--playand keep only the output file. - Compliance: Generated content must comply with MiniMax platform rules; this Skill is community-published, and the maintenance rhythm is subject to the SkillHub page and installation package.
SkillHub Statistics (scraped data): Rating 100000, Downloads 612, Installations 19.
Conclusion¶
@user_c9d52b8e/minimax-music-v2 consolidates MiniMax lyrics and music APIs, local scripts, and Agent trigger instructions into a single Skill. It is suitable for turning “AI Composition” from a one-off script into a repeatable workflow. Once installation, Key, and Plan are ready, you can reproduce it using natural language or the uv run commands described above.
Official Resource Entries:
- https://www.skillhub.cn/skills/user_c9d52b8e/minimax-music-v2
- https://api.skillhub.cn/user_c9d52b8e/minimax-music-v2