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

# Cancel or Delete Task

> Cancel queued tasks based on current task status, or delete successful and failed video generation, H3-Context-IR, and video regeneration task records.

This API automatically performs cancellation or deletion based on the task's current status. Behavior:

| Task Status | Action | Description |
| --- | --- | --- |
| queued | cancelled | Cancel the task; the task has not started processing, no charges apply |
| succeeded | deleted | Delete the task record |
| failed | deleted | Delete the task record |
| running | — | Operation not allowed; returns an error (cannot cancel while processing) |
| cancelled | — | Operation not allowed; returns an error |



## OpenAPI

````yaml api-reference/en/zmodelVideo/minimax/minimax-h3/delete-video.json DELETE /minimax/v2/video_generation
openapi: 3.0.1
info:
  title: MiniMax API
  description: Create a video generation task.
  version: 1.0.0
servers:
  - url: https://baze-api.powerbuyin.top
security: []
paths:
  /minimax/v2/video_generation:
    delete:
      summary: Video Generation
      description: >-
        Cancel queued tasks based on current task status, or delete successful
        and failed video generation, H3-Context-IR, and video regeneration task
        records.


        This API automatically performs cancellation or deletion based on the
        task's current status. Behavior:


        | Task Status | Action | Description |

        | --- | --- | --- |

        | queued | cancelled | Cancel the task; the task has not started
        processing, no charges apply |

        | succeeded | deleted | Delete the task record |

        | failed | deleted | Delete the task record |

        | running | — | Operation not allowed; returns an error (cannot cancel
        while processing) |

        | cancelled | — | Operation not allowed; returns an error |
      operationId: videoGeneration
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: The task ID to cancel or delete.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResp'
              example:
                output:
                  task_id: '424010985738629'
                  action: cancelled
                  status: cancelled
      security:
        - bearerAuth: []
components:
  schemas:
    VideoGenerationResp:
      type: object
      properties:
        task_id:
          type: string
          description: The task ID that was operated on.
        action:
          type: string
          description: >-
            The actual operation performed: cancelled (cancel, only for queued
            status) or deleted (delete successful or failed task records).
          enum:
            - cancelled
            - deleted
        status:
          type: string
          description: >-
            The operation result status: cancelled (cancelled) or deleted
            (record deleted).
          enum:
            - cancelled
            - deleted
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````