Vidu API
工作台
文档
登录

推荐提示词接口

POST https://api.vidu.cn/ent/v2/img2video-prompt-recommendation

请求头

字段描述
Content-Typeapplication/json数据交换格式
AuthorizationToken {your api key}{token} 替换为您的 token

请求体

参数名称类型必填参数描述
imagesArray[String]输入图片
- 当前仅支持一张图片
- 支持传入 Base64 编码或图片 URL(需确保可以访问)
- 支持 JPG/PNG/WEBP
- 图片大小不超过 50 MB
typeArray[String]推荐提示词类型
可选枚举值:template(特效)、img2video(图生视频)、也可以两个参数一起传
resolutionString可选目标分辨率
默认:360p
可选枚举值:360p
- 该参数仅适用于输出不同 template 模版支持的分辨率不同
countInt可选返回推荐提示词的数量
默认值为 5,支持范围:1~10
当type=["img2video","template"],如count=5,会输出10个prompt。即img2video和template各5条
curl -X POST -H "Authorization: Token {your_api_key}" -H "Content-Type: application/json" -d '
{
"images": ["your_image_url"],
"type": ["img2video""template"],
"count": "5"
}' https://api.vidu.cn/ent/v2/img2video-prompt-recommendation

响应体

字段子字段类型描述
task_idStringVidu 生成的任务ID
imagesArray[String]本次调用的图像参数
countInt本次调用的 推荐提示词的数量 参数
promptsArray提示词推荐结果(结构如下)
typeStringtemplate(特效)、img2video(图生视频)
contentString推荐的提示词文本,适用于给用户展示
promptString实际调用的提示词文本
仅当type=template时返回
templateString推荐提示词所关联的模板枚举值
仅当 type=template 时返回
resolutionString推荐输出分辨率
仅当 type=template 时返回
created_atString任务创建时间
{
"id": "your_task_id",
"images": ["your_input_images"],
"count": 2,
"prompts": [
{
"type": "template",
"content": "两个人亲吻",
"prompt": "视频内容\\n画面中的两个主体开始转向彼此,开始接吻,画面呈现充满爱意的氛围。\\n# 要求\\n1.亲吻时候,嘴唇的动作要彼此贴合。\\n2.将Motion Level的值设置为“Large”."
"template": "kissing",
"resolution": "360p"
},
{
"type": "template",
"content": "端午节,一起赛龙舟",
"prompt": "The characters open their mouths and laugh happily, eyes blinking softly and naturally. \nThe hand holding the instant photo remains rigidly fixed in a stable position, ensuring the photo stays centered within the frame at all times.\nThe unauthorized appearance of other characters is strictly prohibited."
"template": "dragonboat_shot",
"resolution": "360p"
},
{
"type": "img2video",
"content": "梦幻海底奇缘"
},
{
"type": "img2video",
"content": "一只可爱的小狗"
}
],
"created_at": "string"
}