视频与素材

任务列表(火山兼容)

列出当前工作区最近的 Seedance 兼容任务。

GET
/api/v3/contents/generations/tasks

概述

使用 TokenLab Bearer API 密钥列出当前组织的兼容任务。只列出通过火山兼容创建接口创建的任务。不传 filter.task_ids 时返回最近七天的任务;指定精确 ID 时直接查询这些任务。

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

列表与过滤

  • page_num:默认 1,取值为 1–500 的整数。
  • page_size:默认 20,取值为 1–500 的整数。
  • filter.status:queued、running、succeeded、failed、cancelled、expired。
  • filter.task_ids:查询多个精确任务 ID 时重复传入该参数,不要用逗号拼接。
  • filter.model:创建任务时发送的 model 值。
  • filter.service_tier:default、flex。

响应包含 items(所请求的一页)和 total(符合过滤条件的全部任务数),每项均采用查询任务接口的响应结构。不支持的参数或超出范围的值返回 400。已知任务 ID 时,用查询接口刷新状态。

示例

curl "https://api.tokenlab.sh/api/v3/contents/generations/tasks?page_num=1&page_size=20&filter.status=succeeded" \
  -H "Authorization: Bearer $TOKENLAB_API_KEY"
curl "https://api.tokenlab.sh/api/v3/contents/generations/tasks?filter.task_ids=cgt-20260102030405-a1b2c" \
  -H "Authorization: Bearer $TOKENLAB_API_KEY"
curl -X GET "https://example.com/api/v3/contents/generations/tasks"
{  "items": [    {      "id": "string",      "model": "string",      "status": "queued",      "content": {        "video_url": "http://example.com",        "last_frame_url": "http://example.com"      },      "seed": 0,      "resolution": "string",      "ratio": "string",      "duration": "string",      "frames": 0,      "framespersecond": 0,      "generate_audio": true,      "tools": {        "type": "web_search"      },      "safety_identifier": "string",      "draft": true,      "draft_task_id": "string",      "service_tier": "string",      "execution_expires_after": 0,      "usage": {        "completion_tokens": 0,        "total_tokens": 0,        "tool_usage": {          "web_search": 0        }      },      "error": {        "code": "string",        "message": "string"      },      "created_at": 0,      "updated_at": 0    }  ],  "total": 0}

授权

BearerAuth
AuthorizationBearer <token>

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

位置: header

查询参数

page_num?integer

页码。

范围1 <= value <= 500
默认值1
page_size?integer

每页条数。

范围1 <= value <= 500
默认值20
filter.status?string

按任务状态过滤。

可选值

  • "queued"
  • "running"
  • "succeeded"
  • "failed"
  • "cancelled"
  • "expired"
filter.task_ids?array<string>

精确任务 ID。重复 filter.task_ids 以指定多个 ID。

filter.model?string

按任务创建时发送的模型值进行过滤。

filter.service_tier?string

按服务层级过滤。

可选值

  • "default"
  • "flex"

响应

application/json

application/json

application/json

application/json