Video / Wan

Wan 2.5 Preview Video Generation

Overview

Wan 2.5 Preview supported Text-to-Video and first-frame image-to-Video, in when and (music, or ), can audio.can 5 seconds or 10 secondsvideo, supported 480P / 720P / 1080P.

localized example text:
- 🔊 localized example text:defaultand, can audio (audioUrl)
- 🎬 / image:video, or first frame image as video
-📐 localized example text:Text-to-Videosupported 16:9 / 9:16 / 1:1 / 4:3 / 3:4 (480P only 16:9 / 9:16 / 1:1)
-🎞️ 10 secondsDuration:supported 5 seconds, 10 seconds
-🇨🇳 localized example text:asLimit:
- ⚠️ Durationsupported5 / 10 seconds
- ⚠️ supported last frame, image reference, Reference video
-⚠️ Image-to-Videofirst frame image, 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 (Resolution + Aspect ratio)

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.5-preview" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": "in,,",
 "resolution": "720P",
 "ratio": "16:9",
 "duration": 5
 }'

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.5-preview" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": "when, in height",
 "size": "1080*1920",
 "duration": 10
 }'

Scenario3:first-frame image-to-Video

first frame image, Modelimage as video, imageAspect ratio.

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.5-preview" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": ",",
 "firstFrameImage": "https://example.com/girl.png",
 "resolution": "1080P",
 "duration": 5
 }'

Scenario4:audioaudioUrl after, will audio (, ).Text-to-Video, Image-to-Videocan use.

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/wan-2.5-preview" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": ", music",
 "firstFrameImage": "https://example.com/rapper.png",
 "audioUrl": "https://example.com/rap.mp3",
 "resolution": "720P",
 "duration": 10
 }'
audiovideoDuration when, first 5 / 10 seconds; audiovideoDuration when, as no.

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.5 Preview task

POST /api/v2/open/aigc/wan-2.5-preview

Content-Type: application/json

Request Parameters

ParameterTypeRequiredDescription
promptstringConditionally requiredPrompt, maximum 1500 characters.Text-to-VideoRequired, Image-to-VideoOptional
negativePromptstringNoPrompt, in in the, maximum 500 characters
genTypestringNoGeneration type:t2v (Text-to-Video)/ i2v (Image-to-Video).If omittedwhen first frame image
firstFrameImagestringConditionally requiredfirst frame image URL, Image-to-VideoRequired
imageUrlsstring[]Nofield, 1 images, as first frame use.andfirstFrameImage localized example text
audioUrlstringNoaudio URL.If omittedwhen Model and
resolutionstringNoResolution:480P / 720P / 1080P (default)
ratiostringNoonlyText-to-Video:16:9 (default)/ 9:16 / 1:1 / 4:3 / 3:4.480P supported4:3 / 3:4
sizestringNoonlyText-to-Video:localized example textwidthheight, localized example text1280720.andratio,「Resolutionand dimensions」
durationintNovideoDuration (seconds):5 (default)/ 10
promptExtendboolNoPrompt, defaulttrue.Prompt after, when
watermarkboolNoin lower-right corner「AIlocalized example text」watermark, default false
seedintNorandom seed, localized example text0 ~ 2147483647, If omittedlocalized example text
taskNicknamestringNoTask label, in
callbackUrlstringNoCallback notification URL after the task is complete
Description:
- resolution size can (720P / 720p); size in the* canx
- whensize andresolution when, must, return ParameterError> - Image-to-Videolocalized example textratio / size, automatically follows first frame image> - first frame image:JPEG / JPG / PNG ( supported )/ BMP / WEBP, width and height 240~ 8000,≤20MB
- audio:wav / mp3, Duration 3~ 30 seconds, ≤15MB

Response Example

{
 "code": 0,
 "msg": "success",
 "data": {
 "taskId": "task_20261119132304_pz4oa9ht",
 "status": "processing",
 "createdAt": "2026-11-19 13:23:04"
 }
}

2. Query Task Status

GET /api/v2/open/aigc/{taskId}

Response Parameters

ParameterTypeDescription
codeintStatus Code, 0 indicates success
data.taskIdstringTask ID
data.statusstringTask Status:processing / success / failed
data.resultstring[]video URL (Successreturned when applicable)
data.pointConsumestringtask
data.currencystringlocalized example text
data.errorMsgstringError Message (Failurereturned when applicable)
data.createdAtstringCreated Time
data.updatedAtstringUpdated 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_20261119132304_pz4oa9ht",
 "status": "success",
 "result": [
 "https://example-video-store.com/output/7c14cfa315fb.mp4?Expires=1795152273&Signature=xxx"
 ],
 "pointConsume": "1.500000",
 "currency": "CNY",
 "createdAt": "2026-11-19 13:23:05",
 "updatedAt": "2026-11-19 13:24:35"
 }
}

Failure

{
 "code": 0,
 "msg": "success",
 "data": {
 "taskId": "task_20261119132304_pz4oa9ht",
 "status": "failed",
 "errorMsg": "Video GenerationFailure, localized example text",
 "createdAt": "2026-11-19 13:23:05",
 "updatedAt": "2026-11-19 13:24:00"
 }
}

3. Batch Query Task Status

POST /api/v2/open/aigc/batch

ParameterTypeRequiredDescription
taskIdsstring[]YesTask 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_20261119132304_pz4oa9ht",
 "status": "success",
 "result": ["https://example-video-store.com/output/7c14cfa315fb.mp4"],
 "errorMsg": "",
 "timestamp": "2026-11-19T13:24:35+08:00",
 "signature": "a1b2c3d4e5f6..."
}

Parameter Value Ranges

Generation type (genType)

localized example textDescriptionasset
t2vText-to-Videoprompt
i2vfirst-frame image-to-VideofirstFrameImage

Resolutionand dimensions| (resolution)| 16:9 | 9:16 | 1:1 | 4:3 | 3:4 | |----|----|----|----|----|----| | 480P | 832480 | 480832 | 624624 | — | — | | 720P | 1280720 | 7201280 | 960960 | 1088832 | 8321088 | | 1080P | 19201080 | 10801920 | 14401440 | 16321248 | 1248*1632 |

  • Text-to-Video:localized example textresolution + ratio, or in thesize; If omitted when as1920*1080
  • Image-to-Video:localized example textresolution, output Aspect ratio and first frame imageconsistent,### Duration (duration)

-:5 / 10 seconds, default 5


Billing

  • Per-second billing:secondsResolution (480P / 720P / 1080P),= seconds× duration
  • Text-to-Videoand Image-to-Video;audioUrl Pricing
  • Create Task when, taskSuccess after, Failure
  • query endpoint returnpointConsume as,

---## Error Codes

codeDescription
0Success
10002Parametermissing or malformed (Duration 5 / 10, 480P 4:3)
10005API Key invalid or missing
30003Task not found
40001Insufficient balance
40004, after
60001can use
90003Internal 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 5 secondsvideo:Usually 1 ~ 2 minutes
  • Resolutionheight, Duration, when### 3. Prompt Tips
  • Prompt = subject+ localized example text+ Scenario +, can (「localized example text」「:……」)
  • localized example textnegativePrompt,「Resolution,,」
  • PromptwhenpromptExtend,

---## FAQ

Q1: If omitted audioUrl video with?

A: with.Modelwill music or.localized example textaudioUrl when as use audio.

Q2: Image-to-VideoAspect ratio?

A: localized example text.Image-to-Videofirst frame image,ratio / size will return ParameterError., image.

Q3: supported last frame or image reference?

A: supported.1 images first frame image.last frame, image reference or Reference video when, use wan 3.0.


Technical Support

If you have any questions, please contact our technical support team.

Updated 2026-11-19