> 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/get-inference-v0-runs-org_id-run_id.md).

# GET /inference/v0/runs/{org\_id}/{run\_id}

## Get Run

> Get the status of a run, including the human-in-the-loop pause when waiting.\
> \
> \*\*How to use\*\*\
> \
> Use this to observe a legacy run or retrieve its pause context. Read \`state\` and \`pause\` from this response, not the v2 \`data.status\`/\`pending\_input\` fields. Terminal legacy success is \`COMPLETED\`.\
> \
> \*\*Authentication and permissions\*\*\
> \
> Required permissions: \`projects.read\`. Resource and owner access checks also apply.

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"tags":[{"name":"endpoint-getRun"}],"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":{"RunStatusResponse":{"properties":{"run_id":{"type":"string","title":"Run Id"},"state":{"anyOf":[{"$ref":"#/components/schemas/WorkflowState"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"pause":{"anyOf":[{"$ref":"#/components/schemas/PauseContext"},{"type":"null"}]}},"type":"object","required":["run_id"],"title":"RunStatusResponse","description":"Public run status, surfacing the pause context when the run is awaiting a response."},"WorkflowState":{"type":"string","enum":["PENDING","RUNNING","PAUSED","RESUMED","COMPLETED","FAILED","CANCELLED"],"title":"WorkflowState","description":"Enum representing the possible states of a workflow."},"PauseContext":{"properties":{"run_id":{"type":"string","title":"Run Id"},"node_id":{"type":"string","title":"Node Id"},"question":{"type":"string","title":"Question","default":""},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"response_type":{"type":"string","title":"Response Type","default":"text"},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices"},"resume_token":{"type":"string","title":"Resume Token"},"resume_endpoint":{"type":"string","title":"Resume Endpoint"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the resume token expires (decoded unverified for display; resume re-verifies).","readOnly":true},"response_schema":{"additionalProperties":true,"type":"object","title":"Response Schema","description":"Minimal JSON Schema describing the answer this pause expects.","readOnly":true}},"type":"object","required":["run_id","node_id","resume_token","resume_endpoint","expires_at","response_schema"],"title":"PauseContext","description":"What a paused run is waiting on, plus how to resume it."},"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}":{"get":{"tags":["endpoint-getRun"],"summary":"Get Run","description":"Get the status of a run, including the human-in-the-loop pause when waiting.\n\n**How to use**\n\nUse this to observe a legacy run or retrieve its pause context. Read `state` and `pause` from this response, not the v2 `data.status`/`pending_input` fields. Terminal legacy success is `COMPLETED`.\n\n**Authentication and permissions**\n\nRequired permissions: `projects.read`. Resource and owner access checks also apply.","operationId":"getRun","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 run ID to fetch the status for.","title":"Run Id"},"description":"The run ID to fetch the status for."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunStatusResponse"}}}},"404":{"description":"Run not found or does not belong to this organization"},"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/get-inference-v0-runs-org_id-run_id.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.
