API reference
Music
Models on this endpoint (1)
/v1/music/generations/v1/music/tasks/{task_id}/v1/music/tasks/{task_id}/contentAsync music generation for song and instrumental workflows. Submit returns a task_id immediately; poll the task or accept a webhook callback, then read the finished audio from /content.
#Request parameters
modelstringrequiredA music model ID from the models page, e.g. suno.
promptstringrequiredDescribe the song, mood, instrumentation, or lyric direction.
titlestringoptionalOptional track title forwarded to model families that support it.
tagsstring | arrayoptionalOptional genre or style hints such as cinematic, pop, or ambient.
versionstringoptionalModel-family version switch when the provider exposes multiple generations.
mvstringoptionalProvider-specific music mode selector; keep it server-side unless users need explicit control.
instrumentalbooleanoptionalGenerate instrumental output without vocals when the model supports it.
make_instrumentalbooleanoptionalAlternative vendor flag for instrumental output; some providers use this instead of instrumental.
continue_clip_idstringoptionalContinue or extend a previous clip instead of starting a fresh track.
continue_atnumberoptionalResume point in seconds for continuation flows.
webhook_urlstringoptionalHTTPS URL called once the task reaches a terminal state.
webhook_secretstringoptionalIf set, deliveries carry X-Xiaoxiang-Signature: sha256=hex(HMAC-SHA256(body, secret)).
Start simple
Same async contract as other media tasks
#Related errors
- 404 not_foundUnknown path, unknown model name, or an expired / foreign task_id.
- 422 unprocessable_entityThe vendor rejected parameter values the gateway forwarded (e.g. unsupported size or duration).
- 401Invalid or missing bearer token. No error.code on this path — match the status.
- 402 insufficient_user_quotaWallet balance cannot cover the pre-reserved estimate.
- 429Per-key throttle. Empty body; wait for Retry-After. A 429 that does carry insufficient_user_quota is a daily spend cap instead.
- 503 model_not_foundUnknown model, or no healthy channel serves it right now.
#Request example
# submit
curl https://www.aisplice.store/v1/music/generations \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno",
"prompt": "a warm cinematic piano theme",
"instrumental": true
}'
# poll every 5s
curl https://www.aisplice.store/v1/music/tasks/$TASK_ID -H "Authorization: Bearer sk-YOUR_KEY"
# fetch the finished track
curl -L https://www.aisplice.store/v1/music/tasks/$TASK_ID/content \
-H "Authorization: Bearer sk-YOUR_KEY" \
-o song.mp3#Response
// POST — submit accepted
{"task_id": "task_xxx", "status": "queued"}
// GET /v1/music/tasks/{task_id}
{
"task_id": "task_xxx",
"status": "in_progress",
"progress": "42%"
}
// GET /v1/music/tasks/{task_id}/content
{
"task_id": "task_xxx",
"status": "completed",
"metadata": {
"audio_url": "https://…",
"lyric": "…"
}
}Still stuck?
Send us the request ID or the error message and we will look into it.