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

# Cancel Run



## OpenAPI

````yaml post /run/{run_id}/cancel
openapi: 3.1.0
info:
  title: ComfyDeploy API
  description: >+

    ### Overview


    Welcome to the ComfyDeploy API!


    To create a run thru the API, use the [queue run
    endpoint](#tag/run/POST/run/deployment/queue).


    Check out the [get run endpoint](#tag/run/GET/run/{run_id}), for getting the
    status and output of a run.


    ### Authentication


    To authenticate your requests, include your API key in the `Authorization`
    header as a bearer token. Make sure to generate an API key in the [API Keys
    section of your ComfyDeploy account](https://www.comfydeploy.com/api-keys).


    ###

  version: V2
servers:
  - url: https://api.comfydeploy.com/api
    description: Production server
  - url: https://staging.api.comfydeploy.com/api
    description: Staging server
  - url: http://localhost:3011/api
    description: Local development server
security:
  - Bearer: []
paths:
  /run/{run_id}/cancel:
    post:
      tags:
        - Run
      summary: Cancel Run
      operationId: cancel_run_run__run_id__cancel_post
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````