API reference · ace
ace/ace-step/prompt-to-audio
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
ace/ace-step/prompt-to-audio01
Input Schema
14 parameters · 1 required · 13 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | Prompt to control the style of the generated audio. This will be used to generate tags and lyrics. |
seed | integer | Optional | Random seed for reproducibility. If not provided, a random seed will be used. |
duration | integer | Optional | The duration of the generated audio in seconds. · Min: 5 · Max: 240 · Default: 60 |
scheduler | string | Optional | Scheduler to use for the generation process. · Options: euler, heun · Default: "euler" eulerheun |
instrumental | boolean | Optional | Whether to generate an instrumental version of the audio. · Default: false |
guidance_type | string | Optional | Type of CFG to use for the generation process. · Options: cfg, apg, cfg_star · Default: "apg" cfgapgcfg_star |
guidance_scale | number | Optional | Guidance scale for the generation. · Min: 0 · Max: 200 · Default: 15 |
number_of_steps | integer | Optional | Number of steps to generate the audio. · Min: 3 · Max: 60 · Default: 27 |
granularity_scale | integer | Optional | Granularity scale for the generation process. Higher values can reduce artifacts. · Min: -100 · Max: 100 · Default: 10 |
guidance_interval | number | Optional | Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps) · Min: 0 · Max: 1 · Default: 0.5 |
tag_guidance_scale | number | Optional | Tag guidance scale for the generation. · Min: 0 · Max: 10 · Default: 5 |
lyric_guidance_scale | number | Optional | Lyric guidance scale for the generation. · Min: 0 · Max: 10 · Default: 1.5 |
minimum_guidance_scale | number | Optional | Minimum guidance scale for the generation after the decay. · Min: 0 · Max: 200 · Default: 3 |
guidance_interval_decay | number | Optional | Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay. · Min: 0 · Max: 1 · Default: 0 |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "ace/ace-step/prompt-to-audio",
"prompt": "A lofi hiphop song with a chill vibe about a sunny day on the boardwalk.",
"duration": 60,
"scheduler": "euler",
"instrumental": false,
"guidance_type": "apg",
"guidance_scale": 15,
"number_of_steps": 27,
"granularity_scale": 10,
"guidance_interval": 0.5,
"tag_guidance_scale": 5,
"lyric_guidance_scale": 1.5,
"minimum_guidance_scale": 3,
"guidance_interval_decay": 0
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
