BeeRoute logoBeeRoute.

Home / Docs / Wan3.0 Video Generation API Documentation

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 NameTypeDescription
wan3.0-videoAll-in-one reference video generationAll-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 prompt and media passed in input. It is currently in an invite-only beta.


Pricing

ResolutionPrice (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

ParameterTypeRequiredDescription
AuthorizationstringYesUser authentication token (Bearer sk-xxxx), using an API Key from the BeeRoute platform.
Content-TypestringYesapplication/json
X-DashScope-AsyncstringYesAsynchronous processing setting. Must be set to enable. Omitting this header results in an error.

Request Parameters (JSON Body)

ParameterTypeRequiredDescription
modelstringYesModel name. Fixed value: wan3.0-video.
inputobjectYesBasic input information. Either prompt or media is required. See input parameters below.
parametersobjectNoVideo processing parameters. See parameters below.

input parameters

ParameterTypeRequiredDescription
promptstringConditionalText 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.
mediaarrayConditionalArray 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

ParameterTypeRequiredDescription
typestringYesMedia material type. See media type valid values below.
urlstringYesMedia material URL or Base64-encoded data. See URL input formats below for supported formats.

media type valid values

type valueDescriptionQuantity limit
first_frameFirst-frame image, used strictly as the first frame of the videoUp to 1
last_frameLast-frame image, used strictly as the last frame of the videoUp to 1
reference_imageReference imageUp to 10
reference_videoReference videoUp to 5 clips, total duration ≤ 15 seconds
reference_audioReference audioUp to 5 clips, total duration ≤ 15 seconds
fileFileUp to 1; cannot be provided together with link
linkWeb linkUp 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_video in the array corresponds to Video 1 in the prompt, the 2nd corresponds to Video 2, and so on.
  • The 1st reference_image in the array corresponds to Image 1 in the prompt, the 2nd corresponds to Image 2, and so on.
  • The 1st reference_audio in the array corresponds to Audio 1 in the prompt, the 2nd corresponds to Audio 2, and so on.

Media material limits

Material typeFormatResolution/DurationSize
ImageJPEG, JPG, PNG (alpha channel not supported), BMP, WEBPEach side [240, 8000] px, aspect ratio ≤ 8:1≤ 20MB
Videomp4, movEach clip [1, 15] seconds, total duration ≤ 15 seconds, each side [240, 4096] px, aspect ratio ≤ 8:1≤ 100MB
Audiowav, mp3Total duration ≤ 15 seconds≤ 15MB
Filepptx, pdf, docx, etc.——
LinkWeb page URL——

URL input formats

FormatDescriptionExample
Public URLSupports the HTTP or HTTPS protocolhttps://xxx/xxx.png
Temporary URLSupports the OSS protocol; the temporary URL must be obtained by uploading a fileoss://dashscope-instant/xxx/xxx.png
Base64 encodingData format: data:{MIME_type};base64,{base64_data}data:image/png;base64,GDU7MtCZzEbTbmRZ......

parameters

ParameterTypeRequiredDescription
resolutionstringNoResolution tier of the generated video, which directly affects the cost. Default 1080P.
Valid values: 1080P, 720P, 480P.
ratiostringNoAspect ratio of the generated video. Default adaptive.
Valid values: adaptive (automatic), 16:9, 4:3, 1:1, 3:4, 9:16.
durationintegerNoDuration 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.
audiobooleanNoWhether the output video includes audio. Default true (with sound).
The price is the same with sound on or off.
seedintegerNoRandom seed, used to reproduce generation results. Range [0, 2147483647].
If omitted, the system generates one automatically.
watermarkbooleanNoWhether to add a watermark. Default false (no watermark).

Output video resolution by ratio and resolution

Resolution tierAspect ratioOutput video resolution (width*height)
480P16:9854*480
9:16480*854
1:1640*640
4:3720*540
3:4540*720
720P16:91280*720
9:16720*1280
1:1960*960
4:31104*832
3:4832*1104
1080P16:91920*1080
9:161080*1920
1:11440*1440
4:31648*1248
3:41248*1648

Note: When ratio is adaptive, 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_id is 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

ParameterTypeRequiredDescription
AuthorizationstringYesUser authentication token (Bearer sk-xxxx), using an API Key from the BeeRoute platform.

Path Parameters

ParameterTypeRequiredDescription
task_idstringYesThe 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

FieldTypeDescription
task_idstringTask ID. Queryable for 24 hours.
task_statusstringTask status. See the enum values below.
submit_timestringTask submission time. Format: YYYY-MM-DD HH:mm:ss.SSS.
scheduled_timestringTask execution time. Format: YYYY-MM-DD HH:mm:ss.SSS.
end_timestringTask completion time. Format: YYYY-MM-DD HH:mm:ss.SSS.
orig_promptstringThe original input prompt.
video_urlstringURL of the generated video. Returned when the task succeeds; valid for 24 hours.
codestringError code of a failed request. Not returned when the request succeeds.
messagestringDetails of a failed request. Not returned when the request succeeds.

task_status enum values

StatusDescription
PENDINGTask queued
RUNNINGTask processing
SUCCEEDEDTask succeeded
FAILEDTask failed
CANCELEDTask canceled
UNKNOWNTask does not exist or status is unknown

usage fields

FieldTypeDescription
video_countintegerNumber of generated videos. Fixed at 1.
durationfloatDuration of the generated video (seconds).
input_video_durationfloatDuration of the input video (seconds). 0.0 when there is no video input.
output_video_durationfloatDuration of the output video (seconds).
fpsintegerFrame rate of the generated video.
SRintegerResolution of the generated video. Example value: 720.
ratiostringAspect ratio of the generated video. Example value: 16:9.

request_id field

FieldTypeDescription
request_idstringUnique 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.

FeatureDescription
Model namewan3.0-video
prompt length≤ 20000 characters
Resolution480P, 720P, 1080P (default)
Aspect ratioadaptive (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 outputControlled by the audio parameter; audio is included by default
Text-to-videoPass only prompt, without media
Image-to-videofirst_frame (first frame) / first_frame + last_frame (first and last frames)
Reference-to-videoreference_image (≤10 images) / reference_video (≤5 clips) / reference_audio (≤5 clips)
Reference filefile type (≤1), cannot be used together with link
Reference linklink type (≤1), cannot be used together with file
Character referenceUse "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 exclusivityreference_xx / file / link cannot be mixed with first_frame / last_frame
WatermarkControlled by the watermark parameter; not added by default
Random seedseed 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 adaptive aspect ratio
  • New duration: -1 smart duration mode
  • New file (file) and link (web link) reference types
  • New reference_audio reference 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)

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:

  1. Replace the request domain with https://beeroute.ai (removing the {WorkspaceId} prefix)
  2. 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.

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