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

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

> Seedance 2.0 New DELETE /api/v3/contents/generations/tasks/{id}

## 简介

取消或删除视频生成任务。`DELETE` 的行为取决于任务当前状态。

## 认证

<ParamField header="Authorization" type="string" required>
  Bearer Token，如 `Bearer sk-your_token_key`
</ParamField>

## 路径参数

<ParamField path="id" type="string" required>
  任务 `id`
</ParamField>

## 行为说明

| 任务状态        | 能否删除   | 效果                     | 删除后状态       |
| ----------- | ------ | ---------------------- | ----------- |
| `queued`    | 能      | 从队列移除，状态改为 `cancelled` | `cancelled` |
| `running`   | **不能** | 拒绝                     | —           |
| `succeeded` | 能      | 任务记录被删除，之后查不到          | —           |
| `failed`    | 能      | 同上                     | —           |
| `cancelled` | **不能** | 拒绝                     | —           |
| `expired`   | 能      | 同上                     | —           |

成功时响应体为空（`{}`），失败时返回相应的错误状态码和错误体。

## 请求示例

```bash theme={null}
curl -X DELETE https://api.gravitex.ai/api/v3/contents/generations/tasks/cgt-20260708094649-mxfjc \
  -H "Authorization: Bearer sk-your_token_key"
```
