视频与素材

取消任务(火山兼容)

在任务仍可取消时取消 Seedance 兼容任务。

DELETE
/api/v3/contents/generations/tasks/{id}

概述

只有任务仍为 queued 时才能取消成功。DELETE 成功时返回 HTTP 200,响应体为空。请随后查询该任务确认最终状态。

另见 Seedance 2.0 视频模型和视频生成。

取消语义

  • 只有任务处于 queued 时请求才会成功。
  • 如果任务已经 running,或已完成、失败、过期,接口返回 409,错误码为 task_not_cancellable;请查询任务确认其当前状态。
  • 已取消的任务状态为 cancelled,不会返回视频结果。
  • 任务 ID 不存在时返回 404。

示例

curl -X DELETE https://api.tokenlab.sh/api/v3/contents/generations/tasks/cgt-20260102030405-a1b2c \
  -H "Authorization: Bearer $TOKENLAB_API_KEY"
curl -X DELETE "https://example.com/api/v3/contents/generations/tasks/string"
空

授权

BearerAuth
AuthorizationBearer <token>

API Key 身份验证。在 Dashboard > API > API Keys 中创建或管理 API Key。

位置: header

路径参数

id*string

创建端点返回的兼容性任务 ID。ID 以 cgt- 开头。

响应

application/json

application/json

application/json

application/json

application/json

application/json