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

# Cancel a queued or running generation



## OpenAPI

````yaml /api-reference/openapi.json post /v1/generations/{id}/cancel
openapi: 3.1.0
info:
  title: Rimp API
  version: 1.0.0
  description: >-
    AI generation API across 8 modalities — image, video, voice, music, avatar,
    chat, 3D and upscale. Multi-model side-by-side comparisons, unified billing,
    one API key.
servers:
  - url: https://api.rimp.io
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/generations/{id}/cancel:
    post:
      summary: Cancel a queued or running generation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Canceled.
        '409':
          description: Generation is not in a cancelable state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````