Skip to main content
POST
Video generation: create a Wan3.0 video task
Use the Playground on the right to test directly: put Bearer sk-your-api-key in Authorization, fill in model / input / parameters, and send. A successful submit returns a task_id; polling and download are covered below.
Wan3.0 covers every mode through one model ID — what you send as media decides what it does. The full async workflow, status table, billing rules and Python client live in the Wan3.0 overview.
  • Create requests must go to /wan/api/v1/services/aigc/video-generation/video-synthesis with the X-DashScope-Async: enable header. Do not use /v1/videos (media fields are dropped and billing is inaccurate).
  • duration must be an integer (5, not "5"); write resolution in uppercase (720P).
  • Terminal states are completed / failed, not SUCCEEDED.

Four modes, one field

first_frame / last_frame cannot be mixed with reference_* / file / link.
Image media (first_frame / last_frame / reference_image) also accept a base64 data URI (data:image/jpeg;base64,...) in addition to a public URL. Prefer base64 when the media cannot be hosted publicly or the provider’s fetch times out; submission time grows with image size, so set a client timeout of at least 300 seconds and do not blindly retry after a timeout. See Media Download Failures.

Prompt length limit

input.prompt is capped at 20,000 characters — each Chinese character or Latin letter counts as one character (not bytes, not tokens). The same rule applies to wan3.0-video and wan3.0-video-prime.
  • Over the limit is truncated, not rejected: the provider automatically truncates the part beyond 20,000 characters (the excess at the end is dropped), and the task is still created and billed — no 400. This is why an over-long prompt appears to be accepted: only the first 20,000 characters take effect.
  • Reference media do not change the cap: adding reference_image / reference_audio / reference_video does not lower the prompt limit. Media have their own limits: up to 10 reference images at ≤ 20 MB each; up to 5 reference videos, total ≤ 15 s and ≤ 100 MB each; up to 5 reference audios, total ≤ 15 s and ≤ 15 MB each.
  • Which prompt was used: the provider’s task result exposes output.orig_prompt, the original prompt submitted at task creation; there is no documented field for the post-truncation text. To know what actually took effect, use the first 20,000 characters of what you submitted (especially with prompt_extend: false).
  • Validate client-side: since going over the limit raises no error, check the length before submitting (for example if len(prompt) > 20000 in Python) to avoid silent truncation in production.

Code samples

Image-to-video (first frame)

Reference-to-video (reference image + reference video)

Reference video duration is billed. In the example above, a 10-second reference with a 5-second output bills 15 seconds. Input + output is capped at 30 seconds. See billing rules.

Polling and download

Price at a glance

The default rate is 98% of Alibaba’s official price; with the highest top-up bonus it drops to ~81.7%.
Prices match the provider’s official rates and may change along with them; the table above is for reference only, and the Model Pricing tab in the top navigation is authoritative: Model Pricing.

Full parameters, billing rules and best practices

Wan3.0 overview

Authorizations

Authorization
string
header
required

APIYI API key, format: Bearer sk-your-api-key

Headers

X-DashScope-Async
enum<string>
default:enable
required

Async switch. Must be set to enable, otherwise the upstream returns: current user api does not support synchronous calls

Available options:
enable

Body

application/json
model
enum<string>
default:wan3.0-video
required

Model ID. wan3.0-video is the standard variant; wan3.0-video-prime is the faster Prime variant at a higher unit price

Available options:
wan3.0-video,
wan3.0-video-prime
input
object
required
parameters
object

Response

Task created

output
object
request_id
string

Upstream request ID