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

# Cancel Request

> Attempt to cancel an in-queue or in-progress request. Returns the current status payload.



## OpenAPI

````yaml /openapi.json get /{ownerName}/{modelName}/requests/{requestId}/cancel
openapi: 3.1.0
info:
  title: ModelRunner Requests API
  version: 1.0.0
  description: >-
    Endpoints to create, track, retrieve, and cancel inference requests on
    ModelRunner.
servers:
  - url: https://queue.modelrunner.run
security:
  - apiKeyAuth: []
paths:
  /{ownerName}/{modelName}/requests/{requestId}/cancel:
    get:
      summary: Cancel Request
      description: >-
        Attempt to cancel an in-queue or in-progress request. Returns the
        current status payload.
      parameters:
        - $ref: '#/components/parameters/ownerName'
        - $ref: '#/components/parameters/modelName'
        - $ref: '#/components/parameters/requestId'
      responses:
        '200':
          description: Cancellation attempted; current status returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRequestResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ownerName:
      name: ownerName
      in: path
      required: true
      schema:
        type: string
        default: bytedance
      description: Model owner or organization name.
    modelName:
      name: modelName
      in: path
      required: true
      schema:
        type: string
        default: sdxl-lightning-4step
      description: Model alias on ModelRunner.
    requestId:
      name: requestId
      in: path
      required: true
      schema:
        type: string
        minLength: 21
        maxLength: 21
      description: The request identifier returned by Create Request.
  schemas:
    CreateRequestResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - IN_QUEUE
            - IN_PROGRESS
            - COMPLETED
            - FAILED
            - CANCELLED
        request_id:
          type: string
          minLength: 21
          maxLength: 21
        response_url:
          type: string
          format: uri
        status_url:
          type: string
          format: uri
        cancel_url:
          type: string
          format: uri
        logs:
          type: string
        metrics:
          type: object
          properties:
            inference_time:
              type: number
        queue_position:
          type: number
      required:
        - status
        - request_id
        - response_url
        - status_url
        - cancel_url
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        statusCode:
          type: number
        details: {}
      required:
        - error
        - message
        - statusCode
  responses:
    BadRequest:
      description: Invalid input or request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use the format: Key modelrunner_key'

````