Alibaba Wan Video Generation
Alibaba Tongyi Wan Video Generation API. This API follows an asynchronous video task process, returning a task ID upon submission, which can then be used to query the status and results. It supports text-to-video and image-to-video; for image-to-video, it is recommended to pass the first frame image via input_reference, and more upstream input and parameters can be passed through metadata.
Authorization
Bearer
In: header
Request Body
application/json
阿里万相 Wan 视频模型名称。当前项目适配器支持以上模型。
"wan2.7-i2v-2026-04-25" | "wan2.7-i2v" | "wan2.5-i2v-preview" | "wan2.2-i2v-flash" | "wan2.2-i2v-plus" | "wanx2.1-i2v-plus" | "wanx2.1-i2v-turbo"视频生成提示词。
图生视频首帧图 URL 或 Base64;项目会转换为上游 input.img_url。
视频时长,字符串格式;项目会转换为上游 parameters.duration。
视频时长,整数秒。若同时传 seconds,当前项目优先使用 duration。未传时默认 5 秒。
分辨率或尺寸。可传 480P、720P、1080P,或 1280*720、1920*1080 这类尺寸;带 * 时作为上游 parameters.size,否则作为 parameters.resolution。
阿里万相上游扩展参数。适配器会将该对象合并进阿里请求体,支持嵌套 input 与 parameters。注意项目会强制将 parameters.watermark 置为 false。
Response Body
application/json
curl -X POST "https://nodekey.xinghanyun.cn/v1/video/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-i2v-2026-04-25", "prompt": "手持镜头穿过清晨的咖啡店,阳光从窗边扫过桌面", "duration": 1, "metadata": { "input": { "negative_prompt": "blurry, low quality", "audio_url": "https://example.com/audio.mp3" }, "parameters": { "ratio": "16:9", "duration": 1, "prompt_extend": false, "audio": false, "seed": 1, "watermark": false } } }'{
"id": "string",
"task_id": "string",
"object": "string",
"model": "string",
"status": "queued",
"progress": 0,
"created_at": 0
}Last updated on