ACE-Step Music Generation — AI Integration
Use ACE-Step V1.5 REST API for AI-driven music generation. This document provides instructions for any AI assistant, agent framework, or orchestrator that can make HTTP calls.
Prerequisites
- ACE-Step Docker container running in API mode (
ACESTEP_MODE=api in .env)
- API available at
http://localhost:8501
- Tools:
curl and jq (for shell-based workflows)
Health Check
curl -s http://localhost:8501/health
# Should return: {"data":{"status":"ok","service":"ACE-Step API","version":"1.0"},...}
If health check fails, the container may be in gradio mode or not running. Check with docker compose ps and verify ACESTEP_MODE=api in .env.
Workflow
For user requests involving music generation, follow this workflow:
- Understand the request — What genre, mood, language, vocal style does the user want?
- Consult the Music Creation Guide — Use it to write captions, lyrics, and choose parameters
- Write a detailed caption — Style, instruments, emotion, vocal characteristics, production quality
- Write complete lyrics with structure tags —
[Verse], [Chorus], [Bridge], etc.
- Calculate parameters — Duration (based on lyrics length), BPM (based on genre), key, time signature
- Submit the task via
POST /release_task
- Poll for results via
POST /query_result until status is 1 (success) or 2 (failed)
- Download audio via the URL in the result
Generation Modes
| Mode |
When to Use |
How |
| Caption (Recommended) |
For vocal songs — write lyrics yourself first |
prompt + lyrics + thinking: true |
| Simple/Description |
Quick exploration, LM generates everything |
sample_mode: true + sample_query |
| Random |
Random generation for inspiration |
POST /create_random_sample |
Always prefer Caption mode for the best results. Write the lyrics yourself rather than letting the LM generate them.
API Endpoints
All responses are wrapped: {"data": <payload>, "code": 200, "error": null, "timestamp": ...}
| Endpoint |
Method |
Description |
/health |
GET |
Health check |
/release_task |
POST |
Submit music generation task |
/query_result |
POST |
Query task status (batch) |
/v1/audio?path={path} |
GET |
Download audio file |
/v1/models |
GET |
List available DiT models |
/v1/stats |
GET |
Server statistics (queue, jobs, avg time) |
/format_input |
POST |
LLM-enhanced caption/lyrics formatting |
/create_random_sample |
POST |
Get random sample parameters |
Quick Example: Full Generation Flow
# 1. Submit task
TASK_ID=$(curl -s -X POST http://localhost:8501/release_task \
-H 'Content-Type: application/json' \
-d '{
"prompt": "Symphonic black metal, epic orchestral arrangements, blast beats, tremolo picking, aggressive male vocals, dark atmosphere",
"lyrics": "[Intro - orchestral]\n\n[Verse 1 - aggressive]\nThrough frozen wastelands we march\nBeneath the blackened sky\nThe ancient ones await\nAs mortals fade and die\n\n[Chorus - powerful]\nWE ARE THE STORM\nWE ARE THE NIGHT\nRISING FROM DARKNESS\nINTO ETERNAL LIGHT\n\n[Outro - fade out]",
"thinking": true,
"param_obj": {
"duration": 120,
"bpm": 160,
"key_scale": "D Minor",
"time_signature": "4",
"language": "en"
}
}' | jq -r '.data.task_id')
echo "Task: $TASK_ID"
# 2. Poll for result (repeat until status != 0)
curl -s -X POST http://localhost:8501/query_result \
-H 'Content-Type: application/json' \
-d "{\"task_id_list\": [\"$TASK_ID\"]}" | jq .
# 3. Download audio (use the file URL from the result)
# curl -o output.mp3 "http://localhost:8501/v1/audio?path=<path-from-result>"
Request Parameters (/release_task)
Core Parameters
| Parameter |
Type |
Default |
Description |
prompt |
string |
"" |
Music style description (alias: caption) |
lyrics |
string |
"" |
Complete lyrics — pass ALL lyrics without omission. Use [inst] or [Instrumental] for instrumental sections |
thinking |
bool |
false |
Enable 5Hz LM for audio code generation (higher quality, recommended) |
sample_mode |
bool |
false |
Enable description-driven mode (LM generates everything) |
sample_query |
string |
"" |
Description for sample mode (alias: description, desc) |
use_format |
bool |
false |
Use LM to enhance caption/lyrics |
model |
string |
- |
DiT model name (use /v1/models to list) |
batch_size |
int |
1 |
Number of audio files to generate (max 8) |
Music Attributes (in param_obj or top-level)
| Parameter |
Type |
Default |
Description |
duration |
float |
- |
Duration in seconds (alias: audio_duration) |
bpm |
int |
- |
Tempo (30-300) |
key_scale |
string |
"" |
Key (e.g., "C Major", "D Minor") |
time_signature |
string |
"" |
Time signature ("2", "3", "4", "6" for 2/4, 3/4, 4/4, 6/8) |
language |
string |
"en" |
Vocal language (alias: vocal_language) |
audio_format |
string |
"mp3" |
Output format (mp3/wav/flac) |
Generation Control
| Parameter |
Type |
Default |
Description |
inference_steps |
int |
8 |
Diffusion steps (turbo: 1-20, base: 1-200) |
guidance_scale |
float |
7.0 |
CFG scale (base model only) |
seed |
int |
-1 |
Random seed (-1 for random) |
Audio Task Parameters
| Parameter |
Type |
Default |
Description |
task_type |
string |
"text2music" |
text2music / cover / repaint / continuation |
src_audio_path |
string |
- |
Source audio path (for continuation/repainting) |
repainting_start |
float |
0.0 |
Repainting start position (seconds) |
repainting_end |
float |
- |
Repainting end position (seconds) |
Query Result Response
{
"data": [{
"task_id": "xxx",
"status": 1,
"result": "[{\"file\":\"/v1/audio?path=...\",\"metas\":{\"bpm\":120,\"duration\":60,\"keyscale\":\"C Major\"}}]"
}]
}
Status codes: 0 = processing, 1 = success, 2 = failed
Important: The result field is a JSON string that must be parsed. It contains an array of result objects, each with a file field containing the download URL.
Tips for AI Assistants
- Always use
thinking: true — This enables the 5Hz LM for much better quality
- Write lyrics yourself — Don't rely on
sample_mode for serious requests. Write complete, well-structured lyrics with proper structure tags
- Be generous with duration — Too short is worse than too long. Calculate based on lyrics length (3-5 sec per line + intro/outro)
- Match caption and lyrics — Instruments mentioned in caption should appear as tags in lyrics. Don't contradict yourself
- Use uppercase for intensity —
WE ARE THE CHAMPIONS generates louder, more powerful vocals than we are the champions
- Poll patiently — Generation can take 30 seconds to several minutes depending on duration and model settings. Poll every 5-10 seconds
- Check actual output — When
thinking: true, the LM may enhance your caption/lyrics. Check the result JSON for what was actually used
For detailed guidance on writing captions, lyrics, and choosing parameters, see music-creation-guide.md.
For the complete API reference with all parameters and examples, see API.md.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: acestep-23description: Use ACE-Step API to generate music from text descriptions and lyrics. Supports text-to-music, lyrics generation, audio continuation, and audio repainting. Use this skill when users mention generating music, creating songs, music production, remix, or audio continuation. Use when this capability is needed.4---56# ACE-Step Music Generation — AI Integration78Use ACE-Step V1.5 REST API for AI-driven music generation. This document provides instructions for any AI assistant, agent framework, or orchestrator that can make HTTP calls.910## Prerequisites1112- ACE-Step Docker container running in **API mode** (`ACESTEP_MODE=api` in `.env`)13- API available at `http://localhost:8501`14- Tools: `curl` and `jq` (for shell-based workflows)1516### Health Check1718```bash19curl -s http://localhost:8501/health20# Should return: {"data":{"status":"ok","service":"ACE-Step API","version":"1.0"},...}21```2223If health check fails, the container may be in `gradio` mode or not running. Check with `docker compose ps` and verify `ACESTEP_MODE=api` in `.env`.2425---2627## Workflow2829For user requests involving music generation, follow this workflow:30311. **Understand the request** — What genre, mood, language, vocal style does the user want?322. **Consult the [Music Creation Guide](./music-creation-guide.md)** — Use it to write captions, lyrics, and choose parameters333. **Write a detailed caption** — Style, instruments, emotion, vocal characteristics, production quality344. **Write complete lyrics with structure tags** — `[Verse]`, `[Chorus]`, `[Bridge]`, etc.355. **Calculate parameters** — Duration (based on lyrics length), BPM (based on genre), key, time signature366. **Submit the task** via `POST /release_task`377. **Poll for results** via `POST /query_result` until `status` is `1` (success) or `2` (failed)388. **Download audio** via the URL in the result3940### Generation Modes4142| Mode | When to Use | How |43|------|-------------|-----|44| **Caption** (Recommended) | For vocal songs — write lyrics yourself first | `prompt` + `lyrics` + `thinking: true` |45| **Simple/Description** | Quick exploration, LM generates everything | `sample_mode: true` + `sample_query` |46| **Random** | Random generation for inspiration | `POST /create_random_sample` |4748**Always prefer Caption mode** for the best results. Write the lyrics yourself rather than letting the LM generate them.4950---5152## API Endpoints5354All responses are wrapped: `{"data": <payload>, "code": 200, "error": null, "timestamp": ...}`5556| Endpoint | Method | Description |57|----------|--------|-------------|58| `/health` | GET | Health check |59| `/release_task` | POST | Submit music generation task |60| `/query_result` | POST | Query task status (batch) |61| `/v1/audio?path={path}` | GET | Download audio file |62| `/v1/models` | GET | List available DiT models |63| `/v1/stats` | GET | Server statistics (queue, jobs, avg time) |64| `/format_input` | POST | LLM-enhanced caption/lyrics formatting |65| `/create_random_sample` | POST | Get random sample parameters |6667---6869## Quick Example: Full Generation Flow7071```bash72# 1. Submit task73TASK_ID=$(curl -s -X POST http://localhost:8501/release_task \74 -H 'Content-Type: application/json' \75 -d '{76 "prompt": "Symphonic black metal, epic orchestral arrangements, blast beats, tremolo picking, aggressive male vocals, dark atmosphere",77 "lyrics": "[Intro - orchestral]\n\n[Verse 1 - aggressive]\nThrough frozen wastelands we march\nBeneath the blackened sky\nThe ancient ones await\nAs mortals fade and die\n\n[Chorus - powerful]\nWE ARE THE STORM\nWE ARE THE NIGHT\nRISING FROM DARKNESS\nINTO ETERNAL LIGHT\n\n[Outro - fade out]",78 "thinking": true,79 "param_obj": {80 "duration": 120,81 "bpm": 160,82 "key_scale": "D Minor",83 "time_signature": "4",84 "language": "en"85 }86 }' | jq -r '.data.task_id')8788echo "Task: $TASK_ID"8990# 2. Poll for result (repeat until status != 0)91curl -s -X POST http://localhost:8501/query_result \92 -H 'Content-Type: application/json' \93 -d "{\"task_id_list\": [\"$TASK_ID\"]}" | jq .9495# 3. Download audio (use the file URL from the result)96# curl -o output.mp3 "http://localhost:8501/v1/audio?path=<path-from-result>"97```9899---100101## Request Parameters (`/release_task`)102103### Core Parameters104105| Parameter | Type | Default | Description |106|-----------|------|---------|-------------|107| `prompt` | string | `""` | Music style description (alias: `caption`) |108| `lyrics` | string | `""` | **Complete lyrics** — pass ALL lyrics without omission. Use `[inst]` or `[Instrumental]` for instrumental sections |109| `thinking` | bool | `false` | Enable 5Hz LM for audio code generation (higher quality, recommended) |110| `sample_mode` | bool | `false` | Enable description-driven mode (LM generates everything) |111| `sample_query` | string | `""` | Description for sample mode (alias: `description`, `desc`) |112| `use_format` | bool | `false` | Use LM to enhance caption/lyrics |113| `model` | string | - | DiT model name (use `/v1/models` to list) |114| `batch_size` | int | `1` | Number of audio files to generate (max 8) |115116### Music Attributes (in `param_obj` or top-level)117118| Parameter | Type | Default | Description |119|-----------|------|---------|-------------|120| `duration` | float | - | Duration in seconds (alias: `audio_duration`) |121| `bpm` | int | - | Tempo (30-300) |122| `key_scale` | string | `""` | Key (e.g., "C Major", "D Minor") |123| `time_signature` | string | `""` | Time signature ("2", "3", "4", "6" for 2/4, 3/4, 4/4, 6/8) |124| `language` | string | `"en"` | Vocal language (alias: `vocal_language`) |125| `audio_format` | string | `"mp3"` | Output format (mp3/wav/flac) |126127### Generation Control128129| Parameter | Type | Default | Description |130|-----------|------|---------|-------------|131| `inference_steps` | int | `8` | Diffusion steps (turbo: 1-20, base: 1-200) |132| `guidance_scale` | float | `7.0` | CFG scale (base model only) |133| `seed` | int | `-1` | Random seed (-1 for random) |134135### Audio Task Parameters136137| Parameter | Type | Default | Description |138|-----------|------|---------|-------------|139| `task_type` | string | `"text2music"` | text2music / cover / repaint / continuation |140| `src_audio_path` | string | - | Source audio path (for continuation/repainting) |141| `repainting_start` | float | `0.0` | Repainting start position (seconds) |142| `repainting_end` | float | - | Repainting end position (seconds) |143144### Query Result Response145146```json147{148 "data": [{149 "task_id": "xxx",150 "status": 1,151 "result": "[{\"file\":\"/v1/audio?path=...\",\"metas\":{\"bpm\":120,\"duration\":60,\"keyscale\":\"C Major\"}}]"152 }]153}154```155156Status codes: `0` = processing, `1` = success, `2` = failed157158**Important**: The `result` field is a JSON string that must be parsed. It contains an array of result objects, each with a `file` field containing the download URL.159160---161162## Tips for AI Assistants1631641. **Always use `thinking: true`** — This enables the 5Hz LM for much better quality1652. **Write lyrics yourself** — Don't rely on `sample_mode` for serious requests. Write complete, well-structured lyrics with proper structure tags1663. **Be generous with duration** — Too short is worse than too long. Calculate based on lyrics length (3-5 sec per line + intro/outro)1674. **Match caption and lyrics** — Instruments mentioned in caption should appear as tags in lyrics. Don't contradict yourself1685. **Use uppercase for intensity** — `WE ARE THE CHAMPIONS` generates louder, more powerful vocals than `we are the champions`1696. **Poll patiently** — Generation can take 30 seconds to several minutes depending on duration and model settings. Poll every 5-10 seconds1707. **Check actual output** — When `thinking: true`, the LM may enhance your caption/lyrics. Check the result JSON for what was actually used171172For detailed guidance on writing captions, lyrics, and choosing parameters, see [music-creation-guide.md](./music-creation-guide.md).173For the complete API reference with all parameters and examples, see [API.md](./API.md).174175---176> Converted and distributed by [TomeVault](https://tomevault.io/claim/nerdpudding) — claim your Tome and manage your conversions.177<!-- tomevault:4.0:skill_md:2026-04-13 -->