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.Documentation Index
Fetch the complete documentation index at: https://docs.runflow.io/llms.txt
Use this file to discover all available pages before exploring further.
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:| Field | Notes |
|---|---|
event | One of run.completed, run.failed, run.cancelled, run.partial_succeeded. |
run_id | UUIDv7 of the run. Match against the id from your POST /runs response. |
status | Terminal callback status. Run records expose the same value as status_code on GET /v1/runs/{id}. |
output | The normalized model output on success, an error envelope on failure, or null if cancelled. Batch callbacks use a self-describing {items, succeeded, failed, cancelled, total} envelope, see the OpenAPI for the full shape. |
duration_ms | Total run wall-clock time. |
created_at, completed_at | ISO 8601, +00:00 offset (not Z) so HMAC verification stays byte-equivalent. |
metadata | Whatever you passed at run creation, verbatim. |
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.