跳转到主要内容
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

先创建或混剪视频

先从 创建视频混剪视频 开始。
2

按 id 轮询

将返回的 id 传入此处,并持续检查,直到任务状态变为 completedfailed
3

下载文件

当任务状态为 completed 时,继续前往 获取视频内容

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