Overview
Animate a still image into a video using the Wan 2.5 / 2.6 open-source video diffusion model family. Part of the Wan series known for fluid motion and temporal consistency.
Primary Endpoint
POST
/api/v1/userWan25/startStart Wan video generation
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Optional display name for the task |
| image_url | string | No | Source image URL. Required for `first_frame` and `first_last_frame`. |
| prompt | string | Yes | Generation prompt |
| negative_prompt | string | No | Negative prompt to avoid unwanted features |
| duration | enum: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | No | Video duration in seconds. Wan2.7 reference_image supports 2-15 with images only or 2-10 when a reference video is present; text_to_video/first_frame/first_last_frame/video_extend use 5/10/15; video_edit uses 5-10. Wan 2.5 only supports 5/10. |
| resolution | enum: 480p | 720p | 1080p | No | Video resolution |
| ratio | enum: 16:9 | 9:16 | 1:1 | 4:3 | 3:4 | No | Video aspect ratio. Only used by Wan 2.7 `text_to_video` and `reference_image`. |
| enable_prompt_expansion | boolean | No | Whether to enable prompt rewriting using LLM |
| multi_shots | boolean | No | Enable intelligent multi-shot segmentation (only active when enable_prompt_expansion is true) |
| model | enum: wan2.5-i2v-preview | wan2.6-i2v | wan2.6-i2v-flash | wan2.7-i2v | No | AI model version (wan2.6-i2v and wan2.7-i2v require VIP/Max user, wan2.6-i2v-flash is available to all users) |
| task_type | enum: text_to_video | first_frame | first_last_frame | reference_image | video_extend | video_edit | No | Wan 2.7 generation mode. Only used when `model=wan2.7-i2v`. |
| last_frame_url | string | No | Last-frame image URL. Required for `first_last_frame`; optional for `video_extend`. |
| first_clip_url | string | No | Existing video clip URL. Required for Wan 2.7 `video_extend`. |
| edit_video_url | string | No | Input video URL. Required for Wan 2.7 `video_edit`. |
| reference_image_urls | array<string> | No | Legacy pure-image reference URLs for Wan 2.7 `reference_image`; optional for `video_edit` (up to 3 images). |
| reference_media | array<object> | No | Ordered Wan2.7 reference-to-video media. Input videos are billed together with output duration according to the official 5-second input cap. |
| seed | number | No | Random seed for reproducibility. Value must be in the range [0, 2147483647]. If not specified, system generates a random seed. |
| audio | boolean | No | Whether to generate audio for the video |
| audio_url | string | No | URL of audio file to use for first-frame/first-last-frame video generation. Supports WAV/MP3, 3-30s duration, max 15MB. If longer than video duration, audio will be truncated. |
| webhook_url | string | No | HTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth. |
| webhook_token | string | No | Optional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e. |
Request Example
curl -X POST "https://www.a2e.com.cn/api/v1/userWan25/start" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Wan Video",
"image_url": "https://example.com/image.jpg",
"prompt": "Make the person in the image wave their hand",
"negative_prompt": "blurry, distorted",
"duration": "5",
"resolution": "720p",
"ratio": "16:9",
"enable_prompt_expansion": false,
"multi_shots": false,
"model": "wan2.5-i2v-preview",
"task_type": "first_frame",
"last_frame_url": "https://example.com/last-frame.jpg"
}'Related Endpoints
POST
/api/v1/userWan25/startStart Wan video generation
GET
/api/v1/userWan25/allRecordsGet all Wan 2.5 tasks
POST
/api/v1/userWan25/batchDetailBatch query task details
GET
/api/v1/userWan25/{_id}Get Wan 2.5 task details
DELETE
/api/v1/userWan25/{_id}Delete a Wan 2.5 task
POST
/api/v1/userWanSpicy/startStart Wan Spicy image-to-video generation
GET
/api/v1/userWanSpicy/allRecordsGet all Wan Spicy tasks
POST
/api/v1/userWanSpicy/batchDetailBatch query task details
GET
/api/v1/userWanSpicy/{_id}Get Wan Spicy task details
DELETE
/api/v1/userWanSpicy/{_id}Delete a Wan Spicy task
POST
/api/v1/userWan30/startStart Wan3.0 all-in-one video generation
Responses
200
Wan video task started successfully
400
Bad Request - Invalid parameters
401
Unauthorized - Invalid or missing bearer token