Wan 2.7 VideoEdit
Restyle, replace, or transform existing clips with a prompt — Alibaba Wan 2.7 VideoEdit.
POST /v2/videos/edit — model: "wan-2.7-videoedit"
Take an existing video and rewrite it with a prompt. Wan 2.7 VideoEdit handles outfit swaps, background replacement, restyling (film grain, animation, color regrade), and other prompt-driven transformations while preserving subject identity and motion. An optional reference image can anchor a target look.
See Video Editing overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
wan27VideoeditParams.video | string | Yes | — | Source video URL (mp4, mov, or webm). |
wan27VideoeditParams.reference_image | string | No | — | Optional reference image URL anchoring the target look. |
wan27VideoeditParams.resolution | string | No | "1080p" | Output resolution: "720p" or "1080p". |
wan27VideoeditParams.aspect_ratio | string | No | "auto" | One of "auto", "16:9", "9:16", "1:1", "4:3", "3:4". |
wan27VideoeditParams.audio_setting | string | No | "auto" | "auto" regenerates a soundtrack; "origin" keeps the source audio. |
wan27VideoeditParams.duration | number | No | probed | Output duration in seconds (integer, 2–10). If omitted the route probes the source video and bills ceil(duration). |
wan27VideoeditParams.negative_prompt | string | No | — | Elements to avoid in the edited video. |
wan27VideoeditParams.seed | number | No | — | Random seed for reproducible generation. |
The top-level prompt field is required.
Credit cost
Pricing is per second of output video.
| Variant | Credits / second |
|---|---|
default (any resolution) | 17 |
If duration is supplied it is used directly. Otherwise the route probes the input video via ffprobe and charges 17 × ceil(duration). A 6-second edit therefore costs 17 × 6 = 102 credits.
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/edit \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "wan-2.7-videoedit",
"prompt": "Change the outfit to a red leather jacket and dark jeans",
"wan27VideoeditParams": {
"video": "https://example.com/clip.mp4",
"resolution": "1080p",
"aspect_ratio": "auto",
"audio_setting": "origin"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/edit",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"model": "wan-2.7-videoedit",
"prompt": "Change the outfit to a red leather jacket and dark jeans",
"wan27VideoeditParams": {
"video": "https://example.com/clip.mp4",
"resolution": "1080p",
"aspect_ratio": "auto",
"audio_setting": "origin",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/edit", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "wan-2.7-videoedit",
prompt: "Change the outfit to a red leather jacket and dark jeans",
wan27VideoeditParams: {
video: "https://example.com/clip.mp4",
resolution: "1080p",
aspect_ratio: "auto",
audio_setting: "origin",
},
}),
});
console.log(await response.json());Reference-anchored edit
curl -X POST https://api.apiframe.ai/v2/videos/edit \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "wan-2.7-videoedit",
"prompt": "Apply this character look to the subject",
"wan27VideoeditParams": {
"video": "https://example.com/clip.mp4",
"reference_image": "https://example.com/character.jpg",
"resolution": "1080p",
"duration": 6
}
}'Try it
/v2/videos/editTry it