Overview
Wan 2.2 endpointVideo GenerationCapability:Text-to-Video, Image-to-Video (Plus / Flash ), First/Last Frame to Video, image, video./ image / last frame output 5 secondsvideo; image and video DurationReference video (2~ 30 seconds).
localized example text:
- 🎬 / image:video, or first frame image as video
-🖼️ last frame:first frame and last frame, video
-🕺 image:Reference video and image
-🔄 videolocalized example text:Reference video in the image, videoScenario, and
-⚡ localized example text:Image-to-VideoOptional Plus () or Flash (, 720P)
-🇨🇳 localized example text:asLimit:
- ⚠️ / image / last frame Duration 5 seconds, can
-⚠️ image / video supported Prompt,mode -⚠️ supported audio input, Generate Sound ( use Wan 2.5 Preview)
- ⚠️ Image-to-Video, last frame, image, video input asset, Aspect ratioBase URL: https://mm-internal-cn.leonecloud.com ()
---## Authentication
All endpoints require a token in the request header for authentication:
Authorization: Bearer {YOUR_AUTH_TOKEN}Supported Scenarios
Scenario 1: Text-to-Video
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.2" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "in,",
"resolution": "1080P",
"ratio": "16:9"
}'Scenario2:Text-to-Video (dimensions )size output width and height,「Resolutionand dimensions」.
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.2" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "when, in height",
"size": "1080*1920"
}'Scenario3:Image-to-Video (Plus, )
first frame image, Modelimage as video, imageAspect ratio.
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.2" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": ",",
"firstFrameImage": "https://example.com/girl.png",
"resolution": "1080P"
}'Scenario4:Image-to-Video (Flash, )modelName localized example textwan2.2-i2v-flash Flash,, 720P.
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.2" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"modelName": "wan2.2-i2v-flash",
"prompt": ",",
"firstFrameImage": "https://example.com/rapper.png",
"resolution": "720P"
}'Scenario5:First/Last Frame to Video
first frame and last frame, image video.last frame can.
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.2" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"genType": "kf2v",
"prompt": ", after",
"firstFrameImage": "https://example.com/first.png",
"lastFrameImage": "https://example.com/last.png",
"resolution": "720P"
}'Scenario6:image
images image and reference video, video and imagecharacter.
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.2" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"genType": "move",
"firstFrameImage": "https://example.com/character.jpeg",
"videoUrl": "https://example.com/performance.mp4",
"mode": "std"
}'Scenario7:videoimages image and video, video in the character as image in the character, video Scenario, and.
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.2" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"genType": "mix",
"firstFrameImage": "https://example.com/character.jpeg",
"videoUrl": "https://example.com/source.mp4",
"mode": "pro"
}'image and video input asset, mustgenType(move/mix), If omittedwill return ParameterError.
Query Task Status
curl -X GET "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/{taskId}" \
-H "Authorization: Bearer your_auth_token_here"Endpoint details
1. create Wan 2.2 task
POST /api/v2/open/aigc/wan-2.2
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| genType | string | Conditionally required | Generation type:t2v / i2v / kf2v / move / mix.If omittedwhen asset;localized example textvideoUrl when Required |
| modelName | string | No | onlyImage-to-Video:wan2.2-i2v-plus (default, )/wan2.2-i2v-flash () |
| prompt | string | Conditionally required | Prompt, maximum 800 characters.Text-to-VideoRequired; Image-to-Video, last frame Optional; image / video supported |
| negativePrompt | string | No | Prompt, in in the, maximum 500 characters.image / video supported |
| firstFrameImage | string | Conditionally required | first frame image URL; image / video in as image.Text-to-VideoRequired |
| lastFrameImage | string | No | last frame image URL, onlyFirst/Last Frame to Video supported |
| imageUrls | string[] | No | field, 1 images, as first frame use.andfirstFrameImage localized example text |
| videoUrl | string | Conditionally required | Reference video URL, image / videoRequired |
| resolution | string | No | Resolution, Capability,「Resolutionand dimensions」.image / video supported |
| ratio | string | No | onlyText-to-Video:16:9 (default)/ 9:16 / 1:1 / 4:3 / 3:4.480P supported4:3 / 3:4 |
| size | string | No | onlyText-to-Video:localized example textwidthheight, localized example text19201080.andratio,「Resolutionand dimensions」 |
| mode | string | No | onlyimage / video:std (default, height )/pro (, when and height ) |
| duration | int | No | videoDuration (seconds)./ image / last frame5, return ParameterError; image / videoReference video, Parameter |
| promptExtend | bool | No | Prompt, defaulttrue.Prompt after, when.image / video supported |
| watermark | bool | No | in lower-right corner AI watermark, defaultfalse |
| seed | int | No | random seed, localized example text0 ~ 2147483647, If omittedlocalized example text.image / video supported |
| checkImage | bool | No | onlyimage / video: in first input image, defaulttrue |
| taskNickname | string | No | Task label, in |
| callbackUrl | string | No | Callback notification URL after the task is complete |
Description:
-resolutionsize can (720P/720p);sizein the*canx
- whensizeandresolutionwhen, must, return ParameterError> - Image-to-Video, last frameratio/size, automatically follows first frame image> - first frame / last frame image:JPEG / JPG / PNG ( supported )/ BMP / WEBP, width and height 240~ 8000,≤10MB
- image / video image:JPG / JPEG / PNG / BMP / WEBP, width and height 200~ 4096, Aspect ratio 1:3~ 3:1, ≤5MB
- image / video Reference video:MP4 / AVI / MOV, Duration 2~ 30 seconds, width and height 200~ 2048, Aspect ratio 1:3~ 3:1, ≤200MB
Response Example
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20261119172239_gfdt2jgl",
"status": "processing",
"createdAt": "2026-11-19 17:22:39"
}
}2. Query Task Status
GET /api/v2/open/aigc/{taskId}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | Status Code, 0 indicates success |
| data.taskId | string | Task ID |
| data.status | string | Task Status:processing / success / failed |
| data.result | string[] | video URL (Successreturned when applicable) |
| data.pointConsume | string | task |
| data.currency | string | localized example text |
| data.errorMsg | string | Error Message (Failurereturned when applicable) |
| data.createdAt | string | Created Time |
| data.updatedAt | string | Updated Time |
validity period 24 hours:data.result in the video as when, in after and store.Response Example
Success
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20261119172239_gfdt2jgl",
"status": "success",
"result": [
"https://example-video-store.com/output/ae7388d8b777.mp4?Expires=1795152273&Signature=xxx"
],
"pointConsume": "0.700000",
"currency": "CNY",
"createdAt": "2026-11-19 17:22:40",
"updatedAt": "2026-11-19 17:23:21"
}
}Failure
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20261119172239_gfdt2jgl",
"status": "failed",
"errorMsg": "Video GenerationFailure, localized example text",
"createdAt": "2026-11-19 17:22:40",
"updatedAt": "2026-11-19 17:23:00"
}
}3. Batch Query Task Status
POST /api/v2/open/aigc/batch
| Parameter | Type | Required | Description |
|---|---|---|---|
| taskIds | string[] | Yes | Task ID list, up to 100 |
Callback Notification
Create TaskwhencallbackUrl, taskcomplete (Success or Failure) after the system will POST Request.
Headers
Content-Type: application/json
X-Funcloud-Event: task.completed
X-Funcloud-Signature: {localized example text}Body
{
"event": "task.completed",
"taskId": "task_20261119172239_gfdt2jgl",
"status": "success",
"result": ["https://example-video-store.com/output/ae7388d8b777.mp4"],
"errorMsg": "",
"timestamp": "2026-11-19T17:23:21+08:00",
"signature": "a1b2c3d4e5f6..."
}Parameter Value Ranges
Generation type (genType)
| localized example text | Description | asset | Duration |
|---|---|---|---|
t2v | Text-to-Video | prompt | 5 seconds |
i2v | Image-to-Video | firstFrameImage | 5 seconds |
kf2v | First/Last Frame to Video | firstFrameImage (+ lastFrameImage) | 5 seconds |
move | image | firstFrameImage + videoUrl | Reference video 2~ 30 seconds |
mix | videolocalized example text | firstFrameImage + videoUrl | Reference video 2~ 30 seconds |
genType If omittedwhen asset: with last frame→ kf2v, with first frame→ i2v, with→ t2v.localized example textvideoUrl when mustmove ormix, asset,.
Capability supported Resolution| Capability | modelName | Optionallocalized example text| default |
|------|-----------|----------|------|
| Text-to-Video | wan2.2-t2v-plus | 480P / 1080P | 1080P |
| Image-to-Video Plus | wan2.2-i2v-plus | 480P / 1080P | 1080P |
| Image-to-Video Flash | wan2.2-i2v-flash | 480P / 720P / 1080P | 720P |
| First/Last Frame to Video | wan2.2-kf2v-flash | 480P / 720P / 1080P | 720P |
| image / video| — | supportedresolution, localized example textmode localized example textstd / pro | std |
Text-to-Videoand Image-to-Video Plus with 720P,720P will return ParameterError and Optional.Resolutionand dimensions (onlyText-to-Video)| (resolution)| 16:9 | 9:16 | 1:1 | 4:3 | 3:4 |
|----|----|----|----|----|----|
| 480P | 832480 | 480832 | 624624 | — | — |
| 1080P | 19201080 | 10801920 | 14401440 | 16321248 | 12481632 |
- Text-to-Video:localized example text
resolution+ratio, or in thesize; If omitted when as1920*1080 - Image-to-Video / last frame:
resolution, output Aspect ratio and first frame imageconsistent,### (mode)
| only image / video supported: | localized example text | Description |
|---|---|---|
std | (default),, height, and | |
pro | , height,, when and |
Billing
- Per-second billing:secondsCapability and,= seconds× videoDuration
- / image / last frame 5 seconds,= seconds× 5
- image / video DurationReference video, Create Task when 30 seconds,taskSuccessafter Duration,
- Create Taskwhen, taskSuccess after, Failure
- query endpoint return
pointConsumeas,
---## Error Codes
| code | Description |
|---|---|
| 0 | Success |
| 10002 | Parametermissing or malformed (Duration 5, Text-to-Video 720P,videoUrl notgenType) |
| 10005 | API Key invalid or missing |
| 30003 | Task not found |
| 40001 | Insufficient balance |
| 40004 | , after |
| 60001 | can use |
| 90003 | Internal server error |
Best Practices
1. Polling Strategy
- First 30 seconds:query every 3 seconds
- 30 seconds ~ 2 minutes:query every 5 seconds
- After 2 minutes:query every 10 seconds
2. Processing Time Reference
- 480P Text-to-Video:Usually 1 ~ 2 minutes
- image / video:Reference video,
modeasprowhen, Usually 2~ 5 minutes - Resolutionheight, Reference video, when### 3. Prompt Tips
- Prompt = subject+ localized example text+ Scenario + - last frame Scenario,, recommended (「localized example text」「first」)
- localized example text
negativePrompt,「Resolution,,」 - Promptwhen
promptExtend,### 4. image / video asset recommended
- Reference videoResolution and frame rate height, output
- imagerecommended subject,,or can
- -
std, image and no afterpro---## FAQ
Q1: asduration localized example text?
A: / image / last frame Duration 5 seconds,5 will return ParameterError; image / video DurationReference video,duration.
Q2: Image-to-Video Plus and Flash?
A: Plus, with 480P / 1080P; Flash,, 720P.localized example textmodelName, If omitteddefault Plus.
Q3: image and video with?
A: image Reference video and imagecharacter, and Scenario; videoReference video Scenario,and, in the imagecharacter.
Q4: videotask will 30 seconds?
A: will.Create Taskwhen 30 seconds, taskSuccess after Duration,,pointConsume.
Q5: video with?
A: with.Wan 2.2 Generate Soundaudio input.use Wan 2.5 Preview.
Q6: supported image reference or Reference video?
A: supported.Image-to-Video1 images first frame, last frame up to images.image reference, Reference video use wan 3.0.
Technical Support
If you have any questions, please contact our technical support team.