跳到主要内容
注册
跳到主要内容
Router One
视频生成

查询视频生成状态

按 task_id 查询视频生成任务状态:pending、processing、completed(返回视频 url)或 failed(返回 error),建议轮询间隔不少于 3 秒。

  • pending — 任务已接受,尚未开始处理
  • processing — 正在生成(当前目录中的模型不返回 progress)
  • completed — 生成完成,读取 url 获取视频文件
  • failed — 生成失败,读取 error 获取原因

建议轮询间隔不少于 3 秒。视频文件 URL 具有有效期(通常 24 小时),如需长期保存请下载或转存到自有存储。

全部端点的完整参考:Markdown 版 · OpenAPI 3.1 JSON

GET
/v1/videos/generations/{task_id}
AuthorizationBearer <token>

使用 API Key 进行认证。在 Router One 控制台获取你的 API Key,格式为 sk-xxx。

In: header

Path Parameters

task_idstring

提交接口返回的任务标识,作为不透明字符串原样回传即可,无需解析其内部结构。

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.router.one/v1/videos/generations/v_8f3a92c1d4e74b6ea0b5f1d29c7e8a01"

{
  "task_id": "v_8f3a92c1d4e74b6ea0b5f1d29c7e8a01",
  "status": "processing"
}

{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "message": "task not found",
    "type": "invalid_request_error",
    "code": "INVALID_REQUEST",
    "request_id": "290dd478f91d8aec68f7535e871376eb"
  }
}
{
  "error": {
    "message": "provider is currently unavailable",
    "type": "service_unavailable",
    "code": "PROVIDER_UNAVAILABLE",
    "request_id": "290dd478f91d8aec68f7535e871376eb"
  }
}
{
  "error": {
    "message": "upstream timeout",
    "type": "service_unavailable",
    "code": "PROVIDER_UNAVAILABLE",
    "request_id": "290dd478f91d8aec68f7535e871376eb"
  }
}