Wan 2.7 I2V
Image-to-Video • AlibabaAlibaba's Wan 2.7 image-to-video model that generates videos from a reference image with optional text prompts. Supports 720P and 1080P output with durations from 2 to 15 seconds.
| Model Info | |
|---|---|
| Terms and License | link ↗ |
| More information | link ↗ |
| Pricing | View pricing in the Cloudflare dashboard ↗ |
Usage
const response = await env.AI.run( 'alibaba/wan-2.7-i2v', { image: 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png', prompt: 'A gentle camera push-in on the scene with soft ambient lighting', },)console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "model": "alibaba/wan-2.7-i2v", "input": { "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png", "prompt": "A gentle camera push-in on the scene with soft ambient lighting" }}'{ "state": "Completed", "result": { "video": "https://examples.aig.cloudflare.com/alibaba/wan-2.7-i2v/simple-image-to-video.mp4" }, "gatewayMetadata": { "keySource": "Unified" }}Examples
High Resolution — Generate at 1080P with a longer duration
const response = await env.AI.run( 'alibaba/wan-2.7-i2v', { image: 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png', prompt: 'Subject begins rapping confidently, head bobbing to the beat', duration: 10, resolution: '1080P', },)console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "model": "alibaba/wan-2.7-i2v", "input": { "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png", "prompt": "Subject begins rapping confidently, head bobbing to the beat", "duration": 10, "resolution": "1080P" }}'{ "state": "Completed", "result": { "video": "https://examples.aig.cloudflare.com/alibaba/wan-2.7-i2v/high-resolution.mp4" }, "gatewayMetadata": { "keySource": "Unified" }}With Negative Prompt — Guide generation away from unwanted artifacts
const response = await env.AI.run( 'alibaba/wan-2.7-i2v', { image: 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png', prompt: 'Subject slowly turns their head and smiles', duration: 5, negative_prompt: 'blurry, distorted face, extra limbs', resolution: '720P', },)console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "model": "alibaba/wan-2.7-i2v", "input": { "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png", "prompt": "Subject slowly turns their head and smiles", "duration": 5, "negative_prompt": "blurry, distorted face, extra limbs", "resolution": "720P" }}'{ "state": "Completed", "result": { "video": "https://examples.aig.cloudflare.com/alibaba/wan-2.7-i2v/with-negative-prompt.mp4" }, "gatewayMetadata": { "keySource": "Unified" }}Reproducible Output — Use a fixed seed for reproducibility
const response = await env.AI.run( 'alibaba/wan-2.7-i2v', { image: 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png', prompt: 'Camera orbits slowly around the subject under streetlamp light', duration: 8, resolution: '720P', seed: 42, },)console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "model": "alibaba/wan-2.7-i2v", "input": { "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png", "prompt": "Camera orbits slowly around the subject under streetlamp light", "duration": 8, "resolution": "720P", "seed": 42 }}'{ "state": "Completed", "result": { "video": "https://examples.aig.cloudflare.com/alibaba/wan-2.7-i2v/reproducible-output.mp4" }, "gatewayMetadata": { "keySource": "Unified" }}Parameters
duration
integermaximum: 15minimum: 2image
stringrequiredformat: urinegative_prompt
stringprompt
stringresolution
stringenum: 720P, 1080Pseed
integermaximum: 2147483647minimum: 0watermark
booleanvideo
stringformat: uri