Skip to main content
POST
/
vendors
/
alibaba
/
v1
/
wan2
/
video
/
edit
Wan2 Video Edit
curl --request POST \
  --url https://api.mulerouter.ai/vendors/alibaba/v1/wan2/video/edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "wan2.1-vace-plus",
  "function": "image_reference",
  "prompt": "<string>",
  "ref_images_url": [
    "<string>"
  ],
  "negative_prompt": "<string>",
  "obj_or_bg": [
    "obj"
  ],
  "size": "1280*720",
  "duration": 5,
  "prompt_extend": true,
  "seed": 1073741823
}
'
{
  "task_info": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "pending",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "error": {
      "code": 123,
      "title": "<string>",
      "detail": "<string>"
    }
  }
}
This API uses the wan2.1-vace-plus model for advanced video editing with multi-modal inputs. Please refer to Alibaba Cloud’s official documentation for more details.

Overview

The wan2.1-vace-plus model supports multi-modal input including multiple reference images and video editing capabilities. It’s designed for complex video generation tasks that require precise control over content and style.

Supported Model

wan2.1-vace-plus

Advanced video generation model with:
  • Multi-image reference support
  • Video editing capabilities
  • Both first frame and first+last frame support
  • Enhanced content and motion control

Features

  • Reference Images: Use multiple images to guide content and style
  • Keyframe Support: Define both first and last frames
  • Video Effects: Apply special effect templates
  • Complex Motion: Better handling of complex motion and physics

Specifications

PropertyValue
AudioNo (silent video only)
First Frame✅ Supported
First & Last Frame✅ Supported
Resolution720P only
Duration5 seconds (fixed)
Frame Rate30fps
FormatMP4 (H.264)

Example Requests

Multi-Image Reference

{
  "model": "wan2.1-vace-plus",
  "prompt": "Create a video combining the character from the first image with the environment from the second image, showing the character walking forward",
  "images": [
    "https://example.com/character.jpg",
    "https://example.com/environment.jpg"
  ]
}

With Negative Prompt

{
  "model": "wan2.1-vace-plus",
  "prompt": "A person performing a graceful dance move in a studio",
  "negative_prompt": "blurry, distorted, low quality, incomplete, extra limbs, poor motion",
  "images": [
    "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
  ]
}

Style Transfer Video

{
  "model": "wan2.1-vace-plus",
  "prompt": "Apply the artistic style from the reference image to create a video of the subject moving",
  "images": [
    "https://example.com/subject.jpg",
    "https://example.com/style_reference.jpg"
  ],
  "prompt_extend": true
}

Reproducible Output

{
  "model": "wan2.1-vace-plus",
  "prompt": "A character turning around to face the camera, smooth motion",
  "images": [
    "https://example.com/character.jpg"
  ],
  "seed": 42,
  "prompt_extend": false
}

Image Requirements

PropertyRequirement
FormatsJPEG, JPG, PNG, BMP, WEBP
File SizeMax 10MB per image
InputPublic URL or Base64 encoded data
Multiple ImagesSupported for content and style reference

Prompt Tips

When using wan2.1-vace-plus:
  1. Be specific about motion: Describe exactly what kind of movement you want
  2. Reference the images: Mention how the reference images should influence the output
  3. Describe transitions: If using multiple images, explain how they should blend or interact
  4. Use negative prompts: Exclude unwanted artifacts like distortion or blurriness

Use Cases

  • Character Animation: Bring still character images to life with motion
  • Style Transfer: Apply artistic styles to video content
  • Scene Composition: Combine elements from multiple images into animated sequences
  • Motion Design: Create videos with specific, controlled movements
  • Content Remixing: Generate new videos based on existing visual references

Parameters

images (Required)

  • Type: Array of strings
  • Description: Reference images for video generation
  • Can include subject images, style references, or compositional guides

prompt_extend

  • Default: true
  • Purpose: AI enhancement of prompts
  • Recommendation: Enable for short prompts, disable for detailed ones

seed

  • Range: 0 to 2,147,483,647
  • Purpose: Improves reproducibility
  • Note: Results may still vary due to model’s probabilistic nature

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

Response

202 - application/json

Accepted - Task created successfully

task_info
object