Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json
model
enum<string>
required

Ali wan2.7-r2v model. Available value: wan2.7-r2v.

Available options:
wan2.7-r2v
prompt
string
required

Text prompt describing the desired video content and visual characteristics. Supports Chinese and English; each character, letter, or punctuation mark counts as one character. Excess characters are automatically truncated.

  • wan2.7-r2v: up to 5000 characters.

Reference naming conventions:

  • For Chinese prompts, reference images with markers like "图1", "图2" and reference videos with markers like "视频1", "视频2".
  • For English prompts, use markers like "Image 1", "Video 1" (capitalized first letter, space between letter and number).
  • The order matches the media array order. Images and videos are counted separately, e.g. "图1" and "视频1" can exist simultaneously.
  • If only one reference image or video is provided, you can simply use "reference image" or "reference video".

Scene description examples:

  • Direct reference: "图1 in 图2" (Image 1 is playing in Image 2).
  • Combined description: "The cat from Image 1 plays in the room from Image 2".

Multi-panel/storyboard images: When the reference image is a multi-panel (storyboard) image, describe the content in a multi-shot narrative format. You do not need to describe every panel; provide key shot content and the model will automatically identify the panel logic and intelligently fill in the details. For best results, it is recommended to provide only one multi-panel image per request.

media
object[]
required

Array of media assets, including images, videos, and audio. Supports image/video input as visual reference, and images can provide multi-view references for characters, props, scenes, etc.

Each element in the array is a media object containing type and url fields.

The order in the array defines the reference mapping order in the prompt. Images and videos are counted separately, so "Image 1" and "Video 1" can exist simultaneously.

  • The 1st reference_video in the array corresponds to "Video 1", the 2nd to "Video 2", etc.
  • The 1st reference_image in the array corresponds to "Image 1", the 2nd to "Image 2", etc.
size
enum<string>
default:1080P

Important: size directly affects cost. Confirm the model pricing before calling.

Output video resolution tier, controlling video clarity (total pixels).

wan2.7-r2v: available values 720P, 1080P. Default: 1080P.

Available options:
720P,
1080P
seconds
enum<string>
default:5

Important: seconds directly affects cost. Confirm the model pricing before calling.

Video duration in seconds.

  • wan2.7-r2v: default 5.
  • When reference assets include a video: range [2, 10].
  • When reference assets do not include a video: range [2, 15].
Available options:
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
ratio
enum<string>
default:16:9

Video aspect ratio.

Behavior logic:

  • If no first frame image is provided: generates video at the specified ratio.
  • If a first frame image is provided: the ratio parameter is ignored and the video is generated at an approximate ratio matching the first frame image's aspect ratio.

Available values and corresponding output resolutions:

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
Available options:
16:9,
9:16,
1:1,
4:3,
3:4
negative_prompt
string

Negative prompt describing content you do not want to see in the video. Limits unwanted visual elements. Supports Chinese and English, up to 500 characters.

Example: low resolution, error, worst quality, low quality, deformed, extra fingers, bad proportions, etc.

prompt_extend
boolean

Whether to enable intelligent prompt rewriting. When enabled, a large language model rewrites the input prompt for better results. Particularly effective for short prompts, but increases processing time.

  • true (default): enable intelligent rewriting.
  • false: disable intelligent rewriting.
watermark
boolean
default:false

Whether to add a watermark to the video. The watermark is positioned at the bottom-right corner with the text 'AI生成'.

  • false (default): no watermark.
  • true: add watermark.
seed
integer

Random seed, range [0, 2147483647]. If not specified, the system automatically generates a random seed. To improve reproducibility of generation results, it is recommended to fix the seed value.

Note: Due to the probabilistic nature of model generation, the same seed does not guarantee identical results every time.

Required range: 0 <= x <= 2147483647

Response

Submission successful. Returns the unified OpenAI-style video task object.

id
string

Public task ID.

task_id
string

Public task ID alias.

object
string
Example:

"video"

model
string

Model name.

status
enum<string>

Unified video task status.

Available options:
queued,
in_progress,
completed,
failed,
unknown
progress
integer

Task progress percentage.

created_at
integer<int64>

Unix timestamp in seconds.