# 取消或删除视频生成任务

根据任务当前状态执行不同操作：

| 当前状态 | 操作 | 操作后状态 |
|---|---|---|
| `queued` | 取消排队，退还冻结金额 | `cancelled` |
| `succeeded` | 删除任务记录 | - |
| `failed` | 删除任务记录 | - |
| `expired` | 删除任务记录 | - |
| `running` | 不支持 | - |
| `cancelled` | 不支持 | - |

## DELETE /v1/videos/generations/{taskId}

> Cancel or delete video generation task

Performs different operations based on the current task status:

| Current Status | Action | Resulting Status |
|---|---|---|
| `queued` | Cancel queue, refund frozen amount | `cancelled` |
| `succeeded` | Delete task record | - |
| `failed` | Delete task record | - |
| `expired` | Delete task record | - |
| `running` | Not supported | - |
| `cancelled` | Not supported | - |

### Authentication

`Authorization: Bearer tr-xxx`

### Path Parameters

- **taskId** `string` **(required)**  
  

### Response

HTTP 204 No Content

### Error Codes

- `400`: 
- `401`: 
- `404`: Task not found or does not belong to the current user
