---
title: "Cancel or delete task"
method: DELETE
path: "/v2/video_generation/{task_id}"
tags: ["Video V2"]
---

# Cancel or delete task

`DELETE /v2/video_generation/{task_id}`

## Request

- Base URL: `https://api.minimax.io`
- URL: `https://api.minimax.io/v2/video_generation/{task_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/minimax/apis/minimax-api/docs/v2/video_generation/:task_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Cancel or delete a video generation, H3-Context-IR, or video regeneration task based on its current status:
- `queued`: cancel the task (`action=cancelled`); processing has not started yet.
- `succeeded` / `failed`: delete the task record (`action=deleted`).
- `running` / `cancelled`: not allowed, an error is returned.

## Path parameters

- `task_id` string, required

## Response `200`

- DeleteVideoGenerationV2Resp
  - `task_id` string: ID of the affected task.
  - `action` 'cancelled' | 'deleted': The action actually performed: `cancelled` (only for the queued state) or `deleted` (remove a succeeded or failed task record).
  - `status` 'cancelled' | 'deleted': Operation result: `cancelled` or `deleted`.

## Other responses

- `400`: Invalid parameters
- `401`: Authentication failed
- `429`: Rate limit triggered
- `500`: Server error

---

[API](https://skmtc.dev/minimax/apis/minimax-api.md) - [All operations](https://skmtc.dev/minimax/apis/minimax-api/llms.txt) - [OpenAPI document](https://skmtc.dev/minimax/apis/minimax-api/revisions/81353c47e0e6?raw)
