> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-api/legacy-inference-and-analytics/inference-v0/post-inference-v0-runs-org_id-run_id-resume.md).

# POST /inference/v0/runs/{org\_id}/{run\_id}/resume

## Resume Run

> 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.\
> \
> \`\`\`json\
> {\
> &#x20; "resume\_token": "TOKEN\_FROM\_PAUSE",\
> &#x20; "response": "THE\_HUMAN\_ANSWER"\
> }\
> \`\`\`

````json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"tags":[{"name":"endpoint-resumeRun"}],"servers":[{"url":"https://api.stack-ai.com","description":"Hosted API. Use your deployment-specific origin for private installations."}],"security":[{"LegacyAPIKeyBearer":[]}],"components":{"securitySchemes":{"LegacyAPIKeyBearer":{"type":"http","scheme":"bearer","description":"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."}},"schemas":{"ExecutionMode":{"type":"string","enum":["in-memory","remote"],"title":"ExecutionMode","description":"Workflow execution modes.\n\nThese are implementation-agnostic names exposed to clients."},"ResumeRunRequest":{"properties":{"resume_token":{"type":"string","title":"Resume Token"},"response":{"type":"string","title":"Response"},"response_type":{"anyOf":[{"$ref":"#/components/schemas/HitlResponseType"},{"type":"null"}],"description":"How to interpret `response`, mirroring the pause's `response_type`."}},"type":"object","required":["resume_token","response"],"title":"ResumeRunRequest","description":"Request body to resume a paused run from the public API."},"HitlResponseType":{"type":"string","enum":["text","approval","choice"],"title":"HitlResponseType","description":"Response types accepted by the public ask_human resume API.\n\nMirrors the ask_human action's own ``Literal[\"text\", \"approval\", \"choice\"]`` (defined in\nstackflow); kept as a separate enum because apps cannot reuse that stackflow Literal."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/inference/v0/runs/{org_id}/{run_id}/resume":{"post":{"tags":["endpoint-resumeRun"],"summary":"Resume Run","description":"Resume a paused run that is waiting on a human-in-the-loop response.\n\n**How to use**\n\nRead 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.\n\n**Authentication and permissions**\n\nRequired permissions: `projects.run`. Resource and owner access checks also apply.\n\n**Prepare request.json**\n\nSave 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.\n\n```json\n{\n  \"resume_token\": \"TOKEN_FROM_PAUSE\",\n  \"response\": \"THE_HUMAN_ANSWER\"\n}\n```","operationId":"resumeRun","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The paused run ID to resume.","title":"Run Id"},"description":"The paused run ID to resume."},{"name":"verbose","in":"query","required":false,"schema":{"type":"boolean","description":"Return the full model when streaming an in-process resume over SSE.","default":true,"title":"Verbose"},"description":"Return the full model when streaming an in-process resume over SSE."},{"name":"execution_mode","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ExecutionMode"},{"type":"null"}],"description":"Set 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).","title":"Execution Mode"},"description":"Set 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)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRunRequest","description":"Resume token plus the human response to inject into the paused run."}}}},"responses":{"200":{"description":"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).","content":{"application/json":{"schema":{"type":"object"}},"text/event-stream":{"schema":{"type":"string"}}}},"202":{"description":"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."},"401":{"description":"Invalid or expired resume token"},"403":{"description":"Run is paused on a step not resumable via the public API (only ask-human pauses are supported)."},"404":{"description":"Run not found or does not belong to this organization"},"406":{"description":"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."},"409":{"description":"Run is not paused/resumable, or execution_mode=remote was sent for an in-process run that can only resume inline."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-api/legacy-inference-and-analytics/inference-v0/post-inference-v0-runs-org_id-run_id-resume.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
