---
title: "Cancel an active chat completion"
method: POST
path: "/v1/cancel/{completion_id}"
tags: ["Chat"]
---

# Cancel an active chat completion

`POST /v1/cancel/{completion_id}`

## Request

- Base URL: `http://localhost:9001`
- URL: `http://localhost:9001/v1/cancel/{completion_id}`
- Auth: none required

Cancels an actively executing chat completion by terminating the subprocess and rolling back session state.

## Path parameters

- `completion_id` string, required

## Response `200`

The chat completion was cancelled successfully

- ChatCompletionCancelled: Represents the cancellation confirmation of an active chat completion.
  - `id` string, required: The ID of the cancelled chat completion.
  - `object` 'chat.completion.cancelled', required: The object type, which is always "chat.completion.cancelled".
  - `cancelled` boolean, required: Whether the chat completion was successfully cancelled.
  - `message` string: Additional information about the cancellation.

## Other responses

- `400`: No active event to cancel
- `404`: The chat completion with the specified ID was not found

---

[API](https://skmtc.dev/qualcomm/apis/llm-vlm-genai-microservice-apis.md) - [All operations](https://skmtc.dev/qualcomm/apis/llm-vlm-genai-microservice-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/qualcomm/apis/llm-vlm-genai-microservice-apis/revisions/8557fe985a5e?raw)
