输入关键词搜索

模板成片

更新时间: 2026/08/27 10:13:38

该接口可以通过使用模板成片能力生成视频。

请求信息

请求 URL

POST /hub/vidu/v2/template-story

请求头

Header 必填 示例值
Authorization Bearer sk-xxxxx
Content-Type application/json; charset=utf-8

请求体

字段 类型 必填 说明
story string 成片模板标识。常见值:love_storyworkday_feelsmonkey_kingpigsymonk_tangone_shot
images string[] 输入图片。支持 URL 或 Base64,具体数量、比例要求与模板相关
payload string 透传字段,最长 1048576 字符
callback_url string 任务状态回调地址,具体规范请参考

请求示例

json{
  "story": "love_story",
  "images": [
    "https://example.com/story-1.png",
    "https://example.com/story-2.png"
  ]
}

响应信息

响应体

字段 类型 说明
task_id string 任务 ID
state string 任务状态。常见值:createdqueueingprocessingsuccessfailed
story string 模板标识
images string[] 输入图片
payload string 透传字段
credits string 消耗量
created_at string 创建时间

响应示例

json{
  "task_id": "tsk_1234567907",
  "state": "created",
  "story": "love_story",
  "images": [
    "https://example.com/story-1.png",
    "https://example.com/story-2.png"
  ],
  "payload": "",
  "credits": "20.000000",
  "created_at": "2026-04-16T09:47:00Z"
}

错误码

完整列表请参考客户端 API 错误码

此文档是否对你有帮助?
有帮助
去反馈
  • 请求信息
  • 请求 URL
  • 请求头
  • 请求体
  • 请求示例
  • 响应信息
  • 响应体
  • 响应示例
  • 错误码