Wan 2.7 Video Editing
Video Series
Wan 2.7 Video Editing
Alibaba Wan wan2.7-videoedit instruction-based video editing
POST
Wan 2.7 Video Editing
Introduction
Call Alibaba Cloud Bailianwan2.7-videoedit through the Gravitex gateway to perform instruction-based editing on existing video (replace subjects, change clothing, adjust scene style, etc.). The API is async: submit a task first, then poll for results.
{task_id} is the id returned when the task is created.
Shares the unified video entry with Wan 2.7 Video Generation (T2V / I2V / R2V), but the model and
media parameter semantics differ—do not mix them.Authentication
string
required
Bearer Token, e.g.
Bearer sk-xxxxxxxxstring
required
Must be
application/jsonstring
Request trace ID; generate a unique value per request
Request parameters
string
required
Must be
wan2.7-videoeditstring
required
Video editing instruction
integer
Output video duration in seconds; example uses
4string
required
Raw prompt passed to Alibaba Cloud; recommend keeping it in sync with top-level
promptarray
required
Input media array; must include at least one video
string
required
Use
video for source video; reference_image for reference images (up to 4)string
required
Public HTTP/HTTPS URL or temporary URL meeting upstream requirements
string
720P or 1080Pboolean
Enable intelligent prompt rewriting
boolean
Add watermark
Request examples
Minimal request (video only):media array; use “图 1” in the prompt to refer to them. Up to 4 reference images are supported.
Create task response
On success, returns a standardized video task object (no outercode/message/data wrapper):
id for subsequent queries.
Query task
code/message/data wrapper:
Status handling
Clients should usedata.status as the platform standard status:
Upstream status is in
data.metadata.output.task_status (e.g. PENDING, SUCCEEDED); use for troubleshooting only, not as the primary status source.
Recommended poll interval: 5–15 seconds; avoid high-frequency polling.
Output video URL
On success, readdata.video_url first; data.url is also available (typically the same in the current adapter).
Output URLs are signed temporary addresses—do not store them permanently as business resource URLs. Download or copy to your own OSS within the validity period for long-term storage.
Duration and billing
In testing withduration: 4, upstream usage may look like:
Therefore
data.seconds = 8 does not mean the output is 8 seconds—it is the combined input + output billing duration.
Alibaba Cloud official billing: charged by “input video duration + output video duration”; input images are not billed. See official billing documentation.
