> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel an active chat completion

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



## OpenAPI

````yaml /Ubuntu/ai-workflows/api-specs/llm-vlm-service/openapi.yaml post /v1/cancel/{completion_id}
openapi: 3.0.3
info:
  title: LLM-VLM GenAI Microservice APIs
  description: >-
    These REST APIs provide the capability to run inference on Qualcomm
    Dragonwing devices.
  version: 1.0.0
servers:
  - url: http://{device-ip}:{device-port}/
    description: LLM-VLM Microservice API Server
    variables:
      device-ip:
        description: >-
          IP address and port of the host device running the LLM-VLM
          Microservice API
        default: localhost
      device-port:
        default: '9001'
security: []
paths:
  /v1/cancel/{completion_id}:
    post:
      tags:
        - Chat
      summary: Cancel an active chat completion
      description: >-
        Cancels an actively executing chat completion by terminating the
        subprocess and rolling back session state.
      operationId: cancelChatCompletion
      parameters:
        - name: completion_id
          in: path
          required: true
          description: The ID of the chat completion to cancel
          schema:
            type: string
      responses:
        '200':
          description: The chat completion was cancelled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionCancelled'
        '400':
          description: No active event to cancel
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
        '404':
          description: The chat completion with the specified ID was not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
components:
  schemas:
    ChatCompletionCancelled:
      type: object
      title: Chat completion cancelled
      description: Represents the cancellation confirmation of an active chat completion.
      properties:
        id:
          type: string
          description: The ID of the cancelled chat completion.
        object:
          type: string
          description: The object type, which is always "chat.completion.cancelled".
          enum:
            - chat.completion.cancelled
        cancelled:
          type: boolean
          description: Whether the chat completion was successfully cancelled.
        message:
          type: string
          description: Additional information about the cancellation.
      required:
        - id
        - object
        - cancelled

````