跳转到主要内容
GET
/
v1
/
video
/
{video_id}
Get video details
curl --request GET \
  --url https://wisdom-gate.juheapi.com/v1/video/{video_id} \
  --header 'Authorization: Bearer <token>'
{
"id": "video_68f88d1e44988190b2614f6604afd3b80fb3f07d5e600d05",
"object": "video",
"status": "queued",
"created_at": 1759938772,
"completed_at": null,
"expires_at": null,
"error": null,
"model": "sora-2",
"progress": 0,
"remixed_from_video_id": null,
"seconds": "4",
"size": "720x1280"
}

概述

/v1/video/{video_id} 端点允许您获取 Sora 视频生成任务的详细状态和元数据信息。这是跟踪视频生成进度和获取处理完成后视频详情的主要端点。 使用此端点监控视频生成状态、检查进度,并获取视频尺寸、时长、创建时间和过期时间等元数据。
使用此端点前,您必须先使用 创建视频 端点生成视频以获取视频 ID。

重要说明

轮询策略视频生成是异步的,可能需要几分钟。实现轮询机制定期检查状态(例如每 10-30 秒),直到状态变为 completedfailed
资源过期生成的视频有过期时间。检查 expires_at 字段,并在生成完成后及时使用 内容端点 下载视频。

自动生成的文档请求参数和响应格式从 OpenAPI 规范自动生成。向下滚动查看交互式 API 参考。

快速开始

基础示例:检查视频状态

curl -X GET "https://wisdom-gate.juheapi.com/v1/video/video_68f88d1e44988190b2614f6604afd3b80fb3f07d5e600d05" \
  -H "Authorization: Bearer $WISDOM_GATE_KEY"

响应字段

状态值

status 字段表示视频生成的当前状态:
状态描述
queued视频已排队等待处理
processing视频正在生成中
completed视频生成已成功完成
failed视频生成失败(查看 error 字段)

关键字段

  • id:视频的唯一标识符
  • status:当前生成状态
  • progress:生成进度百分比(0-100)
  • created_at:请求创建的 Unix 时间戳
  • completed_at:生成完成的 Unix 时间戳
  • expires_at:视频过期的 Unix 时间戳(请及时下载!)
  • error:生成失败时的错误信息
  • model:用于生成的模型
  • seconds:视频时长(秒)
  • size:视频分辨率

常见问题

应该多久轮询一次状态?

建议每 10-30 秒轮询一次。更频繁的轮询是不必要的,可能会触发速率限制。

状态为 “completed” 后应该做什么?

状态变为 completed 后,您可以使用 内容端点 下载视频。

视频可用多长时间?

查看 expires_at 字段了解视频过期时间。请在生成完成后及时下载视频。过期后无法检索视频。

授权

Authorization
string
header
必填

Bearer token authentication. Include your API key in the Authorization header as 'Bearer YOUR_API_KEY'

路径参数

video_id
string
必填

The unique identifier of the video generation request

响应

Video details retrieved successfully

Detailed status and metadata information for a Sora video generation task. Use this to monitor video generation progress and obtain video details once processing is complete.

id
string
必填

The identifier of the video

示例:

"video_68f88d1e44988190b2614f6604afd3b80fb3f07d5e600d05"

object
string
必填

Object type, always 'video'

示例:

"video"

status
enum<string>
必填

Current status of the video generation. Use this to track progress.

可用选项:
queued,
processing,
completed,
failed
示例:

"processing"

created_at
integer
必填

Unix timestamp (in seconds) when the request was created

示例:

1759938772

completed_at
integer
必填

Unix timestamp (in seconds) when the video generation completed. Null if not yet completed.

示例:

1759942372

expires_at
integer
必填

Unix timestamp (in seconds) when the video will expire. Download promptly to avoid expiration.

示例:

1759945972

error
object
必填

Error information if generation failed. Null if no error.

model
string
必填

Model used for generation

progress
integer
必填

Generation progress percentage (0-100)

必填范围: 0 <= x <= 100
remixed_from_video_id
string
必填

ID of the video this was remixed from, if applicable

seconds
string
必填

Video duration in seconds

size
string
必填

Video resolution (width x height)