curl --request POST \
--url https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation \
--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": [],
"size": "1280*720",
"duration": 5,
"prompt_extend": true,
"seed": 1073741823,
"safety_filter": true
}
'import requests
url = "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation"
payload = {
"model": "wan2.1-vace-plus",
"function": "image_reference",
"prompt": "<string>",
"ref_images_url": ["<string>"],
"negative_prompt": "<string>",
"obj_or_bg": [],
"size": "1280*720",
"duration": 5,
"prompt_extend": True,
"seed": 1073741823,
"safety_filter": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan2.1-vace-plus',
function: 'image_reference',
prompt: '<string>',
ref_images_url: ['<string>'],
negative_prompt: '<string>',
obj_or_bg: [],
size: '1280*720',
duration: 5,
prompt_extend: true,
seed: 1073741823,
safety_filter: true
})
};
fetch('https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'wan2.1-vace-plus',
'function' => 'image_reference',
'prompt' => '<string>',
'ref_images_url' => [
'<string>'
],
'negative_prompt' => '<string>',
'obj_or_bg' => [
],
'size' => '1280*720',
'duration' => 5,
'prompt_extend' => true,
'seed' => 1073741823,
'safety_filter' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation"
payload := strings.NewReader("{\n \"model\": \"wan2.1-vace-plus\",\n \"function\": \"image_reference\",\n \"prompt\": \"<string>\",\n \"ref_images_url\": [\n \"<string>\"\n ],\n \"negative_prompt\": \"<string>\",\n \"obj_or_bg\": [],\n \"size\": \"1280*720\",\n \"duration\": 5,\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan2.1-vace-plus\",\n \"function\": \"image_reference\",\n \"prompt\": \"<string>\",\n \"ref_images_url\": [\n \"<string>\"\n ],\n \"negative_prompt\": \"<string>\",\n \"obj_or_bg\": [],\n \"size\": \"1280*720\",\n \"duration\": 5,\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"wan2.1-vace-plus\",\n \"function\": \"image_reference\",\n \"prompt\": \"<string>\",\n \"ref_images_url\": [\n \"<string>\"\n ],\n \"negative_prompt\": \"<string>\",\n \"obj_or_bg\": [],\n \"size\": \"1280*720\",\n \"duration\": 5,\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Wan 2.1 Video Ace Plus Generation
Edit videos using the wan2.1-vace-plus model with multi-modal inputs and various editing functions.
curl --request POST \
--url https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation \
--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": [],
"size": "1280*720",
"duration": 5,
"prompt_extend": true,
"seed": 1073741823,
"safety_filter": true
}
'import requests
url = "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation"
payload = {
"model": "wan2.1-vace-plus",
"function": "image_reference",
"prompt": "<string>",
"ref_images_url": ["<string>"],
"negative_prompt": "<string>",
"obj_or_bg": [],
"size": "1280*720",
"duration": 5,
"prompt_extend": True,
"seed": 1073741823,
"safety_filter": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan2.1-vace-plus',
function: 'image_reference',
prompt: '<string>',
ref_images_url: ['<string>'],
negative_prompt: '<string>',
obj_or_bg: [],
size: '1280*720',
duration: 5,
prompt_extend: true,
seed: 1073741823,
safety_filter: true
})
};
fetch('https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'wan2.1-vace-plus',
'function' => 'image_reference',
'prompt' => '<string>',
'ref_images_url' => [
'<string>'
],
'negative_prompt' => '<string>',
'obj_or_bg' => [
],
'size' => '1280*720',
'duration' => 5,
'prompt_extend' => true,
'seed' => 1073741823,
'safety_filter' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation"
payload := strings.NewReader("{\n \"model\": \"wan2.1-vace-plus\",\n \"function\": \"image_reference\",\n \"prompt\": \"<string>\",\n \"ref_images_url\": [\n \"<string>\"\n ],\n \"negative_prompt\": \"<string>\",\n \"obj_or_bg\": [],\n \"size\": \"1280*720\",\n \"duration\": 5,\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan2.1-vace-plus\",\n \"function\": \"image_reference\",\n \"prompt\": \"<string>\",\n \"ref_images_url\": [\n \"<string>\"\n ],\n \"negative_prompt\": \"<string>\",\n \"obj_or_bg\": [],\n \"size\": \"1280*720\",\n \"duration\": 5,\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/alibaba/v1/wan2.1-vace-plus/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"wan2.1-vace-plus\",\n \"function\": \"image_reference\",\n \"prompt\": \"<string>\",\n \"ref_images_url\": [\n \"<string>\"\n ],\n \"negative_prompt\": \"<string>\",\n \"obj_or_bg\": [],\n \"size\": \"1280*720\",\n \"duration\": 5,\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Overview
Edit videos using the wan2.1-vace-plus model with multi-modal inputs. This model supports multiple video editing functions.Supported Functions
| Function | Description |
|---|---|
image_reference | Generate videos from 1-3 reference images |
video_repainting | Repaint/restyle an existing video |
video_edit | Local (masked) editing of video regions |
video_extension | Extend video with new content |
video_outpainting | Expand video canvas in any direction |
Example Requests
Multi-image Reference
{
"function": "image_reference",
"prompt": "A cat playing in the garden",
"ref_images_url": [
"https://example.com/cat.jpg",
"https://example.com/garden.jpg"
],
"obj_or_bg": ["obj", "bg"],
"size": "1280*720",
"duration": 5
}
Video Repainting
{
"function": "video_repainting",
"prompt": "Transform the scene into a cyberpunk style",
"video_url": "https://example.com/source.mp4",
"control_condition": "depth",
"strength": 0.8
}
Local Editing
{
"function": "video_edit",
"prompt": "Replace the background with a beach sunset",
"video_url": "https://example.com/source.mp4",
"mask_image_url": "https://example.com/mask.png",
"mask_type": "tracking"
}
Video Extension
{
"function": "video_extension",
"prompt": "Continue the scene with the character walking forward",
"first_clip_url": "https://example.com/clip.mp4",
"duration": 5
}
Video Outpainting
{
"function": "video_outpainting",
"prompt": "Expand to show more of the surrounding environment",
"video_url": "https://example.com/source.mp4",
"top_scale": 1.5,
"left_scale": 1.3,
"right_scale": 1.3
}
Function Details
image_reference
- Required:
ref_images_url(1-3 images) - Required when multiple images:
obj_or_bgarray - 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_urlormask_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
| Property | Requirement |
|---|---|
| Format | MP4 |
| Max size | 50MB |
| Min FPS | 16 |
| Max duration | 5s |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- Multi-image Reference
- Video Repainting
- Local Editing
- Video Extension
- Video Outpainting
wan2.1-vace-plus video editing entry point. Select a function and supply the parameters supported by that function.
Model name (only wan2.1-vace-plus is supported)
wan2.1-vace-plus Multi-image reference feature selector.
image_reference "image_reference"Text description for the synthesized video (max 800 characters).
800Public URLs for 1-3 reference images (JPG/JPEG/PNG/BMP/TIFF/WEBP, 360-2000px, ≤10MB, ASCII URL). Required.
1 - 3 elementsNegative prompt (max 500 characters).
500Matches 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.
obj, bg Output resolution ("width*height"). Supported: 1280*720 (default), 720*1280, 960*960, 832*1088, 1088*832.
1280*720, 720*1280, 960*960, 832*1088, 1088*832 Output duration (seconds). Fixed at 5.
5 Enable intelligent prompt rewriting (default true).
Random seed [0, 2147483647].
0 <= x <= 2147483647Enable content safety filter. Defaults to true. Set to false to disable content safety inspection.
Response
Accepted - Task created successfully
Show child attributes
Show child attributes

