Skip to main content
Long-running models push their final payload to a URL you control. You provide the URL on the request; Runflow POSTs the result when the run finishes.

Pattern

  1. Call POST /v1/models/{model_id}/runs with callback_url, where {model_id} is the slash-delimited provider/model path shown on the model page.
  2. Save the returned id. Callback payloads call the same value run_id.
  3. Run finishes in the background.
  4. Runflow POSTs to callback_url.
  5. Your handler returns 200 OK within 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:
Save the returned 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 with GET /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:

Verify signatures

HMAC verify in Node and Python.

Callback delivery API

History, redelivery, and secrets.