取得 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.