跳轉到主要內容
GET
/
volc
/
v3
/
contents
/
generations
/
tasks
/
{id}
Query a ByteDance video task
curl --request GET \
  --url https://api.cometapi.com/volc/v3/contents/generations/tasks/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "021773297205999example",
  "model": "doubao-seedance-1-5-pro-251215",
  "status": "succeeded",
  "content": {
    "video_url": "https://example.com/generated.mp4"
  },
  "created_at": 1773297205,
  "updated_at": 1773297260,
  "resolution": "720p",
  "duration": 5,
  "ratio": "16:9",
  "framespersecond": 24
}
在你建立 ByteDance Jimeng 任務後,使用此端點。它不會啟動渲染,只會回報目前的任務狀態,並在作業完成時提供生成的影片 URL 與輸出中繼資料。

關注這些欄位

  • status:目前的提供者狀態
  • content.video_url:渲染完成時會出現
  • 如果你的應用程式需要輸出中繼資料,請查看 resolutiondurationratioframespersecond

輪詢迴圈

1

先建立任務

先從 ByteDance 影片生成 開始。
2

依 task id 輪詢

持續呼叫此端點,直到狀態進入終態。
3

保存結果

content.video_url 出現時,如果你需要長期保留,請將結果複製到你自己的儲存空間。

結果 URL

ByteDance 的工作流程仍然是先建立,再透過 task id 查詢。CometAPI 保留了這個結構,並統一了驗證方式。請將回傳的影片 URL 視為交付用 URL,而不是永久儲存位置。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

路徑參數

id
string
必填

Task id returned by the create endpoint.

回應

200 - application/json

Current task state.

id
string
必填
model
string
必填
status
string
必填

Provider task status.

created_at
integer
必填
updated_at
integer
必填
content
object
usage
object
seed
integer
resolution
string
duration
integer
ratio
string
framespersecond
integer