Wan首尾帧图生视频
OpenAPI Specification
首尾帧图生视频:传入首帧与尾帧图片,由模型补全中间画面生成视频。
请求方式:POST
接口地址
text
https://api.allyang.cn/v2/videos/generations
请求头
Authorization(可选):鉴权头,使用控制台创建的令牌,格式为 Bearer + 令牌。(示例:Bearer {{YOUR_API_KEY}})
请求参数(application/json)
prompt(string,必填)model(string,必填):模型名 wanx2.1-kf2v-plus。- 可选值:
wanx2.1-kf2v-plus。
- 可选值:
duration(integer,可选)resolution(string,可选)images(array,必填):首尾帧图片,第一张为首帧、第二张为尾帧;支持公网可访问 URL(HTTP/HTTPS)或 base64(data:{MIME_type};base64,{base64_data}),本地文件可先上传换取临时 URL。(示例地址待补) watermark(boolean,可选)template(string,可选)negative_prompt(string,可选)prompt_extend(string,可选)seed(integer,可选)
请求示例
json
{
"prompt": "dance",
"model": "wanx2.1-kf2v-plus",
"images": [
"https://example.com/…",
"https://example.com/…"
]
}
返回字段
task_id(string,必填)
返回示例
json
{
"task_id": "e7bed961-d1b9-4b3f-8ef9-5f441bde28c8"
}
使用提示:两张图片建议保持一致的画幅与主体朝向,避免成片跳变;提交后请用查询接口轮询结果;耗时、限流与计费数值以本平台实测与计费页为准(待补)。