Skip to main content

Overview

All async generation endpoints accept an optional callback_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 an X-Signature header. Verify it to confirm the request came from the API:
Algorithm: HMAC-SHA256(raw_request_body, signing_secret) Your signing_secret is shown once when you create the AppKey. Store it securely. Example — Node.js:
Example — Python:

Reliability

  • The server retries failed callbacks up to 5 times with exponential back-off (30s, 60s, 120s, 300s, 600s).
  • Your endpoint must return HTTP 2xx within 10 seconds; otherwise the delivery is considered failed.
  • After all retries are exhausted, use Get Task to retrieve the result manually.
Always return 200 OK immediately and process the callback asynchronously. Slow handlers cause unnecessary retries.