国产视频模型查询
curl --request GET \
--url https://www.geeknow.top/v1/videos/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.geeknow.top/v1/videos/{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://www.geeknow.top/v1/videos/{task_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://www.geeknow.top/v1/videos/{task_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://www.geeknow.top/v1/videos/{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))
}HttpResponse<String> response = Unirest.get("https://www.geeknow.top/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.geeknow.top/v1/videos/{task_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": "<string>",
"object": "<string>",
"model": "<string>",
"status": "<string>",
"progress": 123,
"created_at": 123,
"completed_at": 123,
"expires_at": 123,
"seconds": "<string>",
"size": "<string>",
"video_url": "<string>",
"metadata": {},
"error": {}
}国产视频模型
国产视频模型查询
使用 GET /v1/videos/{task_id} 查询国产视频任务状态、进度、错误和视频结果。
GET
https://www.geeknow.top
/
v1
/
videos
/
{task_id}
国产视频模型查询
curl --request GET \
--url https://www.geeknow.top/v1/videos/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.geeknow.top/v1/videos/{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://www.geeknow.top/v1/videos/{task_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://www.geeknow.top/v1/videos/{task_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://www.geeknow.top/v1/videos/{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))
}HttpResponse<String> response = Unirest.get("https://www.geeknow.top/v1/videos/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.geeknow.top/v1/videos/{task_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": "<string>",
"object": "<string>",
"model": "<string>",
"status": "<string>",
"progress": 123,
"created_at": 123,
"completed_at": 123,
"expires_at": 123,
"seconds": "<string>",
"size": "<string>",
"video_url": "<string>",
"metadata": {},
"error": {}
}国产视频模型查询
提交任务后,使用任务 ID 轮询查询。国产视频模型查询接口会返回统一的视频任务状态、进度、错误信息和结果地址。查询任务
GET /v1/videos/{task_id}
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/v1/videos/{task_id}"
获取视频内容
GET /v1/videos/{task_id}/content
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/v1/videos/{task_id}/content"
状态映射
| 任务阶段 | status | 说明 |
|---|---|---|
WAITING | queued | 任务排队中 |
PROCESSING | processing | 任务生成中 |
FINISH | completed | 任务完成 |
ABORTED | failed / cancelled | 任务失败或被中止 |
progress 表示任务进度;失败时可从 error.code 和 error.message 查看错误原因。任务完成后,video_url 会返回生成结果地址。
响应字段
string
任务 ID。通常与提交接口返回的
task_id 一致。string
对象类型,固定为
video。string
请求时使用的模型名称,可能是基础模型,也可能是组合计费模型。
string
任务状态,常见值为
queued、processing、completed、failed、cancelled。integer
任务进度百分比。进度不可用时可能为空或为默认值。
integer
创建时间戳。
integer
完成时间戳。任务未完成时可能为空。
integer
结果过期时间戳。是否返回取决于任务配置和存储方式。
string
输出视频时长。
string
输出尺寸或分辨率描述。
string
生成完成后的视频地址。
object
附加信息。完成后通常会包含结果 URL 等便于前端或转存流程使用的信息。
object
错误信息。任务失败时通常会包含错误码和错误消息。
成功响应示例
{
"id": "video_abc123",
"object": "video",
"model": "Kling-3.0-Omni",
"status": "completed",
"progress": 100,
"created_at": 1760000000,
"completed_at": 1760000060,
"video_url": "https://example.com/output.mp4",
"metadata": {
"url": "https://example.com/output.mp4"
}
}
失败响应示例
{
"id": "video_abc123",
"object": "video",
"model": "Kling-3.0-Omni",
"status": "failed",
"error": {
"code": "InvalidParameter",
"message": "videoUrl must not be blank"
}
}
排查建议
- 如果动作控制任务失败并提示
videoUrl must not be blank,确认metadata.video_url或metadata.file_infos中是否提供了Category=Video的视频参考。 - 如果任务完成但没有
video_url,确认任务结果文件地址是否已生成并可访问。 - 如果比例或分辨率不符合预期,生成时显式传
metadata.output_config.resolution和metadata.output_config.aspect_ratio。 - 如果对口型计费时长和请求时长不一致,检查是否命中
scene_type=lip_sync不足 5 秒按 5 秒计的规则。