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
SwitchX callbacks have up to five attempts. Retryable failures use approximately 1, 2, 5, and 10 minute delays before subsequent attempts, with jitter. Permanent failures stop without using the remaining attempts. 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.