---
title: "Cancel Run"
method: POST
path: "/threads/{thread_id}/runs/{run_id}/cancel"
tags: ["Runs"]
---

# Cancel Run

`POST /threads/{thread_id}/runs/{run_id}/cancel`

## Path parameters

- `thread_id` string, uuid, required — The ID of the thread.
- `run_id` string, uuid, required — The ID of the run.

## Query parameters

- `wait` boolean
- `action` 'interrupt' | 'rollback'

## Response `200`

Success

- unknown

## Other responses

- `404` — Not Found
- `422` — Validation Error

---

[API](https://skmtc.net/xpert-ai/apis/agent-protocol.md) · [All operations](https://skmtc.net/xpert-ai/apis/agent-protocol/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xpert-ai/agent-protocol/versions/ac9dbe16ea2f/schema)
