ima-voice-ai
v1.0.11Generate music from text with IMA Open API. Supports Suno (sonic), DouBao BGM (GenBGM), and DouBao Song (GenSong). Uses only api.imastudio.com.
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
- Always query
/open/v1/product/listfirst. - Resolve
attribute_id,credit, and latestmodel_versionfrom product list. - Create task via
/open/v1/tasks/create. - Poll
/open/v1/tasks/detailuntil 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-idis omitted, default model issonic.
User Input Mapping
- BGM / instrumental / 背景音乐 / 纯音乐 ->
GenBGM - Song / lyrics / 人声 / 歌曲 ->
sonicorGenSong - 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.