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

# Cancel or delete a video generation task

> Cancel a queued task or delete a terminal task where the selected provider
supports the operation. This changes remote and local task state and releases
any applicable wallet hold.




## OpenAPI

````yaml /openapi/gengen-v1.yaml delete /contents/generations/tasks/{id}
openapi: 3.1.0
info:
  title: GENGEN API
  version: 1.0.0
  description: |
    The public GENGEN v1 API. New integrations should use normalized camelCase
    request fields and read generated media from the standard `outputs` object.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Video generation tasks
    description: Create, inspect, list, and cancel asynchronous video generation tasks.
  - name: Text generation
    description: Create OpenAI-compatible chat completions, including streamed responses.
  - name: Image generation
    description: Generate images synchronously with normalized GENGEN request fields.
  - name: Video understanding
    description: Analyze video content through the BytePlus Responses API surface.
  - name: Files
    description: Authorize direct uploads for image, video, and audio inputs.
paths:
  /contents/generations/tasks/{id}:
    parameters:
      - $ref: '#/components/parameters/VideoTaskId'
    delete:
      tags:
        - Video generation tasks
      summary: Cancel or delete a video generation task
      description: >
        Cancel a queued task or delete a terminal task where the selected
        provider

        supports the operation. This changes remote and local task state and
        releases

        any applicable wallet hold.
      operationId: deleteVideoGenerationTask
      responses:
        '204':
          description: The task was cancelled or deleted. The response has no body.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: The task does not exist in the current workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: The selected provider does not support cancellation or deletion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error_code: provider.operation_not_supported
                error: This provider does not support deleting tasks
        default:
          $ref: '#/components/responses/UnexpectedError'
components:
  parameters:
    VideoTaskId:
      name: id
      in: path
      required: true
      description: >
        The public task ID returned by the create endpoint. URL-encode the ID
        when

        placing it in the path, including any colon in the provider prefix.
      schema:
        type: string
      example: seedance20:cgt-20260419-abcdef1234567890
  responses:
    BadRequest:
      description: The request body, path, or query parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error_code: gengen.model_required
            error_params:
              field: model
            error: A model is required
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error_code: gengen.auth_required
            error: Missing Authorization bearer token
    Forbidden:
      description: The API key is revoked, expired, or not authorized for the operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error_code: gengen.api_key_revoked
            error: GENGEN API key has been revoked
    UnexpectedError:
      description: GENGEN or an upstream provider could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error_code
      properties:
        error_code:
          type: string
          description: Stable machine-readable error code.
        error_params:
          type: object
          description: Optional structured error context.
          additionalProperties: true
        error:
          type: string
          description: Optional human-readable message.
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: GENGEN API key
      description: A workspace API key beginning with `gengen_live_`.

````