PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runalibaba/wan/2.7/edit-videoInput Schema
6 parameters · 2 required · 4 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
video | string | Required | The URL of the input video to edit. |
prompt | string | Required | The editing instruction describing what changes to make. · Min length: 3 · Max length: 50000 · Default: "" |
images | string[] | Optional | Reference images to guide the video editing. |
duration | integer | Optional | Output video duration in seconds. 0 means match input video duration. When set (2-10), truncates from the start. · Options: 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 · Default: 0 02345678910 |
resolution | string | Optional | The resolution of the output video. · Options: 720p, 1080p · Default: "720p" 720p1080p |
audio_setting | string | Optional | Audio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve original audio from input video. · Options: auto, origin · Default: "auto" autoorigin |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "alibaba/wan/2.7/edit-video",
"prompt": "a beautiful sunset over mountains",
"duration": 0,
"resolution": "720p",
"audio_setting": "auto"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Wan 2.7 Edit Video
Wan 2.7 Edit Video revises an existing video according to natural-language direction while accounting for motion and scene continuity. Instead of treating frames independently, it carries the requested transformation through the clip so style, objects, environment, and subject appearance remain connected over time.
Use it for cinematic restyling, wardrobe or object changes, background transformation, atmosphere shifts, and other revisions that would be difficult to reproduce manually across every frame. State what changes, what remains original, and how the new treatment should behave during movement and camera changes.
Highlights
- Instruction-based video editing. Applies a written semantic or stylistic transformation to existing footage.
- Cross-frame edit consistency. Keeps the revised appearance stable through motion, cuts, and changing viewpoints.
- Source-motion preservation. Retains useful action and timing from the input while changing visual presentation.
- Cinematic style transfer. Reinterprets a clip’s color, material, lighting, or artistic language as a coherent sequence.
Pricing
| Configuration | Billing unit | Price |
|---|---|---|
| 0 seconds | 720p | $0.000 |
| 0 seconds | 1080p | $0.000 |
| 2 seconds | 720p | $0.200 |
| 2 seconds | 1080p | $0.300 |
| 3 seconds | 720p | $0.300 |
| 3 seconds | 1080p | $0.450 |
| 4 seconds | 720p | $0.400 |
| 4 seconds | 1080p | $0.600 |
| 5 seconds | 720p | $0.500 |
| 5 seconds | 1080p | $0.750 |
| 6 seconds | 720p | $0.600 |
| 6 seconds | 1080p | $0.900 |
| 7 seconds | 720p | $0.700 |
| 7 seconds | 1080p | $1.050 |
| 8 seconds | 720p | $0.800 |
| 8 seconds | 1080p | $1.200 |
| 9 seconds | 720p | $0.900 |
| 9 seconds | 1080p | $1.350 |
| 10 seconds | 720p | $1.000 |
| 10 seconds | 1080p | $1.500 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The project needs this exact video editing workflow | The intended task belongs to a different media route |
| Available source media matches every required field | Required assets or usage rights are unavailable |
| The brief can define subject, action, camera, and style | Output must be deterministic at frame or pixel level |
| Supported duration, resolution, and framing fit delivery | Final placement requires unsupported specifications |
| An asynchronous generation job fits production | A live or frame-synchronous response is mandatory |
Prompt Guide
Describe the result as a shot or design brief: identify subjects and references, state the action or transformation, specify environment and composition, then add camera behavior, lighting, pacing, style, sound, and preservation constraints where relevant. Use exact reference identifiers exposed by the local schema.
{
"duration": 5,
"images": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"prompt": "",
"resolution": "720p",
"video": "https://example.com/source.mp4"
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | alibaba/wan/2.7/edit-video |
| Input fields | video (string)<br>images (array)<br>prompt (string)<br>duration (integer; 0, 2, 3, 4, 5, 6, 7, 8, 9, 10)<br>resolution (string; 720p, 1080p)<br>audio_setting (string; auto, origin) |
| Required input | prompt, video |
| Output fields | url, content_type |
| Execution | Asynchronous job |
Related Models
alibaba/wan/2.7— Compare this concrete local family route.alibaba/wan/2.7/edit— Compare this concrete local family route.alibaba/wan/2.7/image-to-video— Compare this concrete local family route.

