← 返回
未分类 Key

MiniMax Music Generation

Generate AI music using MiniMax Music 2.5 API. Use when the user wants to: (1) generate instrumental/pure music, (2) generate songs with lyrics, (3) generate...
使用 MiniMax Music 2.5 API 生成 AI 音乐。适用于用户想要:(1)生成器乐/纯音乐,(2) 生成带歌词的歌曲,(3) 生成...
rexdong1 rexdong1 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 1
Stars
📥 572
下载
💾 4
安装
1
版本
#latest

概述

MiniMax Music Generation

Generate AI music using MiniMax Music 2.5 API.

Prerequisites

Set the MINIMAX_API_KEY environment variable:

export MINIMAX_API_KEY="your-api-key-here"

Quick Start

# Generate instrumental music
python3 ~/.openclaw/workspace/skills/minimax-music/scripts/minimax_music.py create \
  --prompt "Piano, Relaxing, Meditative" \
  --instrumental \
  --download ~/Music

# Generate song with lyrics
python3 ~/.openclaw/workspace/skills/minimax-music/scripts/minimax_music.py create \
  --prompt "Pop, Upbeat, Celebratory" \
  --lyrics "[Verse]\n阳光洒满大地\n[Chorus]\n快乐每一天" \
  --download ~/Music

# Generate lyrics first
python3 ~/.openclaw/workspace/skills/minimax-music/scripts/minimax_music.py lyrics \
  --prompt "一首关于春天的歌" \
  --output lyrics.txt

Music Generation Parameters

ParameterDescriptionDefault
---------------------------------
--promptMusic style description (required)-
--lyricsLyrics text with [Verse], [Chorus] markers-
--lyrics-filePath to lyrics file-
--instrumentalGenerate instrumental music (no vocals)false
--sample-rateAudio quality: 44100, 4800044100
--bitrateAudio bitrate: 128000, 256000, 320000256000
--formatOutput format: mp3, wav, flacmp3
--downloadDirectory to save audio file-
--modelModel IDmusic-2.5

Prompt Examples

Instrumental Music

# Relaxing piano
--prompt "Piano, Relaxing, Meditative, Soft, Ambient"

# Electronic ambient
--prompt "Electronic, Ambient, Atmospheric, Synthesizer, Chill"

# Orchestral
--prompt "Orchestra, Cinematic, Epic, Strings, Brass"

# Jazz
--prompt "Jazz, Smooth, Saxophone, Piano, Night Club"

Songs with Lyrics

# Chinese pop
--prompt "Mandopop, Emotional, Ballad" \
--lyrics "[Verse]\n夜深人静\n思念着你\n[Chorus]\n心中的爱\n永不改变"

# English pop
--prompt "Pop, Upbeat, Energetic" \
--lyrics "[Verse]\nWalking down the street\nFeeling the beat\n[Chorus]\nLet's celebrate tonight"

Lyrics Format

Use section markers to structure the song:

[Intro]
(Instrumental opening)

[Verse]
Main lyrics here

[Pre-Chorus]
Build-up section

[Chorus]
Main hook/refrain

[Bridge]
Contrast section

[Outro]
Ending section

Daily Quota

MiniMax Token Plan subscriptions include:

  • music-2.5: 7 generations/day (Plan 199)
  • Quota resets daily at midnight

Sending Audio via Feishu

After generating music, send to user's Feishu:

import requests

# 1. Upload audio file
with open("music.mp3", "rb") as f:
    upload_resp = requests.post(
        "https://open.feishu.cn/open-apis/im/v1/files",
        headers={"Authorization": f"Bearer {TENANT_ACCESS_TOKEN}"},
        files={"file": ("music.mp3", f, "audio/mpeg")},
        data={"file_type": "stream", "file_name": "music.mp3"}
    )
file_key = upload_resp.json()["data"]["file_key"]

# 2. Send file message
requests.post(
    "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id",
    headers={"Authorization": f"Bearer {TENANT_ACCESS_TOKEN}", "Content-Type": "application/json"},
    json={
        "msg_type": "file",
        "content": json.dumps({"file_key": file_key}),
        "receive_id": USER_OPEN_ID
    }
)

Rules

  1. Always check MINIMAX_API_KEY is set before API calls.
  2. Use --instrumental for pure music without vocals.
  3. Default to 44100 Hz, 256 kbps, MP3 format for good quality and compatibility.
  4. Download immediately - audio URLs expire after some time.
  5. Respect daily quota - inform user if they've hit their limit.
  6. Provide audio file to user after generation (download + share via Feishu if applicable).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 05:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 435 📥 117,971
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 228 📥 48,969
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 335 📥 94,775