Skip to main content
POST
Create Generation Task
This API supports Alibaba Tongyi Wanxiang (Wan2) video editing models. Please refer to Alibaba Cloud’s official documentation for more details.

Overview

Edit videos using the wan2.1-vace-plus model with multi-modal inputs. This model supports multiple video editing functions.

Supported Functions

Example Requests

Multi-image Reference

Video Repainting

Local Editing

Video Extension

Video Outpainting

Function Details

image_reference

  • Required: ref_images_url (1-3 images)
  • Required when multiple images: obj_or_bg array
  • Output: 720P resolution, 5s duration

video_repainting

  • Required: video_url, control_condition
  • Control conditions: posebodyface, posebody, depth, scribble
  • Strength: 0.0-1.0 (default 1.0)

video_edit

  • Required: video_url
  • Mask options: mask_image_url or mask_video_url
  • Mask types: tracking (follows motion), fixed (static)

video_extension

  • Required: prompt
  • Optional: first_frame_url, last_frame_url, first_clip_url, last_clip_url
  • With guidance video: requires control_condition

video_outpainting

  • Required: video_url
  • Scale options: top_scale, bottom_scale, left_scale, right_scale (1.0-2.0)

Video Requirements

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

wan2.1-vace-plus video editing entry point. Select a function and supply the parameters supported by that function.

model
enum<string>
required

Model name (only wan2.1-vace-plus is supported)

Available options:
wan2.1-vace-plus
function
enum<string>
required

Multi-image reference feature selector.

Available options:
image_reference
Allowed value: "image_reference"
prompt
string
required

Text description for the synthesized video (max 800 characters).

Maximum string length: 800
ref_images_url
string<uri>[]
required

Public URLs for 1-3 reference images (JPG/JPEG/PNG/BMP/TIFF/WEBP, 360-2000px, ≤10MB, ASCII URL). Required.

Required array length: 1 - 3 elements
negative_prompt
string

Negative prompt (max 500 characters).

Maximum string length: 500
obj_or_bg
enum<string>[]

Matches ref_images_url to label each image as entity ("obj") or background ("bg"). Required when multiple images are supplied; defaults to ["obj"] for a single image.

Available options:
obj,
bg
size
enum<string>
default:1280*720

Output resolution ("width*height"). Supported: 1280*720 (default), 720*1280, 960*960, 832*1088, 1088*832.

Available options:
1280*720,
720*1280,
960*960,
832*1088,
1088*832
duration
enum<integer> | null

Output duration (seconds). Fixed at 5.

Available options:
5
prompt_extend
boolean
default:true

Enable intelligent prompt rewriting (default true).

seed
integer

Random seed [0, 2147483647].

Required range: 0 <= x <= 2147483647
safety_filter
boolean | null
default:true

Enable content safety filter. Defaults to true. Set to false to disable content safety inspection.

Response

202 - application/json

Accepted - Task created successfully

task_info
object