Seedance 2.0
当 token168 部署启用桥接时,使用 Seedance 2.0 原生任务 API 创建、获取和列出任务。
创建 Seedance 2.0 原生任务。路由使用 token168 API Key 认证,选择已启用且支持 Seedance 的渠道,然后存储用于轮询的公开任务 ID。
这是 Seedance 2.0 的最小首帧示例:文本和 image_url 项放在顶层 content。先通过 GET /v1/models 确认模型 ID,并替换示例图片 URL;具体参数限制见下表。
Seedance 2.0 的首帧和首尾帧模式使用固定比例时,当前分组需要有兼容渠道。设 ratio 为 adaptive 可跟随首帧。Seedance 2.5 的这两种模式要求 adaptive。提交被拒时,查看 error.message 了解具体原因。
POST /api/v3/contents/generations/taskscurl https://www.token168.cc/api/v3/contents/generations/tasks \
-H "Authorization: Bearer $TOKEN168_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dreamina-seedance-2-0-260128",
"content": [
{"type": "text", "text": "A futuristic tech city, but with a strange, surreal quality. People are more open and free, focused on developing themselves. The city blends pristine natural ecosystems with modern technology. Residential areas are highly ecological, green development is advanced, all power comes from green electricity, and controlled nuclear fusion, space elevators, and extremely deep underground spaces have already been achieved."},
{"type": "image_url", "image_url": {"url": "https://example.com/reference.png"}, "role": "first_frame"}
],
"duration": 4,
"resolution": "480p",
"ratio": "adaptive",
"generate_audio": false,
"watermark": false
}'字段边界
| 字段 | 行为 | 错误 |
|---|---|---|
| callback_url | 不支持 | OperationDenied.CallbackNotSupported |
| service_tier | 只接受省略该字段或使用 default | InvalidParameter.Unsupported |
| duration | 可接受的值为 -1 或 4 到 15 | InvalidParameter.InvalidValue |
| frames | Seedance 2.0 不支持此字段 | InvalidParameter.Unsupported |
| seed | Seedance 2.0 不支持此字段 | InvalidParameter.Unsupported |
| camera_fixed | Seedance 2.0 不支持此字段 | InvalidParameter.Unsupported |
| DELETE | 不支持 DELETE 和取消操作,且不得暗示退款或状态变更 | 不支持的方法 |
通过素材 URL 生成视频
希望直接传入 HTTPS URL 并自动准备素材时,可使用独立的 URL 视频入口。账号仍须有启用素材 Key,原生接口及手动素材流程继续可用。
获取当前令牌用户的一条 Seedance 原生任务。API 会在可用时返回原生状态、时间戳、请求元数据、视频 URL 和用量。
使用创建时返回的任务 ID 轮询原生查询接口;只有 status 为 succeeded 时才下载 content.video_url。返回任务 ID 不代表视频已生成完成。
GET /api/v3/contents/generations/tasks/{id}curl https://www.token168.cc/api/v3/contents/generations/tasks/task_123 \
-H "Authorization: Bearer $TOKEN168_API_KEY"列出当前令牌用户最近的 Seedance 原生任务。支持的查询参数包括 page_num、page_size、filter.task_ids、filter.model、filter.status 和 filter.service_tier。
GET /api/v3/contents/generations/taskscurl "https://www.token168.cc/api/v3/contents/generations/tasks?page_num=1&page_size=10&filter.model=doubao-seedance-2-0-260128&filter.status=succeeded&filter.task_ids=task_123&filter.service_tier=default" \
-H "Authorization: Bearer $TOKEN168_API_KEY"