Wan - image-to-video - first frame API reference (2.1-2.6)
Wanxiang - Image-to-Video - Video Effects
A video effect template is a preset for video generation effects. Provide a first-frame image and a template value to generate a video with a specific dynamic effect -- such as "Magic Levitation" or "Squeeze". This feature is suitable for social media, marketing promotions, and interactive entertainment.
This document applies only to the China (Beijing) region. To use the model, you must use an API key from the China (Beijing) region.
Method: In the request body, set the template parameter to the desired template value, such as flying. For all available templates, see Video effect templates.
Note: When you use the template parameter, the model ignores the prompt field. You can omit this field or leave it empty.
The Image-to-Video API uses an asynchronous workflow. You submit a video generation task and then query the task status to retrieve the result. For the complete workflow, including how to poll for task status and download the generated video, see the Image-to-Video API reference.The following example shows how to submit a video generation request using a video effect template:
Copy
# The URL below is for the China (Beijing) region. Replace {WorkspaceId} with your actual workspace ID. URLs vary by region.curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \ -H 'X-DashScope-Async: enable' \ -H "Authorization: Bearer $DASHSCOPE_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "model": "wanx2.1-i2v-turbo", "input": { "img_url": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png", "template": "flying" }, "parameters": { "resolution": "720P" }}'
All general effects support both wanx2.1-i2v-plus and wanx2.1-i2v-turbo.These effects work with any entity. For best results, use an image where the entity is prominent and clearly distinguished from the background.
All effects in this category support both wanx2.1-i2v-plus and wanx2.1-i2v-turbo.These effects work with two-person photos. A half-body or full-body photo where both people face the camera or each other is recommended.