Skip to main content
GET
/
v1
/
video
/
generations
/
{task_id}
获取任务状态
curl --request GET \
  --url https://api.example.com/v1/video/generations/{task_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "task_id": "<string>"
}
'
{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "task-video-abc123",
    "status": "queued",
    "url": "",
    "format": "mp4",
    "metadata": null,
    "error": null
  }
}

Documentation Index

Fetch the complete documentation index at: https://mercury-eab3b728.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

获取任务状态

这个接口用于查询通过统一视频任务入口提交的异步任务状态。返回结构使用 codemessagedata 包装。
  • 查询的是平台公开 task_id,不是上游真实任务 ID。
  • 成功响应固定返回 code = success
  • 适合与 /v1/video/generations 搭配使用。
  • 同一任务也可能通过 /v1/videos/{task_id} 以 OpenAI video 对象格式查询。

方法与路径

GET /v1/video/generations/{task_id}

请求示例

curl https://www.geeknow.top/v1/video/generations/task-video-abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

响应示例

{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "task-video-abc123",
    "status": "queued",
    "url": "",
    "format": "mp4",
    "metadata": null,
    "error": null
  }
}

认证

Authorization: Bearer YOUR_API_KEY

Path Parameters

task_id
string
required
统一视频任务入口返回的公开任务 ID。

Response

code
string
业务状态码。成功时固定为 success
message
string
错误或补充信息。成功时通常为空字符串。
data.task_id
string
任务 ID。
data.status
string
任务状态。常见值为 queuedprocessingsucceededfailed
data.url
string
最终视频结果地址。部分渠道会返回平台代理地址。
data.error
object
失败任务的错误详情。

使用场景

轮询直到完成

建议每 510 秒轮询一次,直到 status 变为 succeededfailed

切换到 OpenAI 查询结构

如果客户端已经按 OpenAI video 对象解析结果,可以直接改查:
curl https://www.geeknow.top/v1/videos/task-video-abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

注意事项

/v1/video/generations/{task_id}/v1/videos/{task_id} 查询的是同一类视频任务,但返回结构不同。前者是统一任务包装,后者是 OpenAI 视频对象。

相关接口