callback_url when starting a generation to receive a webhook notification when the job completes or fails.
Using Webhooks
Include thecallback_url parameter in your generation request:
Webhook Payload
When the job completes or fails, aPOST request will be sent to your callback_url.
Success:
Retry Behavior
If your endpoint does not return a2xx status code, the webhook will be retried with exponential backoff:
After 5 failed attempts, the webhook is marked as failed. You can check delivery status via the Get Generation Status endpoint:
webhook field is only present when a callback_url was provided. Possible statuses: pending, delivered, failed.
Your webhook endpoint should return a
2xx status code within 10 seconds to acknowledge
receipt. Process the payload asynchronously if your handler needs more time.