跳轉到主要內容
GET
/
v1
/
videos
/
{video_id}
Retrieve a Sora video job
curl --request GET \
  --url https://api.cometapi.com/v1/videos/{video_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "video_69b25d5f467c81908733a56bc236b4df",
  "size": "1280x720",
  "error": null,
  "model": "sora-2",
  "object": "video",
  "prompt": "A paper airplane glides across a desk.",
  "status": "in_progress",
  "seconds": "4",
  "progress": 0,
  "created_at": 1773296991,
  "expires_at": null,
  "completed_at": null,
  "remixed_from_video_id": null
}
在你啟動 Sora 任務後,請使用此端點。它會回報目前的任務狀態、已設定的尺寸與時長,以及供應商回傳的任何錯誤。

關注這些欄位

  • status 用於表示生命週期狀態
  • progress 用於提供粗略的進度訊號
  • 當供應商拒絕任務或任務失敗時,查看 error
  • 如果你需要知道暫時性資產何時到期,請在完成後查看 expires_at

輪詢直到完成

1

先建立或重混影片

先從 Create VideoRemix Video 開始。
2

依 id 輪詢

將回傳的 id 傳入這裡,並持續檢查,直到任務狀態變成 completedfailed
3

下載檔案

當任務為 completed 時,前往 Retrieve Video Content

CometAPI 上的回應結構

此步驟與 Sora 的輪詢工作流程高度一致。CometAPI 保留 OpenAI 風格的物件結構,因此你可以幾乎不需額外轉換就完成狀態檢查。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

路徑參數

video_id
string
必填

Video id returned by the create or remix endpoint.

回應

200 - application/json

Current job state.

id
string
必填
size
string
必填
model
string
必填
object
string
必填
status
string
必填
seconds
string
必填
progress
integer
必填
created_at
integer
必填
error
object
prompt
string
expires_at
integer | null
completed_at
integer | null
remixed_from_video_id
string | null