查询视频生成任务
Endpoint
GET /v1/videos/{task_id}
Header 参数
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | No | Bearer {your_token} |
Path 参数
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
task_id | string | Yes |
响应字段
| Field | Type | Required | Title | Description |
|---|---|---|---|---|
id | string | Yes | 任务ID | |
model | string | Yes | 模型名称 | |
object | string | Yes | 任务类型 | |
prompt | string | Yes | 提示词 | |
status | string | Yes | 状态 | queued: 排队中, in_progress: 生成中, completed: 已完成, failed: 失败 |
duration | string | Yes | 任务耗时 | |
metadata | string | Yes | // | |
progress | string | Yes | 进度 | |
video_url | string | Yes | 视频URL | |
created_at | string | Yes | 创建时间 | |
thumbnail_url | string | Yes | 缩略图 |
响应示例
示例 1
{
"id": "gen_xxxxxxx",
"model": "sora2",
"object": "video.generation.job",
"prompt": "xxxxxxxxxxxxxx",
"status": "completed",
"duration": 89,
"metadata": {
"total_time": 89.550817778,
"predict_time": 89.537048777
},
"progress": 100,
"video_url": "https://xx.xxxxxx.cn/xxxx/xxxxxxxxxxxxxxxxxxxxxxxx.mp4",
"created_at": 1770405484,
"thumbnail_url": null
}