Setting Up Webhooks
Passcallback_url when creating a generation to receive notifications:
Webhook Payload
When generation completes (success or failure), we send a POST request to yourcallback_url:
Success Payload
Failure Payload
Webhook Fields
UUID of the completed generation
Final status:
"completed" or "failed"URL of generated image (only for
completed status)Error code if failed, otherwise
nullHandling Webhooks
Best Practices
Validate Requests
Validate Requests
Verify that webhook requests are coming from RunBlob by checking the request origin or implementing signature verification.
Respond Quickly
Respond Quickly
Return a 2xx response within 5 seconds. Process the webhook asynchronously if needed.
Handle Retries
Handle Retries
Implement idempotency - we may retry failed webhook deliveries. Use
task_uuid to deduplicate.Use HTTPS
Use HTTPS
Always use HTTPS endpoints for webhooks to ensure secure data transmission.