任务:模板生视频(推荐)
概览
- 请求方法:
POST - 路径:
/task/vidu/template2video - 内容类型:
application/json - Tags:视频模型(Video)/vidu视频
认证
- Header:
Authorization: Bearer <token>
关键请求体字段
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| template | string | 是 | 模板类型, 具体见下表 |
| images | array[string] | 是 | 图片url或base64,支持多用途模板 |
| prompt | string | 是 | 文本提示词(<=1500字符) |
| seed | integer | 否 | 随机种子,0或不传表示随机 |
| aspect_ratio | string | 否 | 画面比例 16:9 / 9:16 (默认16:9) |
| area | string | 否 | exotic_princess 专用参数 |
| beast | string | 否 | beast_companion 专用参数 |
| callback_url | string | 否 | 结果回调地址,详情见Callback协议 |
模板说明(原文直转)
(已在原始 OpenAPI section 里保留完整,本文此处提供简要提示。)
示例请求
bash
curl -X POST "https://api.gpt.ge/task/vidu/template2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxx" \
-d '{
"template":"sexy_me",
"images":["https://p1-kling.klingai.com/bs2/...png"],
"prompt":"穿着变成粉色的比基尼"
}'示例返回(200)
json
{
"task_id":"809413373237157888",
"state":"created",
"template":"sexy_me",
"prompt":"穿着变成粉色的比基尼",
"images":["https://p1-kling.klingai.com/bs2/...png"],
"seed":0,
"created_at":"2025-04-14T17:11:41.478717701Z"
}