Sử dụng CometAPI GET /v1/videos/ để truy xuất trạng thái, tiến độ và metadata của video Sora 2 như thời lượng, kích thước, dấu thời gian và thời điểm hết hạn.
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
}status cho trạng thái vòng đờiprogress cho tín hiệu tiến độ ở mức tổng quáterror khi nhà cung cấp từ chối hoặc job bị lỗiexpires_at sau khi hoàn tất nếu bạn cần biết khi nào các tài nguyên tạm thời hết hạnTạo hoặc remix video trước
Poll theo id
id được trả về vào đây và tiếp tục kiểm tra cho đến khi job đạt completed hoặc failed.Tải tệp xuống
completed, chuyển sang Retrieve Video Content.Bearer token authentication. Use your CometAPI key.
Video id returned by the create or remix endpoint.
Current job state.
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
}