# 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 | - |

## 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
