Start runs, follow them and read their results. Every endpoint on this page works with member and admin keys. See runs for the lifecycle and limits.
Start a run
/v1/runsprompt or the name of a saved workflow.promptstringworkflow is set; with a workflow, it replaces the saved prompt. Up to 128 KiB.inputany JSONworkflowstringmodelstringdefault_model from GET /v1/models.filesarray{"file": "<id or name>", "path": "..."} or {"path": "...", "content": "..."}. See files.connectionsobject{"ref": "<saved name>"} with optional allowed_methods or allowed_tools, or an inline definition. See connections.descriptionstringinput_schemaobjectinput must match; a mismatch returns 400 with the path and reason, such as input.city: required. With a workflow, it replaces the saved schema. See describing inputs and outputs.output_schemaobjectfailed. With a workflow, it replaces the saved schema. See describing inputs and outputs.timeout_secondsintegershellbooleantrue.webboolean | objecttrue, or { "allow": [domains], "search": false } to limit it. Default off. See web access.zero_data_retentionbooleanfalse.max_cost_microsintegerdefault_max_cost_micros from GET /v1/me. On the hosted service it must cover the compute charge for the full timeout. See budgets.callbackobject{"url": "...", "secret": "..."} for a signed request when the run ends. See callbacks.Idempotency-Keystring200.curl $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 7d0f3c1e-6a52-4b8e-9f21-0c4d5e6a7b89" \
-d '{
"workflow": "investigate-payment",
"input": { "payment_id": "pay_123" },
"max_cost_micros": 500000
}'The response is 202 Accepted with the new run object. A request that fails validation returns 400 and creates nothing. On the hosted service, 402 means your available credits do not cover the budget.
The run object
idstringrun_4abb0f420c6623a12d2889610eb67284.statusstringreserving, queued, starting, running, succeeded, failed, cancelled, timed_out or interrupted.outputstringerrorstringcreated_attimestampstarted_attimestampfinished_attimestampmax_cost_microsintegercost_microsintegerbilling_pending is false on a finished run. Omitted when zero.billing_pendingbooleanschedule_idstringzero_data_retentionbooleantrue for a zero-data-retention run.surcharge_percentintegersurcharge_microsintegercost_micros added by the zero-data-retention surcharge. Omitted when zero.output_availablebooleanoutput_expires_attimestamp{
"id": "run_4abb0f420c6623a12d2889610eb67284",
"status": "succeeded",
"output": "The card issuer declined pay_123 for insufficient funds. The processor had no incidents. Ask the customer to retry or use another card.",
"created_at": "2026-10-03T09:14:05.118Z",
"started_at": "2026-10-03T09:14:05.402Z",
"finished_at": "2026-10-03T09:14:41.877Z",
"max_cost_micros": 500000,
"cost_micros": 14390,
"billing_pending": false
}List runs
/v1/runslimitintegercursorstringnext_cursor from the previous page.statusstringschedulestring{
"items": [
{ "id": "run_91c0…", "status": "failed", "error": "Worker failed; inspect run events. External actions may have completed.", "created_at": "2026-10-03T08:51:12.004Z", "max_cost_micros": 500000, "cost_micros": 61200, "billing_pending": false },
{ "id": "run_3fd2…", "status": "failed", "error": "Credit reservation failed", "created_at": "2026-10-02T17:20:44.390Z", "max_cost_micros": 500000, "billing_pending": false }
],
"next_cursor": "eyJvIjoib3JnXzVlMmIi…"
}Without limit or cursor, the response is a plain array of the 100 most recent matching runs. See pagination.
Get a run
/v1/runs/{id}Stream events
/v1/runs/{id}/eventsdone with the run object and closes.Last-Event-IDinteger: connected
id: 88412
event: status
data: {"id":88412,"type":"status","data":{"status":"running"},"created_at":"2026-10-03T09:14:05.431Z"}
id: 88415
event: worker_started
data: {"id":88415,"type":"worker_started","data":{"runtime":"pi","mode":"pi","shell":false},"created_at":"2026-10-03T09:14:07.906Z"}
id: 88419
event: tool_start
data: {"id":88419,"type":"tool_start","data":{"tool":"http_0","id":"call_1","arguments":{"method":"GET","path":"/payments/pay_123"}},"created_at":"2026-10-03T09:14:10.215Z"}
id: 88431
event: result
data: {"id":88431,"type":"result","data":{"output":"The card issuer declined pay_123 for insufficient funds."},"created_at":"2026-10-03T09:14:41.702Z"}
event: done
data: {"id":"run_4abb0f420c6623a12d2889610eb67284","status":"succeeded", …}Each message's data is an event object with id, type, data and created_at, except done, which carries the run object. Lines starting with a colon are comments; a heartbeat comment is sent every 15 seconds. The event types are listed under event types. Disconnecting does not cancel the run.
curl -N $EPHEMERAL_URL/v1/runs/run_4abb0f420c6623a12d2889610eb67284/events \
-H "Authorization: Bearer $EPHEMERAL_API_KEY"Cancel a run
/v1/runs/{id}/cancelreserving, queued, starting or running, and returns the run object. A run that has already finished is returned unchanged.Read a run definition
/v1/runs/{id}/definition{
"request": {
"prompt": "Find out why this payment failed. Follow the playbook.",
"model": "anthropic/claude-haiku-5.5",
"files": [{ "file": "file_9c41d2a07be35f1e8a6c0d4b9e2f7a13", "path": "playbook.md" }],
"connections": {
"payments": { "ref": "payments-api", "allowed_methods": ["GET"] },
"crm": { "type": "http", "url": "https://api.example.com", "allowed_methods": ["GET"] }
},
"timeout_seconds": 120,
"shell": false,
"max_cost_micros": 500000,
"input": { "payment_id": "pay_123" }
},
"requires_credentials": ["crm"]
}request is the resolved definition. File names are replaced by the IDs that were used, and a workflow's saved fields are filled in. The workflow name and callback are left out. Saved connections keep only their reference and allowlists. Inline connections lose their credentials and any secrets in their URL.
requires_credentials lists inline connections that need credentials or their original URL restored. To run it again, add those back, choose a new max_cost_micros, and send the request to POST /v1/runs. Saved connection references are resolved again at that point, and the request fails if a referenced file or connection has been deleted.
Zero data retention runs
A run with zero_data_retention returns its output once. The first GET /v1/runs/{id} after it finishes includes output and deletes it; later reads omit it and report output_available: false. When the run has a callback, the callback delivers the output, and GET leaves it in place until then. An undelivered output is deleted after at most an hour.
The event stream works while the run works and for a few minutes afterwards. GET /v1/runs/{id}/definition returns 410, and run lists never include output. On the hosted service cost_micros includes the surcharge, and the budget must cover it.