Pattern
- Call
POST /v1/models/{model_id}/runswithcallback_url, where{model_id}is the slash-delimited provider/model path shown on the model page. - Save the returned
id. Callback payloads call the same valuerun_id. - Run finishes in the background.
- Runflow POSTs to
callback_url. - Your handler returns
200 OKwithin a few seconds.
Callback payload
The callback body is an event envelope, frozen at delivery time:
Output URLs are presigned and time-limited. Download or re-upload them to your own storage on receipt. Batch callbacks ship the same envelope but with
batch_id instead of run_id.
Verify the source
Create a callback secret and Runflow signs every callback with HMAC-SHA256:plain_secret. Runflow then sends Runflow-Signature: <hmac-hex> on every callback (alongside a Runflow-Request-Id for log correlation). See Verify callback signatures for handler code.
Retries
Runflow retries failed callbacks (non-2xx response, timeout, connection error) on an exponential schedule. Inspect attempts withGET /v1/runs/{run_id}/callback.
Manual redelivery
Replay a callback at any time:Local development
Your laptop is not reachable from the public internet. Tunnel it:Related
Verify signatures
HMAC verify in Node and Python.
Callback delivery API
History, redelivery, and secrets.