Developer Docs/Wan Video API

Wan Video API

Build Wan Video integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

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/start

Start Wan video generation

Request Parameters

NameTypeRequiredDescription
namestringNoOptional display name for the task
image_urlstringNoSource image URL. Required for `first_frame` and `first_last_frame`.
promptstringYesGeneration prompt
negative_promptstringNoNegative prompt to avoid unwanted features
durationenum: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15NoVideo 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.
resolutionenum: 480p | 720p | 1080pNoVideo resolution
ratioenum: 16:9 | 9:16 | 1:1 | 4:3 | 3:4NoVideo aspect ratio. Only used by Wan 2.7 `text_to_video` and `reference_image`.
enable_prompt_expansionbooleanNoWhether to enable prompt rewriting using LLM
multi_shotsbooleanNoEnable intelligent multi-shot segmentation (only active when enable_prompt_expansion is true)
modelenum: wan2.5-i2v-preview | wan2.6-i2v | wan2.6-i2v-flash | wan2.7-i2vNoAI model version (wan2.6-i2v and wan2.7-i2v require VIP/Max user, wan2.6-i2v-flash is available to all users)
task_typeenum: text_to_video | first_frame | first_last_frame | reference_image | video_extend | video_editNoWan 2.7 generation mode. Only used when `model=wan2.7-i2v`.
last_frame_urlstringNoLast-frame image URL. Required for `first_last_frame`; optional for `video_extend`.
first_clip_urlstringNoExisting video clip URL. Required for Wan 2.7 `video_extend`.
edit_video_urlstringNoInput video URL. Required for Wan 2.7 `video_edit`.
reference_image_urlsarray<string>NoLegacy pure-image reference URLs for Wan 2.7 `reference_image`; optional for `video_edit` (up to 3 images).
reference_mediaarray<object>NoOrdered Wan2.7 reference-to-video media. Input videos are billed together with output duration according to the official 5-second input cap.
seednumberNoRandom seed for reproducibility. Value must be in the range [0, 2147483647]. If not specified, system generates a random seed.
audiobooleanNoWhether to generate audio for the video
audio_urlstringNoURL 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_urlstringNoHTTPS 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_tokenstringNoOptional 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/start

Start Wan video generation

GET/api/v1/userWan25/allRecords

Get all Wan 2.5 tasks

POST/api/v1/userWan25/batchDetail

Batch 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/start

Start Wan Spicy image-to-video generation

GET/api/v1/userWanSpicy/allRecords

Get all Wan Spicy tasks

POST/api/v1/userWanSpicy/batchDetail

Batch 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/start

Start 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