sora-2
擷取 Sora 2 影片
使用 CometAPI GET /v1/videos/ 擷取 Sora 2 影片狀態、進度,以及持續時間、尺寸、時間戳記與到期時間等中繼資料。
GET
在你啟動 Sora 工作後使用此端點。它會回報目前的工作狀態、已設定的尺寸與持續時間,以及提供者回傳的任何錯誤。
留意這些欄位
status用於表示生命週期狀態progress用於提供粗略的進度訊號- 當提供者拒絕或執行工作失敗時,查看
error - 如果你需要知道暫存資產何時到期,請在完成後查看
expires_at
輪詢直到完成
1
先建立影片
從 Create Video 開始。
2
依 id 輪詢
將回傳的
id 傳入此處,並持續檢查直到工作狀態變為 completed 或 failed。3
下載檔案
當工作為
completed 時,前往 Retrieve Video Content。CometAPI 上的回應結構
這個步驟與 Sora 的輪詢工作流程高度一致。CometAPI 保留 OpenAI 風格的物件結構,讓你只需極少轉換即可串接狀態檢查。授權
Bearer token authentication. Use your CometAPI key.
路徑參數
Video id returned by the create or remix endpoint.
回應
200 - application/json
Current job state.
Task id.
Task state: queued, in_progress, completed, or failed.
Render progress from 0 to 100.
Unix timestamp of task creation.
Unix timestamp of completion.
Time-limited download URL present when status is completed. Mirror the file to your own storage for long retention.