Overview
All async generation endpoints accept an optionalcallback_url. When a task finishes (completed or failed), the server makes a single POST request to that URL with the task result.
This lets you avoid polling entirely.
Callback payload
Music generation completed
Task failed
Payload fields
Endpoints that support callbacks
Audio processing endpoints (
/stem, /midi, /timeline, /waveform, /wav) are synchronous and do not support callback_url.Signature verification
Every callback includes anX-Signature header. Verify it to confirm the request came from the API:
HMAC-SHA256(raw_request_body, signing_secret)
Your signing_secret is shown once when you create the AppKey. Store it securely.
Example — Node.js:
Reliability
- The server retries failed callbacks up to 5 times with exponential back-off (30s, 60s, 120s, 300s, 600s).
- Your endpoint must return HTTP
2xxwithin 10 seconds; otherwise the delivery is considered failed. - After all retries are exhausted, use Get Task to retrieve the result manually.