获取 Seedance 视频
通过 GET /v1/videos/ 在 CometAPI 上按 id 轮询 Seedance 视频任务。适用于 Seedance 1.0 Pro、1.5 Pro 和 2.0 任务。返回当前状态、进度,以及任务达到 completed 后的已签名 video_url。
id 是创建调用返回的值,与生成该任务的是哪个 Seedance 模型无关。
响应体就是视频任务对象本身。在顶层读取 status、progress 和 video_url。
状态机
API 返回小写的状态字符串。queued 和 in_progress 为非终态;completed、failed 和 error 为终态,任务不会再继续变化。
轮询频率
每 10 到 20 秒轮询一次。大多数任务会在 1 到 3 分钟内完成,具体取决于模型、时长和尺寸。需要关注的字段
status— 决定轮询循环何时停止。progress— 0 到 100 的整数,可在 UI 中展示。video_url— 已签名的下载 URL,在completed响应中出现。Seedance 下载直接使用此 URL,而不是单独的/v1/videos/{id}/content路由。签名有时间限制;请在签名过期前下载文件或将其重新托管。completed_at— 平台返回的可选 Unix 时间戳。不要用它来停止轮询;应使用status。model— 回显创建任务时使用的 Seedance model id。
常见错误
- HTTP
400且message: "task_not_exist"表示id未知。请确认你保存的是成功 POST/v1/videos响应中的id,并且按原样使用它。 - HTTP
401表示 bearer token 缺失或无效。请检查请求头是否为Authorization: Bearer $COMETAPI_KEY。
授权
Bearer token authentication. Use your CometAPI key.
路径参数
Task id returned by POST /v1/videos.
响应
Current Seedance video task state.
Task id.
Object type, always video.
Model id that generated the task.
Task status. queued and in_progress are non-terminal. completed, failed, and error are terminal.
queued, in_progress, completed, failed, error Completion percentage.
0 <= x <= 100Task creation time as a Unix timestamp in seconds.
Signed download URL for the finished video. Present on completed responses. Seedance downloads use this URL directly instead of a separate /v1/videos/{id}/content route. The signature is time-limited, so download or re-upload the file to your own storage soon after you receive it.
Optional Unix timestamp returned by the platform. Use status, not this field, to decide when polling can stop.