查询视频任务
curl --request GET \
--url https://api.omnirelay.ai/api/v3/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnirelay.ai/api/v3/contents/generations/tasks/{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.omnirelay.ai/api/v3/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3f0c9a2e-6b1d-4c35-9a7e-2d8c5b1e4f60",
"model": "doubao-seedance-2-0-260128",
"status": "succeeded",
"created_at": 1791994620,
"updated_at": 1791994785,
"content": {
"video_url": "https://example.com/video.mp4"
},
"duration": 5,
"ratio": "16:9",
"resolution": "480p",
"framespersecond": 24,
"seed": 9846,
"generate_audio": true,
"usage": {
"completion_tokens": 50638,
"total_tokens": 50638
},
"cost_microusd": 1265950
}{
"error": {
"code": "unauthorized"
}
}{
"error": {
"code": "not_found"
},
"request_id": "2f6c1d0e9a"
}视频
查询视频任务
返回同一用户创建的任务。读取已完成的任务时,如尚未结算会完成结算;无论是否被读取,任务完成后都会结算。
GET
/
api
/
v3
/
contents
/
generations
/
tasks
/
{id}
查询视频任务
curl --request GET \
--url https://api.omnirelay.ai/api/v3/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnirelay.ai/api/v3/contents/generations/tasks/{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.omnirelay.ai/api/v3/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3f0c9a2e-6b1d-4c35-9a7e-2d8c5b1e4f60",
"model": "doubao-seedance-2-0-260128",
"status": "succeeded",
"created_at": 1791994620,
"updated_at": 1791994785,
"content": {
"video_url": "https://example.com/video.mp4"
},
"duration": 5,
"ratio": "16:9",
"resolution": "480p",
"framespersecond": 24,
"seed": 9846,
"generate_audio": true,
"usage": {
"completion_tokens": 50638,
"total_tokens": 50638
},
"cost_microusd": 1265950
}{
"error": {
"code": "unauthorized"
}
}{
"error": {
"code": "not_found"
},
"request_id": "2f6c1d0e9a"
}授权
在 OmniRelay 控制台创建的 API Key。所有者确认身份后可在控制台再次查看。
路径参数
创建任务时返回的任务 ID。
响应
任务当前状态。
succeeded 扣费;failed、expired 和 cancelled 不扣费。
可用选项:
queued, running, succeeded, failed, expired, cancelled Unix 秒。
Unix 秒。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
任务未生成的原因。
Show child attributes
Show child attributes
折扣后的费用(micro-USD),任务结算后返回。