Skills IMA Music Generator
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/allenfancy-gan/ima-voice-ai" ~/.claude/skills/openclaw-skills-ima-music-generator && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/allenfancy-gan/ima-voice-ai" ~/.openclaw/skills/openclaw-skills-ima-music-generator && rm -rf "$T"
manifest:
skills/allenfancy-gan/ima-voice-ai/SKILL.mdsource content
IMA Voice AI — Music Generator
For complete API documentation, security details, all parameters, and Python examples, read
.SKILL-DETAIL.md
Model ID Reference (CRITICAL)
Use exact model_id from this table. Do NOT infer from friendly names.
| Friendly Name | model_id | Notes |
|---|---|---|
| Suno | | ✅ Default, full songs with vocals |
| DouBao BGM | | ⚠️ Instrumental only, background music |
| DouBao Song | | ⚠️ Songs with vocals |
User input aliases: BGM/背景音乐/纯音乐 →
GenBGM · 歌曲/人声/Song → sonic or GenSong · 默认 → sonic
Music Generation Mode
| User intent | model_id | When to use |
|---|---|---|
| Background music, instrumental | | "做一段BGM" / "纯音乐" / "背景音乐" |
| Song with vocals | | "写首歌" / "带人声" / "歌曲" |
| Song (alternative) | | "豆包歌曲" / "GenSong" |
Model Selection Priority
- User preference (if explicitly stated) → highest priority
- Fallback default:
(Suno)sonic
| Task | Default Model | model_id | Notes |
|---|---|---|---|
| General music | Suno | | Full songs, vocals |
| Instrumental/BGM | DouBao BGM | | No vocals |
| Chinese songs | DouBao Song | | Alternative to Suno |
Script Usage
# Generate music (default: sonic/Suno) python3 {baseDir}/scripts/ima_voice_create.py \ --model-id sonic \ --prompt "upbeat lo-fi hip hop, 90 BPM, no vocals" \ --output-json # List available models python3 {baseDir}/scripts/ima_voice_create.py --list-models # Generate BGM python3 {baseDir}/scripts/ima_voice_create.py \ --model-id GenBGM \ --prompt "calm piano background music for meditation" \ --output-json
Sending Results to User
# ✅ CORRECT: Use remote URL directly for inline audio display message(action="send", media=audio_url, caption="✅ 音乐生成成功!\n• 模型:[Name]\n• 耗时:[X]s\n• 积分:[N pts]\n\n🔗 原始链接:[url]") # ❌ WRONG: Never download to local file
UX Protocol (Brief)
- Pre-generation: "🎵 开始生成音乐… 模型:[Name],预计[X~Y]秒,消耗[N]积分"
- Progress: Every 30-60s: "⏳ 正在生成中… [P]%" (cap at 95%)
- Success: Send audio via
+ include link in captionmedia=audio_url - Failure: Natural language error + suggest alternative models. See SKILL-DETAIL.md for error translation.
Never say to users: script names, API endpoints, attribute_id, technical parameter names. Only: model name · time · credits · result · status.
Environment
Base URL:
https://api.imastudio.com
Headers: Authorization: Bearer $IMA_API_KEY · x-app-source: ima_skills · x_app_language: en
Core Flow
→ getGET /open/v1/product/list?app=ima&platform=web&category=text_to_music
,attribute_id
,creditmodel_version
→ getPOST /open/v1/tasks/createtask_id
→ poll every 5s untilPOST /open/v1/tasks/detailresource_status==1
MANDATORY: Always query product list first.
attribute_id is required.
Defaults and Timeouts
- Task type:
(fixed)text_to_music - Poll interval: 5 seconds
- Max poll wait: 8 minutes
- Default model:
(ifsonic
omitted)--model-id
Estimated Generation Time
| Model | Estimated Time | Poll Every |
|---|---|---|
| Suno (sonic) | 60~180s | 5s |
| DouBao BGM (GenBGM) | 30~90s | 5s |
| DouBao Song (GenSong) | 60~120s | 5s |