---
title: "Cancel active chat generation"
method: POST
path: "/agent/v1/chat/{id}/cancel"
tags: ["Agents"]
---

# Cancel active chat generation

`POST /agent/v1/chat/{id}/cancel`

Aborts the active generation for this chat session.

## Path parameters

- `id` string, required

## Response `200`

Generation aborted (or no active runtime)

- object
  - `id` string
  - `ok` boolean

## Other responses

- `401` — Invalid API key
- `403` — No agent access or non-API-key auth
- `404` — Chat not found

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/versions/5b7e64e6d6f9/schema)
