获取视频生成任务状态
curl --request GET \
--url https://api.getinfinityblue.com/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getinfinityblue.com/v1/video/generations/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getinfinityblue.com/v1/video/generations/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"task_id": "abcd1234efgh",
"status": "in_progress"
}通用视频接口
获取视频生成任务状态
轮询通用视频生成任务,获取进度和最终视频 URL
GET
/
v1
/
video
/
generations
/
{task_id}
获取视频生成任务状态
curl --request GET \
--url https://api.getinfinityblue.com/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getinfinityblue.com/v1/video/generations/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getinfinityblue.com/v1/video/generations/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"task_id": "abcd1234efgh",
"status": "in_progress"
}任务状态说明
| 状态 | 含义 |
|---|---|
queued | 排队等待处理 |
in_progress | 生成中 |
completed | 已完成,可从 url 字段获取视频 |
failed | 生成失败,查看 error 字段了解原因 |
轮询建议
任务通常在 30 秒至数分钟内完成,具体取决于模型和时长。 建议每 5–10 秒轮询一次,并设置合理超时时间(如 10 分钟)。授权
路径参数
任务 ID,由创建接口返回。
响应
成功获取任务状态
通用视频生成任务状态响应。
任务 ID。
示例:
"abcd1234efgh"
任务状态。
可用选项:
queued, in_progress, completed, failed 示例:
"completed"
视频文件 URL,任务 completed 时返回。
示例:
"https://example.com/generated-video.mp4"
视频格式。
示例:
"mp4"
视频生成任务元数据,包含实际生成的视频规格信息。
Show child attributes
Show child attributes
视频任务错误信息。
Show child attributes
Show child attributes