Wan图生视频
OpenAPI Specification
图生视频:依据首帧图像与文本提示词生成视频,支持指定分辨率、智能改写提示词与添加水印。
请求方式:POST
接口地址
text
https://api.allyang.cn/v2/videos/generations
请求头
Authorization(可选):鉴权头,使用控制台创建的令牌,格式为 Bearer + 令牌。(示例:Bearer {{YOUR_API_KEY}})
请求参数(application/json)
prompt(string,必填)model(string,必填)- 可选值:
wan2.2-i2v-plus、wan2.2-i2v-flash、wanx2.1-i2v-turbo、wanx2.1-i2v-plus。
- 可选值:
duration(integer,可选)resolution(string,可选):分辨率取值范围随模型而变:wan2.2-i2v-plus 为 480P/1080P(缺省 1080P);wan2.2-i2v-flash 为 480P/720P(缺省 720P);wanx2.1-i2v-plus 为 720P(缺省 720P);wanx2.1-i2v-turbo 为 480P/720P(缺省 720P)。- 可选值:
720P、480P、1080P。
- 可选值:
images(array,必填):仅支持传入一张参考图。 watermark(boolean,可选)template(string,可选)negative_prompt(string,可选)prompt_extend(string,可选)seed(integer,可选)
请求示例
json
{
"prompt": "dance",
"model": "wan2.2-i2v-flash",
"images": [
"https://example.com/…"
]
}
返回字段
task_id(string,必填)
返回示例
json
{
"task_id": "e7bed961-d1b9-4b3f-8ef9-5f441bde28c8"
}
使用提示:分辨率可选范围随模型而变,请对照参数说明选择;提交后请用查询接口轮询结果;耗时、限流与计费数值以本平台实测与计费页为准(待补)。