> For the complete documentation index, see [llms.txt](https://docs.pletor.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pletor.ai/documentation/api-reference/app-runs.md).

# App Runs

Create, monitor, and cancel app executions.

## List App Runs

> List app execution runs with filtering options.\
> \
> This endpoint returns a paginated list of app execution runs with their current\
> status and basic metadata. Agent runs are listed separately via \`GET /runs\`.\
> \
> \*\*Filtering Options:\*\*\
> \- \`status\`: Filter by execution status (in\_progress, completed, failed, canceled)\
> \- \`external\_id\`: Filter to runs you tagged with this reference id at creation.\
> &#x20; Use this to check whether you already started a run for a given item before\
> &#x20; starting another.\
> \
> \*\*Pagination Parameters:\*\*\
> \- \`limit\`: Maximum number of items to return (default: 20, max: 100)\
> \- \`cursor\`: Cursor for pagination (optional)\
> \
> \*\*Response:\*\*\
> \- \`data\`: List of app-run summaries with basic information\
> \- \`has\_more\`: Indicates if there are more results available\
> \- \`next\_cursor\`: Cursor for the next page of results

```json
{"openapi":"3.1.0","info":{"title":"Pletor - Public API","version":"1.0.0"},"tags":[{"name":"app-runs","description":"Create, monitor, and cancel app executions."}],"servers":[{"url":"https://api.pletor.ai/api/public/v1","description":"Production"}],"security":[{"APIKeyHeader":[]}],"components":{"securitySchemes":{},"schemas":{"FlowRunStatus":{"type":"string","enum":["in_progress","completed","failed","canceled"],"title":"FlowRunStatus","description":"Execution status of a workflow run."},"CursorPaginatedResponse_AppRunSummary_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AppRunSummary"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data","has_more"],"title":"CursorPaginatedResponse[AppRunSummary]"},"AppRunSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique run identifier"},"app_id":{"type":"string","format":"uuid","title":"App Id","description":"Stable ID of the app that was executed"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Client-supplied reference id provided at creation, if any"},"status":{"$ref":"#/components/schemas/FlowRunStatus","description":"Current execution state"},"progress":{"type":"number","maximum":1,"minimum":0,"title":"Progress","description":"Completion progress from 0.0 to 1.0","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution started"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When execution finished"},"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost","description":"Total credits consumed by this run"}},"type":"object","required":["id","app_id","status","created_at"],"title":"AppRunSummary","description":"Lightweight app-run summary for list views."},"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"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/app-runs/":{"get":{"tags":["app-runs"],"summary":"List App Runs","description":"List app execution runs with filtering options.\n\nThis endpoint returns a paginated list of app execution runs with their current\nstatus and basic metadata. Agent runs are listed separately via `GET /runs`.\n\n**Filtering Options:**\n- `status`: Filter by execution status (in_progress, completed, failed, canceled)\n- `external_id`: Filter to runs you tagged with this reference id at creation.\n  Use this to check whether you already started a run for a given item before\n  starting another.\n\n**Pagination Parameters:**\n- `limit`: Maximum number of items to return (default: 20, max: 100)\n- `cursor`: Cursor for pagination (optional)\n\n**Response:**\n- `data`: List of app-run summaries with basic information\n- `has_more`: Indicates if there are more results available\n- `next_cursor`: Cursor for the next page of results","operationId":"list_app_runs_app_runs__get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FlowRunStatus"},{"type":"null"}],"title":"Status"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of items to return","default":20,"title":"Limit"},"description":"Maximum number of items to return"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination (from next_cursor)","title":"Cursor"},"description":"Cursor for pagination (from next_cursor)"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active organization ID for multi-org support","title":"X-Organization-Id"},"description":"Active organization ID for multi-org support"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedResponse_AppRunSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create App Run

> Create and start a new app execution run.\
> \
> This endpoint launches the execution of an app with the provided inputs. The\
> execution runs asynchronously, allowing you to monitor progress and retrieve\
> results when complete.\
> \
> \*\*Idempotency with \`external\_id\`:\*\* Optionally pass an \`external\_id\` (e.g. your\
> own order or job id). It is \*\*unique per organization\*\*: the first request with\
> a given key starts the run; any later write reusing that key — including a\
> dropped-response retry — is rejected with \*\*\`409 conflict\`\*\* instead of starting\
> (and charging) a duplicate. To fetch the run a key already created, use\
> \`GET /app-runs?external\_id=...\`. The id is echoed on every app-run response.\
> \
> \- Scope: per organization, across \*\*all\*\* runs (agent and app share the key\
> &#x20; space) and \*\*all\*\* statuses — a key, once used, stays used.\
> \- On \`409\`, do \*\*not\*\* keep retrying the create; \`GET /app-runs?external\_id=\` to\
> &#x20; retrieve the existing run. To start a genuinely new run, use a new \`external\_id\`.\
> \
> \*\*How to Build Inputs:\*\*\
> \
> 1\. \*\*First, get app details\*\*: Call \`GET /apps/{app\_id}\` to retrieve the app\
> &#x20;  configuration.\
> 2\. \*\*Examine the \`inputs\` array\*\*: Each object defines what input the app expects:\
> &#x20;  \- \`id\`: Use this as the \`id\` in your input object\
> &#x20;  \- \`type\`: text, image, video, audio, brand, or file\
> &#x20;  \- \`required\`: whether the input is mandatory\
> &#x20;  \- \`options\` / \`min\_selections\` / \`max\_selections\`: constraints for fixed-set inputs\
> \
> \*\*Text Inputs:\*\*\
> \`\`\`json\
> {"id": "text\_input\_node\_id", "value": "Your text content here"}\
> \`\`\`\
> \
> \*\*Asset Inputs\*\* (image / video / audio / file):\
> \`\`\`json\
> {"id": "image\_input\_node\_id", "value": {"asset\_ids": \["uuid1", "uuid2"]}}\
> \`\`\`\
> Upload assets first via \`POST /assets/upload\` to get the UUIDs.\
> \
> \*\*Example:\*\*\
> \`\`\`json\
> {\
> &#x20;   "app\_id": "550e8400-e29b-41d4-a716-446655440000",\
> &#x20;   "inputs": \[\
> &#x20;       {"id": "uuid-1", "value": "Create a marketing banner for a tech startup"}\
> &#x20;   ]\
> }\
> \`\`\`\
> \
> \*\*Curated contract:\*\* only the inputs advertised by \`GET /apps/{app\_id}\` are\
> accepted. Unknown input ids, missing required inputs, and values that violate an\
> input's \`options\` / \`min\_selections\` / \`max\_selections\` are rejected with \`400\`.\
> The completed run's \`results\` contain only the app's curated outputs — never the\
> underlying flow's internal nodes.\
> \
> \*\*Response:\*\*\
> \- AppRun object with execution details and initial status\
> \- Use \`id\` to monitor progress via \`GET /app-runs/{run\_id}\`\
> \
> \*\*Error Codes:\*\*\
> \- \`400\`: Invalid input format, missing required inputs, or values outside constraints\
> \- \`404\`: App not found or not accessible

````json
{"openapi":"3.1.0","info":{"title":"Pletor - Public API","version":"1.0.0"},"tags":[{"name":"app-runs","description":"Create, monitor, and cancel app executions."}],"servers":[{"url":"https://api.pletor.ai/api/public/v1","description":"Production"}],"security":[{"APIKeyHeader":[]}],"components":{"securitySchemes":{},"schemas":{"AppRunCreateRequest":{"properties":{"app_id":{"type":"string","format":"uuid","title":"App Id","description":"Stable ID of the app to execute"},"inputs":{"items":{"$ref":"#/components/schemas/RunInput"},"type":"array","title":"Inputs","description":"Inputs for the app. Get required inputs from GET /apps/{id}"},"external_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Id","description":"Optional client-supplied reference id (e.g. your order or job id, max 255 chars). Unique per organization: reusing one returns 409 conflict — so a dropped-response retry never creates a duplicate. Echoed on every app run and filterable via GET /app-runs?external_id= to fetch it. Use a new id per run."}},"type":"object","required":["app_id"],"title":"AppRunCreateRequest","description":"Request to create and start a new app execution run."},"RunInput":{"properties":{"id":{"type":"string","title":"Id","description":"Node ID that this input targets"},"value":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Value","description":"Input value: plain text string for text inputs, or {\"asset_ids\": [\"uuid\"]} for asset inputs"}},"type":"object","required":["id","value"],"title":"RunInput","description":"Represents an input provided to a run.\n\nShared by agent runs and app runs: both pipelines accept the same wire shape."},"AppRun":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique run identifier"},"app_id":{"type":"string","format":"uuid","title":"App Id","description":"Stable ID of the app being executed"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Client-supplied reference id provided at creation, if any"},"status":{"$ref":"#/components/schemas/FlowRunStatus","description":"Current execution state: in_progress, completed, failed, or canceled"},"progress":{"type":"number","maximum":1,"minimum":0,"title":"Progress","description":"Completion progress from 0.0 to 1.0","default":0},"current_node":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Node","description":"Type of the node currently executing (e.g. image_generation, llm). Only present while status is in_progress"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution started"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When execution finished"},"inputs":{"items":{"$ref":"#/components/schemas/RunInput"},"type":"array","title":"Inputs","description":"Inputs provided for this run"},"results":{"items":{"$ref":"#/components/schemas/RunResult"},"type":"array","title":"Results","description":"Curated app outputs, populated when status is completed"},"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost","description":"Total credits consumed by this run"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if the run failed"},"failure_reason":{"anyOf":[{"$ref":"#/components/schemas/FailureReason"},{"type":"null"}],"description":"Categorized failure reason (timeout, content_policy, insufficient_credits, invalid_input, provider_error, provider_auth_required, canceled, unknown). Present when status is failed."}},"type":"object","required":["id","app_id","status","created_at"],"title":"AppRun","description":"Complete representation of an app execution run."},"FlowRunStatus":{"type":"string","enum":["in_progress","completed","failed","canceled"],"title":"FlowRunStatus","description":"Execution status of a workflow run."},"RunResult":{"properties":{"id":{"type":"string","title":"Id","description":"Node ID that produced this result"},"type":{"$ref":"#/components/schemas/DataType","description":"Type of the result data"},"value":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value","description":"Result content: text string, list of asset UUIDs, or structured data"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description of the result"}},"type":"object","required":["id","type"],"title":"RunResult","description":"Represents a result produced by a run.\n\nShared by agent runs and app runs: both pipelines emit the same wire shape."},"DataType":{"type":"string","enum":["text","images","videos","files","audio","data"],"title":"DataType","description":"Types of data that agents can accept as input or produce as output."},"FailureReason":{"type":"string","enum":["timeout","content_policy","insufficient_credits","invalid_input","provider_error","provider_auth_required","canceled","unknown"],"title":"FailureReason","description":"Stable, client-facing categories for why a run failed. A curated public\nview over the internal `NodeFailureReason`; internal-only causes collapse to\n`unknown` so the public contract stays stable as internals change."},"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"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/app-runs/":{"post":{"tags":["app-runs"],"summary":"Create App Run","description":"Create and start a new app execution run.\n\nThis endpoint launches the execution of an app with the provided inputs. The\nexecution runs asynchronously, allowing you to monitor progress and retrieve\nresults when complete.\n\n**Idempotency with `external_id`:** Optionally pass an `external_id` (e.g. your\nown order or job id). It is **unique per organization**: the first request with\na given key starts the run; any later write reusing that key — including a\ndropped-response retry — is rejected with **`409 conflict`** instead of starting\n(and charging) a duplicate. To fetch the run a key already created, use\n`GET /app-runs?external_id=...`. The id is echoed on every app-run response.\n\n- Scope: per organization, across **all** runs (agent and app share the key\n  space) and **all** statuses — a key, once used, stays used.\n- On `409`, do **not** keep retrying the create; `GET /app-runs?external_id=` to\n  retrieve the existing run. To start a genuinely new run, use a new `external_id`.\n\n**How to Build Inputs:**\n\n1. **First, get app details**: Call `GET /apps/{app_id}` to retrieve the app\n   configuration.\n2. **Examine the `inputs` array**: Each object defines what input the app expects:\n   - `id`: Use this as the `id` in your input object\n   - `type`: text, image, video, audio, brand, or file\n   - `required`: whether the input is mandatory\n   - `options` / `min_selections` / `max_selections`: constraints for fixed-set inputs\n\n**Text Inputs:**\n```json\n{\"id\": \"text_input_node_id\", \"value\": \"Your text content here\"}\n```\n\n**Asset Inputs** (image / video / audio / file):\n```json\n{\"id\": \"image_input_node_id\", \"value\": {\"asset_ids\": [\"uuid1\", \"uuid2\"]}}\n```\nUpload assets first via `POST /assets/upload` to get the UUIDs.\n\n**Example:**\n```json\n{\n    \"app_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"inputs\": [\n        {\"id\": \"uuid-1\", \"value\": \"Create a marketing banner for a tech startup\"}\n    ]\n}\n```\n\n**Curated contract:** only the inputs advertised by `GET /apps/{app_id}` are\naccepted. Unknown input ids, missing required inputs, and values that violate an\ninput's `options` / `min_selections` / `max_selections` are rejected with `400`.\nThe completed run's `results` contain only the app's curated outputs — never the\nunderlying flow's internal nodes.\n\n**Response:**\n- AppRun object with execution details and initial status\n- Use `id` to monitor progress via `GET /app-runs/{run_id}`\n\n**Error Codes:**\n- `400`: Invalid input format, missing required inputs, or values outside constraints\n- `404`: App not found or not accessible","operationId":"create_app_run_app_runs__post","parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active organization ID for multi-org support","title":"X-Organization-Id"},"description":"Active organization ID for multi-org support"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRunCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
````

## Get App Run

> Get detailed information about a specific app execution run.\
> \
> This endpoint retrieves comprehensive information about an app run, including\
> real-time status, progress, inputs, and curated results when available.\
> \
> \*\*Monitoring Workflow:\*\*\
> 1\. Create run via \`POST /app-runs\`\
> 2\. Poll this endpoint to monitor progress\
> 3\. Stop polling when status becomes "completed", "failed", or "canceled"\
> 4\. Extract results from the \`results\` array when status is "completed"\
> \
> \*\*How to Retrieve Results:\*\*\
> Call \`GET /apps/{app\_id}\` and examine the \`outputs\` array, then match results to\
> outputs by \`id\`. Asset results (images/videos/audio/files) are arrays of asset\
> UUIDs — resolve each via \`GET /assets/{id}\` and fetch the \`url\` field.\
> \
> \*\*Error Codes:\*\*\
> \- \`404\`: Run not found or not accessible

```json
{"openapi":"3.1.0","info":{"title":"Pletor - Public API","version":"1.0.0"},"tags":[{"name":"app-runs","description":"Create, monitor, and cancel app executions."}],"servers":[{"url":"https://api.pletor.ai/api/public/v1","description":"Production"}],"security":[{"APIKeyHeader":[]}],"components":{"securitySchemes":{},"schemas":{"AppRun":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique run identifier"},"app_id":{"type":"string","format":"uuid","title":"App Id","description":"Stable ID of the app being executed"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Client-supplied reference id provided at creation, if any"},"status":{"$ref":"#/components/schemas/FlowRunStatus","description":"Current execution state: in_progress, completed, failed, or canceled"},"progress":{"type":"number","maximum":1,"minimum":0,"title":"Progress","description":"Completion progress from 0.0 to 1.0","default":0},"current_node":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Node","description":"Type of the node currently executing (e.g. image_generation, llm). Only present while status is in_progress"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the run was created"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution started"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When execution finished"},"inputs":{"items":{"$ref":"#/components/schemas/RunInput"},"type":"array","title":"Inputs","description":"Inputs provided for this run"},"results":{"items":{"$ref":"#/components/schemas/RunResult"},"type":"array","title":"Results","description":"Curated app outputs, populated when status is completed"},"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost","description":"Total credits consumed by this run"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if the run failed"},"failure_reason":{"anyOf":[{"$ref":"#/components/schemas/FailureReason"},{"type":"null"}],"description":"Categorized failure reason (timeout, content_policy, insufficient_credits, invalid_input, provider_error, provider_auth_required, canceled, unknown). Present when status is failed."}},"type":"object","required":["id","app_id","status","created_at"],"title":"AppRun","description":"Complete representation of an app execution run."},"FlowRunStatus":{"type":"string","enum":["in_progress","completed","failed","canceled"],"title":"FlowRunStatus","description":"Execution status of a workflow run."},"RunInput":{"properties":{"id":{"type":"string","title":"Id","description":"Node ID that this input targets"},"value":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Value","description":"Input value: plain text string for text inputs, or {\"asset_ids\": [\"uuid\"]} for asset inputs"}},"type":"object","required":["id","value"],"title":"RunInput","description":"Represents an input provided to a run.\n\nShared by agent runs and app runs: both pipelines accept the same wire shape."},"RunResult":{"properties":{"id":{"type":"string","title":"Id","description":"Node ID that produced this result"},"type":{"$ref":"#/components/schemas/DataType","description":"Type of the result data"},"value":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value","description":"Result content: text string, list of asset UUIDs, or structured data"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description of the result"}},"type":"object","required":["id","type"],"title":"RunResult","description":"Represents a result produced by a run.\n\nShared by agent runs and app runs: both pipelines emit the same wire shape."},"DataType":{"type":"string","enum":["text","images","videos","files","audio","data"],"title":"DataType","description":"Types of data that agents can accept as input or produce as output."},"FailureReason":{"type":"string","enum":["timeout","content_policy","insufficient_credits","invalid_input","provider_error","provider_auth_required","canceled","unknown"],"title":"FailureReason","description":"Stable, client-facing categories for why a run failed. A curated public\nview over the internal `NodeFailureReason`; internal-only causes collapse to\n`unknown` so the public contract stays stable as internals change."},"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"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/app-runs/{run_id}":{"get":{"tags":["app-runs"],"summary":"Get App Run","description":"Get detailed information about a specific app execution run.\n\nThis endpoint retrieves comprehensive information about an app run, including\nreal-time status, progress, inputs, and curated results when available.\n\n**Monitoring Workflow:**\n1. Create run via `POST /app-runs`\n2. Poll this endpoint to monitor progress\n3. Stop polling when status becomes \"completed\", \"failed\", or \"canceled\"\n4. Extract results from the `results` array when status is \"completed\"\n\n**How to Retrieve Results:**\nCall `GET /apps/{app_id}` and examine the `outputs` array, then match results to\noutputs by `id`. Asset results (images/videos/audio/files) are arrays of asset\nUUIDs — resolve each via `GET /assets/{id}` and fetch the `url` field.\n\n**Error Codes:**\n- `404`: Run not found or not accessible","operationId":"get_app_run_app_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active organization ID for multi-org support","title":"X-Organization-Id"},"description":"Active organization ID for multi-org support"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Cancel App Run

> Cancel an ongoing app execution run.\
> \
> This endpoint allows you to cancel an execution that is currently running or\
> pending. Once cancelled, the execution cannot be resumed.\
> \
> \*\*Behavior:\*\*\
> \- Only running or pending executions can be cancelled\
> \- Completed or failed executions cannot be cancelled\
> \- Cancellation may take a few seconds to take effect\
> \
> \*\*Error Codes:\*\*\
> \- \`404\`: Run not found or not accessible

```json
{"openapi":"3.1.0","info":{"title":"Pletor - Public API","version":"1.0.0"},"tags":[{"name":"app-runs","description":"Create, monitor, and cancel app executions."}],"servers":[{"url":"https://api.pletor.ai/api/public/v1","description":"Production"}],"security":[{"APIKeyHeader":[]}],"components":{"securitySchemes":{},"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"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/app-runs/{run_id}":{"delete":{"tags":["app-runs"],"summary":"Cancel App Run","description":"Cancel an ongoing app execution run.\n\nThis endpoint allows you to cancel an execution that is currently running or\npending. Once cancelled, the execution cannot be resumed.\n\n**Behavior:**\n- Only running or pending executions can be cancelled\n- Completed or failed executions cannot be cancelled\n- Cancellation may take a few seconds to take effect\n\n**Error Codes:**\n- `404`: Run not found or not accessible","operationId":"cancel_app_run_app_runs__run_id__delete","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active organization ID for multi-org support","title":"X-Organization-Id"},"description":"Active organization ID for multi-org support"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
