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

# 取消视频

> 在创建该任务的原平台取消视频任务。这次请求不计费。

取消进行中的任务。成功时返回任务信封，`status` 为 `cancelled`。

<ParamField path="id" type="string" required>
  公开任务 ID（`gen-...`）。
</ParamField>

<RequestExample>
  ```bash cURL theme={"dark"}
  curl -X DELETE https://api.pipellm.ai/v2/videos/gen-xxxxxxxx \
    -H "Authorization: Bearer $PIPELLM_API_KEY"
  ```

  ```python Python theme={"dark"}
  import os
  import requests

  response = requests.delete(
      "https://api.pipellm.ai/v2/videos/gen-xxxxxxxx",
      headers={"Authorization": f"Bearer {os.environ['PIPELLM_API_KEY']}"},
  )
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json theme={"dark"}
  {
    "id": "gen-xxxxxxxx",
    "object": "video",
    "model": "seedance-2-0-mini",
    "provider": "volcengine",
    "status": "cancelled",
    "created_at": 1726400000,
    "updated_at": 1726400030
  }
  ```
</ResponseExample>

任务不存在或不属于当前用户时返回 `404`。该路由不计费。

已完成的任务不能取消。只需要当前状态时，轮询 [`GET /v2/videos/{id}`](/zh/api-reference/video/get)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.