360 Secure SkillHub
360 安全技能中心

AIML Music Generator

核心功能:调用Suno、Udio、Minimax、ElevenLabs四种AI模型,生成高质量纯音乐或带指定歌词的声乐作品,可自定义音频时长。典型场景:制作风格化纯音乐、带歌词的主题歌曲、短音频片段。输入为Python脚本参数(风格提示、歌词等),输出MP3音频,需配置AIMLAPI_API_KEY使用。

aimlapihello
aimlapihello
热度 64.98
最近更新 2026-05-17 12:50:53
分类:创作依赖:代码执行 / 第三方 API

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add aiml-music-generator
Metadata
name
aimlapi-music
description
Generate high-quality music/songs via AIMLAPI. Supports Suno, Udio, Minimax, and ElevenLabs music models. Use when the user asks for music, songs, or soundtracks with specific lyrics or styles.
metadata
{"openclaw":{"emoji":"🎵","requires":{"bins":["python"],"env":["AIMLAPI_API_KEY"]},"primaryEnv":"AIMLAPI_API_KEY"}}

AIMLAPI Music Generation

Overview

Generate music tracks using state-of-the-art AI models (Suno, Udio, Minimax, ElevenLabs).

Quick start

# General music (instrumental)
python {baseDir}/scripts/gen_music.py \
  --prompt "cyberpunk synthwave with heavy bass and retro synths" \
  --model "minimax/music-2.0"

# Song with lyrics
python {baseDir}/scripts/gen_music.py \
  --prompt "A happy pop song about a robot learning to feel" \
  --lyrics "[Verse 1]\nWires and gears, clicking in time..." \
  --model "minimax/music-2.0"

# Short clip (ElevenLabs)
python {baseDir}/scripts/gen_music.py \
  --prompt "lo-fi pop hip-hop ambient" \
  --model "elevenlabs/eleven_music" \
  --length 20000

Arguments

  • --prompt: (Required) Style or context for the music.
  • --lyrics: Optional lyrics for vocal tracks.
  • --model: Model choice (default: minimax/music-2.0).
  • --length: Length in milliseconds (primarily for ElevenLabs).
  • --out-dir: Directory to save the final MP3.

Workflow

The script uses a two-step process:

  1. POST /v2/generate/audio: Creates the generation task.
  2. GET /v2/generate/audio?generation_id=...: Polls for the result until completed or failed.