aslocalized example text (input/media/parameterslocalized example text+ snake_case field).in use endpointwan 3.0 V2 endpointlocalized example text.task and, can.
Overview
wan 3.0 localized example textlocalized example textendpoint:endpointPath, Request Bodyand field and wan 3.0 exactly identical.,Base URL and API Key can, localized example text.
localized example text:
- 🔌 localized example text:Path, field, Task Status, Error Codes and
-🎬 localized example text:Model,, and
-🧠 localized example text:localized example textmedia last frame, Reference image, Reference video, Reference audio, and
-🔊 Optionalaudio:supported in video when output audio, Pricing
-🎞️ Duration:maximum supported 30 seconds, output frame rate 30fps
-⚡ localized example text:and height Optional, and
-🇨🇳 localized example text:asLimit:
- ⚠️ Resolution:supported 480P / 720P / 1080P, supported 4K
-⚠️ asset:supported http(s) and image base64, supported withBase URL: https://mm-internal-cn.leonecloud.com ()
---## Authentication
with endpoint in Request in API Key:```
Authorization: Bearer {YOUR_API_KEY}
Failurereturned when applicable HTTP 401:```json
{
"code": "InvalidApiKey",
"message": "API Key no",
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}and| localized example text| localized example text|
|----|--------|
| Task ID | task_id task (task_20261119141434_buu2isxf), UUID, in query|
| videolocalized example text| video_url,expires_at when, and when store|
| localized example text|,localized example textinmodel after; Base URL|
| asset| http(s); image candata:image/...;base64,....with (oss:// etc. ) supported|
| localized example text| endpoint supported, Polling query endpoint.localized example textwan 3.0 V2 endpointlocalized example textlocalized example textcallbackUrl |
| localized example text| endpoint with, Request|
| scheduled_time | with「execute」when, field as task when|
| query validity period| taskvalid, 24 hours; video willexpires_at localized example text|
Quick Start
Text-to-Video
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v1/services/aigc/video-generation/video-synthesis" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "in, in,,."
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 5
}
}'first frame video generation
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v1/services/aigc/video-generation/video-synthesis" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "in",
"media": [
{ "type": "first_frame", "url": "https://example.com/first.png" }
]
},
"parameters": {
"resolution": "720P",
"duration": 5
}
}'Reference-to-Video (Promptlocalized example text「image 1」「Video 1」refer to asset )```bash
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v1/services/aigc/video-generation/video-synthesis" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"input": {
"prompt": "Video 1image 1, in image 2",
"media": [
{ "type": "reference_video", "url": "https://example.com/role.mp4" },
{ "type": "reference_image", "url": "https://example.com/guitar.png" },
{ "type": "reference_image", "url": "https://example.com/chair.png" }
]
},
"parameters": {
"resolution": "720P",
"ratio": "adaptive",
"duration": 5
}
}'
**Query Task**
```bashcurl -X GET "https://mm-internal-cn.leonecloud.com/api/v1/tasks/task_20261119141434_buu2isxf" \
-H "Authorization: Bearer your_api_key_here"
---
## Endpoints
| Method | Path (Base URL)| localized example text|
|--------|------|------|
| POST | `/api/v1/services/aigc/video-generation/video-synthesis` | create Video Generationtask|
| GET | `/api/v1/tasks/{task_id}` | Query Task Statusand result |
> Video Generationwhen (Usually 1~5 minutes), endpointas:**Create Task → Pollingquery**.
---
## 1. Create Task
**POST** `/api/v1/services/aigc/video-generation/video-synthesis`
**Content-Type**: `application/json`
### Request Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| model | string | Yes | `wan3.0-video` ()/`wan3.0-video-prime` (height )|
| input | object | Yes | input,`prompt` and`media` provide|
| input.prompt | string | Condition | Prompt, maximum 20000 characters,.supported in|
| input.media | array | Condition | asset,`type` and`url`, localized example text[asset Type](#asset Type)|
| parameters | object | No | Parameter|
| parameters.resolution | string | No | `480P` / `720P` / `1080P`, default `1080P` |
| parameters.ratio | string | No | `adaptive` (default)/ `21:9` / `16:9` / `4:3` / `1:1` / `3:4` / `9:16` |
| parameters.duration | integer | No | Duration (seconds), default `5`.localized example text`2~30`, or`-1` Duration|
| parameters.audio | boolean | No | output audio, default`true`.Pricing|
| parameters.seed | integer | No | random seed, `-1` () or`0 ~ 2147483647` |
| parameters.prompt_extend | boolean | No | Prompt, default`true`./ asset when as`true` |
| parameters.watermark | boolean | No | watermark, default`false` |
> **Defaultlocalized example text**:If omitted `parameters` when`1080P` + 5 secondslocalized example text., recommended.
### asset Type`input.media` localized example text`type`:| type | Description | Limit|
|------|------|----------|
| `first_frame` | first frame image, as video number| up to 1 images|
| `last_frame` | last frame image, as video after| up to 1 images|
| `reference_image` | Reference imagelocalized example text| up to 10 images|
| `reference_video` | reference Video| up to 5,≤15 seconds |
| `reference_audio` | reference Audio| up to 5,≤15 seconds |
| `file` |, Model after Video| up to 1, and`link` localized example text|
| `link` |, Model after Video| up to 1, and`file` localized example text|
**localized example text** (will return HTTP 400):
-`first_frame` / `last_frame` and`reference_image` / `reference_video` / `reference_audio` / `file` / `link` **localized example text**, in Request in
-`file` and`link`, can and`reference_*` -`reference_image` / `reference_video` / `reference_audio` can**Promptasset**:image, video, audio**1**, in the array asset.Request can when「image 1」「Video 1」「Audio 1」.
**asset**:
| Type | Format | Limit|
|------|------|----------|
| image| JPEG / JPG / PNG (supported )/ BMP / WEBP| 240~8000, width≤8:1, ≤20MB |
| Video | mp4 / mov | 1~15 seconds, frame rate≥16fps, 240~4096, width≤8:1, ≤100MB |
| Audio | wav / mp3 | 1~15 seconds, ≤15MB |
| localized example text| docx / doc / xlsx / xls / pptx / ppt / pdf / txt / key / pages / numbers / md | ≤100MB, ≤50 localized example text|
| localized example text| — | mustno can|
image`url` supported base64:`data:{MIME_type};base64,{base64_data}`.video, audio, supported http(s).
### localized example text```json
{
"output": {
"task_status": "PENDING",
"task_id": "task_20261119141434_buu2isxf"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}| field | Type | Description |
|---|---|---|
| output.task_id | string | Task ID, query results |
| output.task_status | string | create Success when asPENDING |
| request_id | string | Unique request ID, when provide |
create Failurereturned when applicable HTTP Status Code+ Error:```json
{
"code": "InvalidParameter",
"message": "The two modes are mutually exclusive. Do not pass reference_xx and first_frame/last_frame at the same time.",
"request_id": "7438d53d-6eb8-4596-8835-xxxxxx"
}
> **Create Task**:create Success after`task_id` Pollingcan.create will.
---
## 2. Query Task
**GET** `/api/v1/tasks/{task_id}`
### Path Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| task_id | string | Yes | Create Taskreturn`task_id` |
### localized example text**taskexecute Success**
```json{
"request_id": "78c9b768-0285-996c-b682-xxxxxx",
"output": {
"task_id": "task_20261119141434_buu2isxf",
"task_status": "SUCCEEDED",
"submit_time": "2026-11-19 10:01:35.452",
"scheduled_time": "2026-11-19 10:01:35.452",
"end_time": "2026-11-19 10:13:33.838",
"orig_prompt": "in",
"video_url": "https://fc-gw-sh.oss-accelerate.aliyuncs.com/videos/2026/11/19/output.mp4?expires_at=1795328159"
},
"usage": {
"video_count": 1,
"duration": 5.0,
"input_video_duration": 0.0,
"output_video_duration": 5.0,
"fps": 30,
"SR": 720,
"ratio": "16:9"
}
}
**task/ processing**
```json{
"request_id": "78c9b768-0285-996c-b682-xxxxxx",
"output": {
"task_id": "task_20261119141434_buu2isxf",
"task_status": "RUNNING",
"submit_time": "2026-11-19 10:01:35.452",
"scheduled_time": "2026-11-19 10:01:35.452",
"orig_prompt": "in"
}
}
**taskexecute Failure**
```json{
"request_id": "e5e57877-c0fc-47ed-8fad-xxxxxx",
"output": {
"task_id": "task_20261119141434_buu2isxf",
"task_status": "FAILED",
"submit_time": "2026-11-19 10:01:35.452",
"scheduled_time": "2026-11-19 10:01:35.452",
"end_time": "2026-11-19 10:02:10.120",
"orig_prompt": "in",
"code": "InvalidParameter",
"message": "Video GenerationFailure, localized example text"
}
}
**Task not found**
```json{
"request_id": "a4de7c32-7057-9f82-8581-xxxxxx",
"output": {
"task_id": "task_not_exist",
"task_status": "UNKNOWN"
}
}
### field| field | Type | Description |
|------|------|------|
| output.task_id | string | Task ID |
| output.task_status | string | Task Status, localized example text|
| output.submit_time | string | taskwhen, Format`YYYY-MM-DD HH:mm:ss.SSS` |
| output.scheduled_time | string | taskexecute when.as when|
| output.end_time | string | taskcomplete when, returned when applicable|
| output.orig_prompt | string | input Prompt|
| output.video_url | string | video, Successreturned when applicable.Format MP4 (H.264), localized example text`expires_at` when|
| output.code | string | Failurewhen Error Codes|
| output.message | string | Failurewhen|
| usage | object |, onlySuccesstask return,[Billing](#Billing) |
| request_id | string | Unique request ID |
**Task Status**
| task_status | Description |
|-------------|------|
| `PENDING` | Task queued |
| `RUNNING` | Task processing |
| `SUCCEEDED` | taskexecute Success|
| `FAILED` | taskexecute Failure,`output.code` / `output.message` |
| `UNKNOWN` | Task not found |
> taskFailure (`task_status=FAILED`)when, HTTP Status Code 200:**localized example text**Success,**task**Failurelocalized example text.localized example text`output.task_status`, HTTP Status Code.
---
## Billing
- Video Generation**Duration**:Output resolution (480P / 720P / 1080P)seconds, Resolution height height.
- localized example text= seconds× Duration.
- audio (`parameters.audio`)Pricing.
- taskFailure,.
### Duration= input videoDuration+ output videoDuration```
Duration= input_video_duration + output_video_duration- no input video Scenario (, first frame / last frame, Reference image, Reference audio, / ),
input_video_durationas 0, output Duration. - localized example text
reference_videoScenario (Video Editing, video, reference Video Generation), Reference video DurationDuration, will height only output Duration, when.
Successtaskusage fieldcan use:| field | Type | Description |
|------|------|------|
| video_count | integer | video, as 1|
| duration | number | videoDuration (seconds).with input video when as input and output and|
| input_video_duration | number | input videoDuration (seconds), no video input when as 0|
| output_video_duration | number | output videoDuration (seconds)|
| fps | integer | video frame rate, default 30|
| SR | integer | videoResolution,720 |
| ratio | string | Aspect ratio,16:9 |
Reference video usage (input 3 seconds+ output 5 seconds, 8 seconds):```json
{
"usage": {
"video_count": 1,
"duration": 8.0,
"input_video_duration": 3.0,
"output_video_duration": 5.0,
"fps": 30,
"SR": 720,
"ratio": "16:9"
}
}
---
## Error Codes
RequestError return HTTP Status Code+ localized example text`{code, message, request_id}`:
| HTTP | code | Description |
|------|------|------|
| 400 | `InvalidParameter` | Parameter, or asset,`message` |
| 400 | `Arrearage` | Insufficient balance|
| 401 | `InvalidApiKey` | API Key invalid or missing |
| 403 | `AccessDenied` | no|
| 404 | `ModelNotFound` | `model` in|
| 404 | `NotFound` | RequestPathin|
| 429 | `Throttling` | or execute task, or etc. with task complete|
| 500 | `InternalError` | Error, after|
| 503 | `ServiceUnavailable` | when can use, after|
taskFailure (`task_status=FAILED`)Error Codes in`output.code`, HTTP Status Codeas 200.
---
## Best Practices
### 1. Polling Strategy
- First 30 seconds:query every 5 seconds
- 30 seconds ~ 2 minutes:query every 10 seconds
- After 2 minutes:15 seconds query### 2. Processing Time Reference
- 720P 5 seconds:Usually 1 ~ 3 minutes
- 1080P 10 seconds:Usually 3~ 8 minutes
- Duration, Resolution height, when; height (`wan3.0-video-prime`)localized example text### 3. and when store`video_url` will`expires_at`, after and store.
### 4. Prompt Tips
- Prompt = subject+,+,+ - Reference-to-Video when「image 1」「Video 1」「Audio 1」refer to asset,
- Prompt Tips`prompt_extend` (enabled by default); when`false`
---
## FAQ
### Q1: and wan 3.0 with?
**A**: Model,, endpoint.(`input` / `media` / `parameters`, snake_case);[wan 3.0 V2 endpointlocalized example text](/docs/wan3-0-v2)(`{code, msg, data}`, camelCase, supported and query )., Item can.
### Q2: in`model` after?
**A**: Not required.Base URL,`model` localized example text`wan3.0-video` and`wan3.0-video-prime`, after will return 404`ModelNotFound`.
### Q3: and height?
**A**: `wan3.0-video-prime` Capability,, when Scenario;`wan3.0-video` localized example text., Pricing.
### Q4: first frame / last frame when Reference audio?
**A**: localized example text.first frame / last frame`first_frame` and`last_frame`, Type will return 400.audio`reference_image` + `reference_audio` localized example text.
### Q5: `duration` localized example text`-1` localized example text?
**A**: Duration, ModelPrompt and asset output Duration.when will, task complete after`usage` Duration,.
### Q6: asset, Prompt can?
**A**: can.`prompt` and`input.media` provide, asset.
### Q7: supported?
**A**: endpoint supported, Polling query endpoint.localized example text[wan 3.0 V2 endpointlocalized example text](/docs/wan3-0-v2)localized example text`callbackUrl`.
### Q8: taskvalidity period?
**A**: taskvalid, when can;`video_url` will`expires_at` localized example text.
---
## Technical Support
If you have any questions, please contact our technical support team.