Use case
Batch Music Generation API
Developers generating music at volume (content pipelines, playlists, per-user soundtracks) who do not want to fan out and track N requests by hand.
The problem
Generating fifty tracks means fifty submit calls, fifty task IDs, and your own bookkeeping to know when the set is done. That orchestration is boilerplate every team rewrites.
Why MusicAPI fits this
One submit, one poll: send up to ten generation specs in a single call, get one batch_id, and poll the whole set together instead of tracking each task.
Per-track webhooks: pass a webhook_url and each track notifies you as it finishes, so you can stream results instead of waiting for the slowest one.
Same per-call rate as a single generation. Batching is an orchestration convenience, not a price change, and partial failures are reported per item.
Code sample
A real request against the live API: start a job, then poll the task endpoint until the audio is ready.
# Submit several generations in one request
curl -X POST https://api.musicapi.ai/api/v1/sonic/batch \
-H "Authorization: Bearer $MUSICAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{ "custom_mode": false, "mv": "sonic-v5", "gpt_description_prompt": "lofi study beats" },
{ "custom_mode": false, "mv": "sonic-v5", "gpt_description_prompt": "epic trailer score" }
]
}'
# -> { "message": "success", "batch_id": "BATCH_ID", "submitted": 2, "tasks": [...] }
# Poll the whole batch at once
curl "https://api.musicapi.ai/api/v1/sonic/batch?batch_id=BATCH_ID" \
-H "Authorization: Bearer $MUSICAPI_KEY"Pricing
MusicAPI is pay-as-you-go with credit packs, plus predictable monthly subscriptions. The per-credit rate is the same across packs and subscriptions. See the pricing page for current rates, free credits, and volume options.
Related: Suno API · Producer AI API
FAQ
How many items can one batch contain?
Up to ten generation specs per batch. Each item accepts the same fields as a single generation request.
Do I have to poll, or can I get callbacks?
Both. Poll GET /api/v1/sonic/batch?batch_id=... to aggregate every task in one response, or pass a batch-level webhook_url and each track will call back as it completes.
Does batching cost extra?
No. Each item is charged at the same per-call rate as an individual generation. Items that fail are reported per index and are not charged.
Build it in 5 minutes
Get free credits on signup and run real generations before any payment. No credit card required to start.
API details verified 2026-05-18. The API surface evolves; the pricing page always has current rates.