查询视频任务
curl --request GET \
--url https://api.omnimux.ai/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnimux.ai/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.omnimux.ai/v1/video/generations/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omnimux.ai/v1/video/generations/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}任务管理
查询视频任务
GET /v1/video/generations/ · 轮询视频生成任务
GET
/
v1
/
video
/
generations
/
{task_id}
查询视频任务
curl --request GET \
--url https://api.omnimux.ai/v1/video/generations/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnimux.ai/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.omnimux.ai/v1/video/generations/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.omnimux.ai/v1/video/generations/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
- 用于
POST /v1/video/generations返回的task_id,包括账号级effective_video中暴露的原生video_generations变体- 通过
POST /v1/videos创建的任务请改用GET /v1/videos/{task_id};/content下载是独立接口- 插件型(type 65)视频模型仍创建走
POST /v1/videos,轮询走GET /v1/videos/{task_id}- 已受理任务保留受理时的协议;即使目录或分组规则后续变化,也按该协议对应的查询入口轮询
- 鉴权:
Authorization: Bearer sk-...
按协议使用查询入口
账号级视频分组能力请读取所选变体的gateway_protocol(缺省时继承模型级 contract.gateway_protocol):
| 协议 | 查询 |
|---|---|
video_generations | GET /v1/video/generations/{task_id} |
openai_video | GET /v1/videos/{task_id} |
openai_video 受理的任务不能用 /v1/video/generations/{task_id} 轮询,反之亦然。若模型默认协议为 openai_video,但显式选择的分组暴露了原生 video_generations 变体,创建时使用 POST /v1/video/generations 并携带 X-OmniMux-Video-Protocol: video_generations,随后用 GET /v1/video/generations/{task_id} 轮询。
路径参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_id | string | 是 | 创建任务响应中的 id |
响应(摘要)
| 字段 | 说明 |
|---|---|
status | 如 queued / in_progress / completed / failed(以线上为准) |
task_id / id | 任务标识 |
| 结果字段 | 完成后可能含产物 URL 等,结构因模型而异 |
https://api.omnimux.ai
更多错误语义见 连接与使用 与 成本优化(402)。