Webhook Delivery
When an event wraps up, each::labs fires off an HTTP POST to your configuredwebhook_url.
- Method:
POST - Content-Type:
application/json - Expected response:
200 OKto acknowledge receipt
Payload Structure
Prediction Complete
Prediction Failed
Webhook Handler Examples
Security
Webhook Secret Verification
If you set awebhook_secret when creating your prediction, you can use it to make sure incoming webhooks are legit.
Retry Behavior
| Attempt | Delay |
|---|---|
| 1st retry | ~30 seconds |
| 2nd retry | ~2 minutes |
| 3rd retry | ~10 minutes |
Best Practices
- Return
200 OKas fast as you can, then process data asynchronously - Implement idempotency, since you may receive the same webhook more than once
- Log incoming payloads for debugging
- Use
webhook_secretto verify payload authenticity - Set up monitoring for your webhook endpoint’s availability