What Are Webhooks?
Instead of polling for prediction results, you can provide awebhook_url when creating a prediction. each::labs will POST the result to your URL when the prediction completes.
Currently, webhooks are only supported for Workflows V2. Support for other services is being expanded.
How It Works
1
Provide a webhook URL
Include
webhook_url when creating a prediction, plus webhook_secret if you want deliveries signed.2
Prediction runs
The model processes your input asynchronously.
3
Result delivered
When complete, each::labs POSTs the result to your webhook URL.
Setting Up Webhooks
webhook_secret, each delivery is signed with HMAC-SHA256 and carries X-Webhook-Signature and X-Webhook-Timestamp headers. See Verifying Webhook Signatures. Omit the secret and deliveries are still sent, just unsigned.
Retry Behavior
Deliveries are attempted up to 3 times in total: the initial attempt plus 2 retries, spaced roughly 10 seconds apart. Every attempt of one delivery carries the same signature and timestamp. You can track delivery attempts using the Get Webhook endpoint.Delivery Attempt Statuses
Redelivery
If a delivery failed, or your endpoint was down when it arrived, you can send the same payload again. Open the webhook on the Webhooks page in the dashboard and choose Redeliver. A redelivery is a fresh delivery of the original payload:- The request body is byte-for-byte the original.
- It carries
X-Webhook-Redelivery: true. An ordinary delivery does not send this header at all, so your endpoint can tell the two apart. The header is set when the request is sent and cannot be supplied through your own webhook headers. - A signed webhook is signed again at send time, so its signature and timestamp differ from the original delivery. See Redeliveries are signed again.
- It is sent once. The retry policy above covers the original delivery, not a redelivery. To try again after a redelivery fails, redeliver again.
- The attempt is recorded alongside the original attempts and appears in Get Webhook. The response does not mark which attempt was a redelivery — only the delivered request carries the header.
execution_id rather than assuming every request is new.
Redelivery is offered only when it would succeed. It is unavailable while a delivery is still in flight, for a short cooldown after a redelivery, and once the stored payload has been erased.