POST /inference/v0/runs/{org_id}/{run_id}/resume
Resume a paused run that is waiting on a human-in-the-loop response.
How to use
Read the current pause first and submit its token with the actual human answer. A RESUMED response can be nonterminal. Remote resume is only supported for out-of-band execution; SSE is not supported for trigger-backed runs. Inspect 406/409 responses before choosing a supported continuation mode.
Authentication and permissions
Required permissions: projects.run. Resource and owner access checks also apply.
Prepare request.json
Save the example body below as request.json for the curl sample. Replace example IDs, node keys, and dynamic configuration with values for your organization; these are illustrative, not pre-existing resources.
{
"resume_token": "TOKEN_FROM_PAUSE",
"response": "THE_HUMAN_ANSWER"
}Personal API key or the endpoint-specific legacy organization API key. Legacy inference uses the public organization key; legacy analytics uses the private organization key. This is not a password-grant login flow.
The paused run ID to resume.
Return the full model when streaming an in-process resume over SSE.
trueSet to 'remote' to watch the continuation over a WebSocket (202 + handle) instead of blocking on this request; only valid for runs that resume out of band (Temporal/trigger) — sending it for an in-process run returns 409. Omit to resume inline (JSON, or SSE when the request sends Accept: text/event-stream).
Resume token plus the human response to inject into the paused run.
How to interpret response, mirroring the pause's response_type.
textPossible values: Returns the run-result envelope (same shape as a normal run): in-memory runs resume synchronously with a terminal state + outputs; out-of-band (Temporal/trigger) runs return state=RESUMED with empty outputs, and the client polls GET /runs/{org_id}/{run_id} for completion. With Accept: text/event-stream the continuation streams back as SSE for in-process and live Temporal runs (trigger-backed runs return 406).
Returned with execution_mode=remote and no Accept: text/event-stream on a durable run: the continuation runs in the background; the body carries the run_id and a WebSocket handle. Watch the room or poll GET /runs/{org_id}/{run_id} for completion.
Invalid or expired resume token
Run is paused on a step not resumable via the public API (only ask-human pauses are supported).
Run not found or does not belong to this organization
Accept: text/event-stream was sent for a trigger-backed run, which has no event stream to relay. Retry without the Accept header and poll GET /runs/{org_id}/{run_id}, or pass execution_mode=remote for a 202 + WebSocket handle.
Run is not paused/resumable, or execution_mode=remote was sent for an in-process run that can only resume inline.
Validation Error
curl --fail-with-body -sS \
"$STACKAI_BASE_URL/inference/v0/runs/${ORG_ID}/${RUN_ID}/resume" \
-H "Authorization: Bearer $STACKAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @request.json{}Last updated
Was this helpful?

