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:
| Attempt | Delay after previous |
|---|---|
| 1 | Immediate |
| 2 | ~1 second |
| 3 | ~5 seconds |
| 4 | ~30 seconds |
| 5 | ~2 minutes |
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.