> 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/interface-and-deployment/api-reference/run-flow.md).

# Run Flow

## Run Deployed Flow

> Run a flow and get the result.

```json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","description":"Authorization header. [Learn how to get it](/docs/api-reference/how-to-get-credentials).","flows":{"password":{"scopes":{},"tokenUrl":"token"}}}},"schemas":{"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/run/{org_id}/{flow_id}":{"post":{"tags":["Run Flow"],"summary":"Run Deployed Flow","description":"Run a flow and get the result.","operationId":"runDeployedFlow","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","description":"The flow ID. [Learn how to get it](/docs/api-reference/how-to-get-flow-id).","title":"Flow Id"},"description":"The flow ID. [Learn how to get it](/docs/api-reference/how-to-get-flow-id)."},{"name":"version","in":"query","required":false,"schema":{"type":"integer","description":"Version of the flow","default":-1,"title":"Version"},"description":"Version of the flow"},{"name":"verbose","in":"query","required":false,"schema":{"type":"boolean","description":"Return the full model","default":true,"title":"Verbose"},"description":"Return the full model"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Input parameters for the flow","title":"Inputs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stackai.com/interface-and-deployment/api-reference/run-flow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
