Wan3.0 Video Generation API Documentation
Call the BeeRoute video generation API to generate video content. This document applies to the Wan3.0 All-in-One reference video generation model, which supports text-to-video, image-to-video (first frame / first and last frames), reference-to-video (image/video/audio/file/link references), and other usages in a single model, and can generate videos up to 30 seconds long.
The BeeRoute platform is fully compatible with the official API paths and input/output parameters. Simply replace the official domain with the BeeRoute domain and use an API Key from the BeeRoute platform to call it directly.
Download the MD file of this document
1. Supported Models
Model List
| Model Name | Type | Description |
|---|---|---|
wan3.0-video | All-in-one reference video generation | All-in-One unified model supporting text-to-video, image-to-video (first frame / first and last frames), and reference-to-video (image/video/audio/file/link), generating videos up to 30 seconds long |
Note: Wan3.0 is a unified model, so there is no need to choose a different model name for each task type. The model automatically understands the generation intent from the
promptandmediapassed ininput. It is currently in an invite-only beta.
Pricing
| Resolution | Price (USD) |
|---|---|
| 480P | $0.0331 / sec |
| 720P | $0.0662 / sec |
| 1080P | $0.1324 / sec |
Billing notes:
- Without video input (text-to-video, image-to-video, reference file/link to video): billed by the output video duration.
- With video input (reference video to video): billed by
duration(input video duration + output video duration).
Note: With video input, a pre-deduction is made at request time, with the difference settled (refunded or charged) after the task completes.
2. Generating Videos
Because video generation tasks take a relatively long time (typically 1–5 minutes), the API uses asynchronous calls. The whole flow consists of two core steps: "create task → poll for result".
API Endpoint
POST /api/v1/services/aigc/video-generation/video-synthesis
Full URL: https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | User authentication token (Bearer sk-xxxx), using an API Key from the BeeRoute platform. |
| Content-Type | string | Yes | application/json |
| X-DashScope-Async | string | Yes | Asynchronous processing setting. Must be set to enable. Omitting this header results in an error. |
Request Parameters (JSON Body)
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model name. Fixed value: wan3.0-video. |
| input | object | Yes | Basic input information. Either prompt or media is required. See input parameters below. |
| parameters | object | No | Video processing parameters. See parameters below. |
input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Conditional | Text prompt describing the video content you expect to generate. Either this or media is required.Supports Chinese and English; each Chinese character or letter counts as one character, with no more than 20000 characters; anything beyond is automatically truncated. In all-in-one reference mode, you can use "Image 1", "Video 1", "Audio 1", etc. in the prompt to refer to the media materials at the corresponding positions in the media array. |
| media | array | Conditional | Array of media materials, supporting images, videos, audio, files, and web links as input. Either this or prompt is required.Each element in the array is a media object containing the type and url fields.In reference-to-video mode, the array order defines the order in which materials are referenced in the prompt. Images and videos are counted separately, so Image 1 and Video 1 can both exist. |
media element structure
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Media material type. See media type valid values below. |
| url | string | Yes | Media material URL or Base64-encoded data. See URL input formats below for supported formats. |
media type valid values
| type value | Description | Quantity limit |
|---|---|---|
first_frame | First-frame image, used strictly as the first frame of the video | Up to 1 |
last_frame | Last-frame image, used strictly as the last frame of the video | Up to 1 |
reference_image | Reference image | Up to 10 |
reference_video | Reference video | Up to 5 clips, total duration ≤ 15 seconds |
reference_audio | Reference audio | Up to 5 clips, total duration ≤ 15 seconds |
file | File | Up to 1; cannot be provided together with link |
link | Web link | Up to 1; cannot be provided together with file |
Important: The reference_xx / file / link types and the first_frame / last_frame types are mutually exclusive and cannot be mixed in the same request.
Material reference rules
- The 1st
reference_videoin the array corresponds to Video 1 in the prompt, the 2nd corresponds to Video 2, and so on. - The 1st
reference_imagein the array corresponds to Image 1 in the prompt, the 2nd corresponds to Image 2, and so on. - The 1st
reference_audioin the array corresponds to Audio 1 in the prompt, the 2nd corresponds to Audio 2, and so on.
Media material limits
| Material type | Format | Resolution/Duration | Size |
|---|---|---|---|
| Image | JPEG, JPG, PNG (alpha channel not supported), BMP, WEBP | Each side [240, 8000] px, aspect ratio ≤ 8:1 | ≤ 20MB |
| Video | mp4, mov | Each clip [1, 15] seconds, total duration ≤ 15 seconds, each side [240, 4096] px, aspect ratio ≤ 8:1 | ≤ 100MB |
| Audio | wav, mp3 | Total duration ≤ 15 seconds | ≤ 15MB |
| File | pptx, pdf, docx, etc. | — | — |
| Link | Web page URL | — | — |
URL input formats
| Format | Description | Example |
|---|---|---|
| Public URL | Supports the HTTP or HTTPS protocol | https://xxx/xxx.png |
| Temporary URL | Supports the OSS protocol; the temporary URL must be obtained by uploading a file | oss://dashscope-instant/xxx/xxx.png |
| Base64 encoding | Data format: data:{MIME_type};base64,{base64_data} | data:image/png;base64,GDU7MtCZzEbTbmRZ...... |
parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| resolution | string | No | Resolution tier of the generated video, which directly affects the cost. Default 1080P.Valid values: 1080P, 720P, 480P. |
| ratio | string | No | Aspect ratio of the generated video. Default adaptive.Valid values: adaptive (automatic), 16:9, 4:3, 1:1, 3:4, 9:16. |
| duration | integer | No | Duration of the generated video (seconds), which directly affects the cost. Default 5. Without video input: an integer in [2, 30]. With video input: total input video duration + output video duration ≤ 30 seconds. When set to -1: smart duration mode, in which the model automatically recommends a suitable duration based on the prompt, content, and rich media. |
| audio | boolean | No | Whether the output video includes audio. Default true (with sound).The price is the same with sound on or off. |
| seed | integer | No | Random seed, used to reproduce generation results. Range [0, 2147483647]. If omitted, the system generates one automatically. |
| watermark | boolean | No | Whether to add a watermark. Default false (no watermark). |
Output video resolution by ratio and resolution
| Resolution tier | Aspect ratio | Output video resolution (width*height) |
|---|---|---|
| 480P | 16:9 | 854*480 |
| 9:16 | 480*854 | |
| 1:1 | 640*640 | |
| 4:3 | 720*540 | |
| 3:4 | 540*720 | |
| 720P | 16:9 | 1280*720 |
| 9:16 | 720*1280 | |
| 1:1 | 960*960 | |
| 4:3 | 1104*832 | |
| 3:4 | 832*1104 | |
| 1080P | 16:9 | 1920*1080 |
| 9:16 | 1080*1920 | |
| 1:1 | 1440*1440 | |
| 4:3 | 1648*1248 | |
| 3:4 | 1248*1648 |
Note: When
ratioisadaptive, the model automatically recommends a suitable aspect ratio based on the input media's proportions and the intent, so you do not need to specify it manually.
Request Examples
1. Text-to-video
Generate a video from a pure text prompt, without passing media.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "A kitten running under the moonlight, the camera following its movement, moonlight spilling over its fur, creating a beautiful, soothing scene."
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"audio": true,
"watermark": false
}
}'
2. Image-to-video - first frame to video
Pass the first-frame image via first_frame; the model generates a video based on that image.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "A graffiti art character comes to life off the wall, striking a rapper pose.",
"media": [
{
"type": "first_frame",
"url": "https://example.com/first_frame.png"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 10,
"audio": true,
"watermark": true
}
}'
3. Image-to-video - first and last frame to video
Pass the first and last frame images via first_frame + last_frame; the model generates a transition video between the two frames.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "Realistic style: a little black kitten gazes curiously up at the sky as the camera gradually rises from eye level.",
"media": [
{
"type": "first_frame",
"url": "https://example.com/first_frame.png"
},
{
"type": "last_frame",
"url": "https://example.com/last_frame.png"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 10,
"audio": true,
"watermark": true
}
}'
4. Reference-to-video - single image reference
Pass a reference image via reference_image; the model generates a video based on the image content.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "Based on the reference image, in a 3D cartoon adventure-film style, a young boy explorer discovers a moss-covered treasure chest in an enchanted forest.",
"media": [
{
"type": "reference_image",
"url": "https://example.com/storyboard.png"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 10,
"audio": true,
"watermark": true
}
}'
5. Reference-to-video - multi-material reference (image + video + audio)
Pass multiple materials via reference_image, reference_video, and reference_audio; the model automatically understands the intent and generates a multi-character interaction video.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "Video 1 holds Image 3, plays a soothing country folk song on the chair from Image 4, and says, \"The sunshine is so nice today.\" Image 1, holding Image 2, walks past Video 1, places Image 2 on the table next to Video 1, and says, \"That sounds lovely. Could you sing it again?\"",
"media": [
{
"type": "reference_image",
"url": "https://example.com/role1.jpg"
},
{
"type": "reference_image",
"url": "https://example.com/object_guitar.png"
},
{
"type": "reference_image",
"url": "https://example.com/role2.jpg"
},
{
"type": "reference_image",
"url": "https://example.com/chair.png"
},
{
"type": "reference_video",
"url": "https://example.com/role_video.mp4"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "16:9",
"duration": 10,
"audio": true,
"watermark": false
}
}'
6. Reference-to-video - multi-character interaction
Pass references for different characters via multiple reference_video entries to generate a character interaction video.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "Video 1 and Video 2 drink coffee and chat together in a café, in a relaxed and cheerful atmosphere.",
"media": [
{
"type": "reference_video",
"url": "https://example.com/role1.mp4"
},
{
"type": "reference_video",
"url": "https://example.com/role2.mp4"
}
]
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 10,
"audio": true,
"watermark": false
}
}'
7. Reference file to video
Pass a file via the file type; the model automatically understands the file content and generates a video.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "A high-end smart glasses commercial with a minimalist, futuristic, premium style, restrained lighting, and a palette dominated by black, silver-gray, and ice blue, accented with soft white light and spec UI graphics. It opens on a pure black background as a pair of smart glasses slowly emerges from the darkness, refined highlights gliding along the temples and the frame outline traced by cold rim light. The product then rotates slowly in midair while minimalist motion graphics display its core specs. It ends on a solid-color background with the product floating in a freeze-frame as the camera slowly pushes in on the brand logo and core slogan.",
"media": [
{
"type": "file",
"url": "https://example.com/product.pptx"
}
]
},
"parameters": {
"resolution": "480P",
"ratio": "adaptive",
"duration": 10
}
}'
8. Smart duration mode
Pass duration: -1; the model automatically recommends a suitable duration based on the prompt and input materials.
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "A tense, thrilling detective story. Shot 1, wide shot: a rainy night on a New York street, neon lights flickering. Shot 2, medium shot: the detective enters an old building. Shot 3, close-up: the detective, with a resolute, focused gaze."
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": -1,
"audio": true
}
}'
9. Text-to-video - long video (30 seconds)
curl --location --request POST 'https://beeroute.ai/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "wan3.0-video",
"input": {
"prompt": "A nature short film in the style of an ocean documentary. Opening: the sea at dawn, sunlight piercing the thin mist onto the shimmering water as a pod of dolphins leaps from the surface in the distance. Middle: the camera dives underwater to reveal colorful coral reefs and schools of tropical fish as a sea turtle glides leisurely by. Ending: at sunset, the sea turns golden red, the dolphins leap from the water once more, and the picture fades out."
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 30,
"audio": true,
"watermark": false
}
}'
Response Format
Successful response
Please save the task_id, which is used to query the task status and result.
{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}
Note: Do not create duplicate tasks; just poll for the result. The
task_idis valid for 24 hours.
Error response
{
"code": "InvalidApiKey",
"message": "No API-key provided.",
"request_id": "7438d53d-6eb8-4596-8835-xxxxxx"
}
3. Querying Task Status
Video generation usually takes several minutes. Poll the status using the task ID, with a recommended interval of 15 seconds.
API Endpoint
GET /api/v1/tasks/{task_id}
Full URL: https://beeroute.ai/api/v1/tasks/{task_id}
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | User authentication token (Bearer sk-xxxx), using an API Key from the BeeRoute platform. |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | The task_id returned when creating the task |
Request Example
curl -X GET 'https://beeroute.ai/api/v1/tasks/0385dc79-5ff8-4d82-bcb6-xxxxxx' \
--header 'Authorization: Bearer sk-xxx'
Response Format
Task succeeded
The video URL is retained for only 24 hours and is automatically cleared after that; please save the generated video promptly.
{
"request_id": "78c9b768-0285-996c-b682-xxxxxx",
"output": {
"task_id": "17ed7e50-00cf-4509-aea1-xxxxxx",
"task_status": "SUCCEEDED",
"submit_time": "2026-08-06 10:01:35.452",
"scheduled_time": "2026-08-06 10:01:35.507",
"end_time": "2026-08-06 10:13:33.838",
"orig_prompt": "A kitten running under the moonlight, the camera following its movement, moonlight spilling over its fur, creating a beautiful, soothing scene.",
"video_url": "https://example.com/output_video.mp4"
},
"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
{
"request_id": "78c9b768-0285-996c-b682-xxxxxx",
"output": {
"task_id": "17ed7e50-00cf-4509-aea1-xxxxxx",
"task_status": "RUNNING"
}
}
Task queued
{
"request_id": "78c9b768-0285-996c-b682-xxxxxx",
"output": {
"task_id": "17ed7e50-00cf-4509-aea1-xxxxxx",
"task_status": "PENDING"
}
}
Task failed
{
"request_id": "e5e57877-c0fc-47ed-8fad-xxxxxx",
"output": {
"task_id": "eff1443c-ccab-4676-aad3-xxxxxx",
"task_status": "FAILED",
"code": "InvalidParameter",
"message": "The two modes are mutually exclusive. Do not pass reference_xx and first_frame/last_frame at the same time."
}
}
Task query expired
A task_id can be queried for 24 hours. After that it can no longer be queried, and the following is returned.
{
"request_id": "a4de7c32-7057-9f82-8581-xxxxxx",
"output": {
"task_id": "502a00b1-19d9-4839-a82f-xxxxxx",
"task_status": "UNKNOWN"
}
}
Response Field Descriptions
output fields
| Field | Type | Description |
|---|---|---|
| task_id | string | Task ID. Queryable for 24 hours. |
| task_status | string | Task status. See the enum values below. |
| submit_time | string | Task submission time. Format: YYYY-MM-DD HH:mm:ss.SSS. |
| scheduled_time | string | Task execution time. Format: YYYY-MM-DD HH:mm:ss.SSS. |
| end_time | string | Task completion time. Format: YYYY-MM-DD HH:mm:ss.SSS. |
| orig_prompt | string | The original input prompt. |
| video_url | string | URL of the generated video. Returned when the task succeeds; valid for 24 hours. |
| code | string | Error code of a failed request. Not returned when the request succeeds. |
| message | string | Details of a failed request. Not returned when the request succeeds. |
task_status enum values
| Status | Description |
|---|---|
PENDING | Task queued |
RUNNING | Task processing |
SUCCEEDED | Task succeeded |
FAILED | Task failed |
CANCELED | Task canceled |
UNKNOWN | Task does not exist or status is unknown |
usage fields
| Field | Type | Description |
|---|---|---|
| video_count | integer | Number of generated videos. Fixed at 1. |
| duration | float | Duration of the generated video (seconds). |
| input_video_duration | float | Duration of the input video (seconds). 0.0 when there is no video input. |
| output_video_duration | float | Duration of the output video (seconds). |
| fps | integer | Frame rate of the generated video. |
| SR | integer | Resolution of the generated video. Example value: 720. |
| ratio | string | Aspect ratio of the generated video. Example value: 16:9. |
request_id field
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. Can be used for request tracing and troubleshooting. |
4. Detailed Model Parameters
Wan3.0 All-in-One Reference Video Generation (wan3.0-video)
All-in-One unified model that automatically understands the generation intent from the input, with no need to choose a sub-model.
| Feature | Description |
|---|---|
| Model name | wan3.0-video |
| prompt length | ≤ 20000 characters |
| Resolution | 480P, 720P, 1080P (default) |
| Aspect ratio | adaptive (default), 16:9, 4:3, 1:1, 3:4, 9:16 |
| Duration | [2, 30] seconds, default 5; with video input, input + output ≤ 30 seconds; -1 enables smart duration mode |
| Audio output | Controlled by the audio parameter; audio is included by default |
| Text-to-video | Pass only prompt, without media |
| Image-to-video | first_frame (first frame) / first_frame + last_frame (first and last frames) |
| Reference-to-video | reference_image (≤10 images) / reference_video (≤5 clips) / reference_audio (≤5 clips) |
| Reference file | file type (≤1), cannot be used together with link |
| Reference link | link type (≤1), cannot be used together with file |
| Character reference | Use "Image 1/Image 2" in the prompt to reference images, "Video 1/Video 2" to reference videos, and "Audio 1/Audio 2" to reference audio |
| Mode exclusivity | reference_xx / file / link cannot be mixed with first_frame / last_frame |
| Watermark | Controlled by the watermark parameter; not added by default |
| Random seed | seed parameter, [0, 2147483647] |
5. FAQ
Q: What are the main differences between Wan3.0 and Wan2.7?
A: Wan3.0 is an All-in-One unified model. It no longer distinguishes sub-models such as t2v, i2v, r2v, and videoedit; the single model name wan3.0-video supports all scenarios. The main improvements include:
- Videos up to 30 seconds long (Wan2.7 maximum is 15 seconds)
- New 480P resolution tier
- New
adaptiveaspect ratio - New
duration: -1smart duration mode - New
file(file) andlink(web link) reference types - New
reference_audioreference audio type - prompt character limit raised to 20000 (5000 for Wan2.7)
- Reference image limit raised to 10 (Wan2.7 allows 5 materials in total)
Q: Can reference_xx / file / link be mixed with first_frame / last_frame?
A: No. These two kinds of modes are mutually exclusive and cannot be mixed in the same request. If you pass both reference_image and first_frame, the API returns an error: The two modes are mutually exclusive.
Q: How does the duration = -1 smart duration mode work?
A: When duration is set to -1, the model automatically recommends a suitable video duration based on the input prompt, media materials, and content intent. This suits cases where you are unsure of the best duration or want the model to decide on its own.
Q: How does the ratio = adaptive aspect ratio work?
A: When ratio is adaptive (the default), the model automatically recommends a suitable aspect ratio based on the input media's proportions and the generation intent. If you need a specific aspect ratio, you can specify a value such as 16:9 or 9:16 manually.
Q: How is duration calculated when there is video input?
A: With video input (when reference_video is passed), the total input video duration + output video duration cannot exceed 30 seconds. For example, if the total input video duration is 10 seconds, duration can be set to at most 20. Billing is based on the total duration (input + output).
Q: How do I migrate from the official API to BeeRoute?
A: Just two steps:
- Replace the request domain with
https://beeroute.ai(removing the{WorkspaceId}prefix) - Replace the API Key with your BeeRoute platform key
All other paths, request headers, request bodies, and response formats are fully compatible, so no code logic changes are needed.
Q: How can I convert a temporary video link into a permanent link?
A: It cannot be converted directly. The correct approach is for the backend service to download the video file after obtaining the video_url, then upload it to a permanent object storage service to generate a new permanent access link. The video_url is valid for 24 hours.
Q: What does the order of materials in the media array mean?
A: In reference-to-video mode, the array order determines the numbers used to reference materials in the prompt. The 1st reference_image corresponds to "Image 1", the 2nd corresponds to "Image 2"; the 1st reference_video corresponds to "Video 1", and so on. Images and videos are counted separately, so Image 1 and Video 1 can both exist.
Q: What is the RPS limit of the query API?
A: The query API's default RPS is 20. A polling mechanism with a reasonable query interval (such as 15 seconds) is recommended. If you need higher-frequency queries or event notifications, consider configuring asynchronous task callbacks.
Last updated 2026-11-27 · Markdown source · llms.txt