Webhook support for predictions

Sep 25, 2024

1 minute read

Release

Share

Predictions now support webhooks. Instead of polling for results, you can pass a webhook URL when creating a prediction and receive updates automatically as the prediction progresses.

Background

Previously, the only way to get results was to poll the GET /predictions/{prediction_id} endpoint until the status reached a terminal state. This works, but it's inefficient — you're either polling too frequently and wasting requests, or too infrequently and adding unnecessary latency to your pipeline.

Webhooks solve this. Your server gets notified the moment a prediction's status changes, with the full prediction payload in the request body.

How it works

Pass a webhook object with a url field when creating a prediction. WriftAI will send a POST request to that URL every time the prediction's status changes — from pending to started, and then to succeeded, or failed.


1curl https://api.wrift.ai/v1/predictions \
2 -H "Authorization: Bearer $WRIFTAI_ACCESS_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "owner/model_name",
6 "input": {"prompt": "a photo of a mountain lake at sunset"},
7 "webhook": {
8 "url": "https://your-server.com/webhooks/wriftai"
9 }
10 }'

What's next

Webhook secrets for verifying request signatures are not yet supported but are on the roadmap. In the meantime, we recommend verifying incoming webhooks by checking the prediction ID against your own records.

Scale Your Projects.
Build With Confidence.

Scale your projects effortlessly with WriftAI. Seamlessly integrate and optimize performance as you expand and innovate.

© 2026 Sych Inc.