---
title: "Cancel in-progress generation"
method: POST
path: "/chats/{chat_id}/cancel"
tags: ["Chat"]
---

# Cancel in-progress generation

`POST /chats/{chat_id}/cancel`

Cancel any pending or streaming message generation in the chat.

## Path parameters

- `chat_id` integer, required

## Query parameters

- `cookie_name` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `401` — Missing or invalid authentication.
- `403` — No access to this chat.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/revisions/b53e89b98c2b/schema)
