查询视频任务
curl --request GET \
--url https://xuwuai.com/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://xuwuai.com/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://xuwuai.com/v1/videos/{video_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://xuwuai.com/v1/videos/{video_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://xuwuai.com/v1/videos/{video_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))
}HttpResponse<String> response = Unirest.get("https://xuwuai.com/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://xuwuai.com/v1/videos/{video_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "video_abc123",
"object": "video",
"status": "in_progress",
"model": "veo-3.1-fast-generate-preview",
"progress": 45
}视频生成
查询视频(OpenAI 风格)
使用 GET /v1/videos/ 查询视频任务进度与元数据。
GET
/
v1
/
videos
/
{video_id}
查询视频任务
curl --request GET \
--url https://xuwuai.com/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://xuwuai.com/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://xuwuai.com/v1/videos/{video_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://xuwuai.com/v1/videos/{video_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://xuwuai.com/v1/videos/{video_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))
}HttpResponse<String> response = Unirest.get("https://xuwuai.com/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://xuwuai.com/v1/videos/{video_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "video_abc123",
"object": "video",
"status": "in_progress",
"model": "veo-3.1-fast-generate-preview",
"progress": 45
}本页提供标准 OpenAI 风格的查询接口调试面板与示例,仅需携带 Bearer Token。
响应字段包含:
认证
Authorization: Bearer <Token>
export BASE_URL="https://xuwuai.com"
export TOKEN="oh-xxxxxxxxxxxxxxxx"
export VIDEO_ID="video_xxx" # 创建任务后返回的 id
cURL 示例
curl "https://xuwuai.com/v1/videos/$VIDEO_ID" \
-H "Authorization: Bearer $TOKEN"
status:queued/in_progress/completed/failedprogress:0–100(若上游未提供,可能为 0)video_url或result.video_url:完成后返回的直链(已由网关代理)
若需要在计费端明确时长,可在查询时追加
?duration=6 指定秒数。Authorizations
API Key
Path Parameters
视频任务 ID
Response
查询成功
任务 ID
Example:
"video_abc123"
Available options:
video Example:
"video"
创建时间戳
Example:
1761234567
完成时间戳
任务状态
Available options:
queued, in_progress, completed, failed Example:
"queued"
模型名称
Example:
"veo-3.1-fast-generate-preview"
提示词
进度(0-100)
Example:
0
视频时长
Example:
6
分辨率
Example:
"1280x720"
视频直链(完成后返回)
Show child attributes
Show child attributes