SkillHub

ima-voice-ai

v1.0.11

Generate music from text with IMA Open API. Supports Suno (sonic), DouBao BGM (GenBGM), and DouBao Song (GenSong). Uses only api.imastudio.com.

Sourced from ClawHub, Authored by allenfancy-gan

Installation

Please help me install the skill `ima-voice-ai` from SkillHub official store. npx skills add allenfancy-gan/ima-voice-ai

IMA Voice AI Creation

Capability

This skill generates music/audio from text prompts (text_to_music) through IMA Open API.

Supported model IDs: - sonic (Suno) - GenBGM (DouBao BGM) - GenSong (DouBao Song)

Network and Credential Transparency

  • API domain used: https://api.imastudio.com
  • Required key: IMA_API_KEY (environment variable)
  • The script does not call secondary upload domains.
  • The script does not read other skills' files.

Runtime Rules

  1. Always query /open/v1/product/list first.
  2. Resolve attribute_id, credit, and latest model_version from product list.
  3. Create task via /open/v1/tasks/create.
  4. Poll /open/v1/tasks/detail until completed or timeout.

Defaults and Timeouts

  • Task type is fixed to text_to_music.
  • Poll interval: 5 seconds.
  • Max poll wait: 8 minutes.
  • If --model-id is omitted, default model is sonic.

User Input Mapping

  • BGM / instrumental / 背景音乐 / 纯音乐 -> GenBGM
  • Song / lyrics / 人声 / 歌曲 -> sonic or GenSong
  • If unspecified -> default sonic

Script Invocation

Set key first:

export IMA_API_KEY="ima_your_key_here"
python3 {baseDir}/scripts/ima_voice_create.py 
  --model-id sonic 
  --prompt "upbeat lo-fi hip hop, 90 BPM, no vocals" 
  --output-json

List models:

python3 {baseDir}/scripts/ima_voice_create.py 
  --list-models

Error Handling Policy

  • Return user-friendly error summaries in plain language.
  • Include practical next step suggestions (retry, switch model, check API key/credits).
  • Do not expose raw internal payloads unless debugging is explicitly requested.

Expected Output

On success, return: - task id - result URL - model id/model name - credit used

If --output-json is enabled, parse JSON from script output.