curl -X GET https://www.geeknow.top/v1/videos/task_01jz8s3dbke8p9vq2m8r9a7gk4 \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
task_id = "task_01jz8s3dbke8p9vq2m8r9a7gk4"
resp = requests.get(
f"https://www.geeknow.top/v1/videos/{task_id}",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(resp.json())
const taskId = "task_01jz8s3dbke8p9vq2m8r9a7gk4";
const response = await fetch(`https://www.geeknow.top/v1/videos/${taskId}`, {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
console.log(await response.json());
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "in_progress"
}
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "completed",
"video_url": "https://example.com/results/manxue-video.mp4",
"actualDuration": 8,
"totalTokens": 1200
}
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "failed",
"error": "task failed"
}
{
"error": {
"message": "Task not found",
"type": "invalid_request_error"
}
}
特惠渠道系列
manxue-2.0 查询视频任务
使用 GET /v1/videos/{id} 查询 manxue-2.0 视频任务状态。
GET
https://www.geeknow.top
/
v1
/
videos
/
{id}
curl -X GET https://www.geeknow.top/v1/videos/task_01jz8s3dbke8p9vq2m8r9a7gk4 \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
task_id = "task_01jz8s3dbke8p9vq2m8r9a7gk4"
resp = requests.get(
f"https://www.geeknow.top/v1/videos/{task_id}",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(resp.json())
const taskId = "task_01jz8s3dbke8p9vq2m8r9a7gk4";
const response = await fetch(`https://www.geeknow.top/v1/videos/${taskId}`, {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
console.log(await response.json());
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "in_progress"
}
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "completed",
"video_url": "https://example.com/results/manxue-video.mp4",
"actualDuration": 8,
"totalTokens": 1200
}
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "failed",
"error": "task failed"
}
{
"error": {
"message": "Task not found",
"type": "invalid_request_error"
}
}
manxue-2.0 查询视频任务
这个接口用于查询manxue-2.0 异步视频任务状态。创建任务接口返回 id 后,可通过该接口轮询状态并读取结果地址。
- 根据创建任务返回的
id查询。 - 任务完成后读取
video_url。 - 任务失败时读取
error。 - 常见状态为
queued、in_progress、completed、failed。
方法与路径
GET /v1/videos/{id}
curl -X GET https://www.geeknow.top/v1/videos/task_01jz8s3dbke8p9vq2m8r9a7gk4 \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
task_id = "task_01jz8s3dbke8p9vq2m8r9a7gk4"
resp = requests.get(
f"https://www.geeknow.top/v1/videos/{task_id}",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(resp.json())
const taskId = "task_01jz8s3dbke8p9vq2m8r9a7gk4";
const response = await fetch(`https://www.geeknow.top/v1/videos/${taskId}`, {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
console.log(await response.json());
响应示例
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "in_progress"
}
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "completed",
"video_url": "https://example.com/results/manxue-video.mp4",
"actualDuration": 8,
"totalTokens": 1200
}
{
"id": "task_01jz8s3dbke8p9vq2m8r9a7gk4",
"object": "video",
"created": 1790557800,
"model": "manxue-2.0",
"status": "failed",
"error": "task failed"
}
{
"error": {
"message": "Task not found",
"type": "invalid_request_error"
}
}
认证
Authorization: Bearer YOUR_API_KEY
Path Parameters
string
required
视频任务 ID。创建视频任务接口返回的
id,例如 task_01jz8s3dbke8p9vq2m8r9a7gk4。Response
string
对象类型,通常为
video。string
视频任务 ID。
string
任务状态。支持
queued、in_progress、completed、failed。integer
创建时间戳。
string
任务使用的模型名称。
string
任务完成时返回的视频 URL。
integer
实际生成的视频时长。上游返回该字段时透出。
integer
任务计费用量。上游返回该字段时透出。
string
任务失败原因。
状态映射
| 上游状态 | 返回状态 |
|---|---|
pending、queued | queued |
processing、running、in_progress | in_progress |
succeeded、completed | completed |
failed、cancelled | failed |
下载视频内容
如果查询结果没有直接返回可访问的video_url,可以使用内容下载端点:
GET /v1/videos/{id}/content
注意事项
- 查询接口只读取任务状态,不会重新提交生成任务。
video_url只在任务完成且上游返回结果地址后出现。- 轮询间隔建议保持数秒以上,避免过于频繁地查询同一个任务。