Skip to main content

Alibaba WAN 2.7 integration

WAN 2.7 Video Edit transforms an existing video with natural-language instructions, reference images, or artistic style transfer while preserving the source footage.
WAN 2.7 Video Edit is an AI video editing API that transforms an existing video based on a text prompt. You provide an input video via video_url and describe the desired changes, optionally guiding the edit with up to 3 reference images. The model supports three editing modes: instruction-based editing, reference-image editing, and style transfer. Output is available at 720P (1280x720) or 1080P (1920x1080) resolution, and you can preserve the full input duration or cap it at up to 10 seconds.

Editing modes

Key capabilities

  • Instruction-based editing: Transform video content with natural-language prompts up to 5,000 characters
  • Reference-image editing: Guide edits with up to 3 reference images (JPEG, PNG, BMP, WEBP)
  • Style transfer: Apply artistic styles from reference images to the source video
  • Resolution options: 720P (1280x720) and 1080P (1920x1080) output
  • 5 aspect ratios: 16:9, 9:16, 1:1, 4:3, 3:4 (or preserve the input video’s ratio)
  • Duration control: Set duration to 0 to preserve the full input video, or cap output at up to 10 seconds
  • Audio handling: auto to generate/adapt audio, or origin to preserve the original track
  • Async processing: Webhook notifications or polling for task completion

Use cases

  • Scene retiming and relighting: Change time of day, weather, or lighting with a text instruction
  • Background replacement: Swap or restyle backgrounds while keeping subjects intact
  • Brand styling: Apply a consistent artistic look across video assets with style transfer
  • Reference-guided edits: Match a target look supplied through reference images
  • Content repurposing: Reframe or restyle existing footage for different channels

Edit videos with WAN 2.7

Edit a video by submitting the input video URL and a prompt to the API. The service returns a task ID for async polling or webhook notification.

POST /v1/ai/video-edit/wan-2-7

Create a new video edit task

GET /v1/ai/video-edit/wan-2-7

List all WAN 2.7 video edit tasks with status

GET /v1/ai/video-edit/wan-2-7/{task-id}

Get task status and results by ID

Parameters

Frequently Asked Questions

WAN 2.7 Video Edit is an AI video editing API developed by Alibaba. You provide an input video URL and a text prompt describing the changes you want. The model applies those edits and returns a task ID immediately, then you poll for results or receive a webhook notification when processing completes.
Three modes: instruction-based editing (prompt only), reference-image editing (prompt + image_urls), and style transfer (prompt + style reference image_urls). All three require an input video_url.
Input videos must be MP4 or MOV at a publicly accessible URL, 2-10 seconds long, 240-4096px per side with an aspect ratio between 1:8 and 8:1, and a maximum file size of 100MB.
Set duration to 0 to preserve the full duration of the input video. To cap the output, set duration to any value from 1 to 10 seconds.
Yes. Set additional_settings.audio_setting to origin to preserve the input video’s audio, or use auto (the default) to automatically generate or adapt audio for the edited video.
Rate limits depend on your subscription tier. See the Rate Limits page for current limits by plan.
See the Pricing page for current rates and subscription options.

Best practices

  • Clear instructions: Describe the exact change you want (“replace the background with a snowy mountain range”) for predictable edits.
  • Reference images: Provide clean, high-resolution reference images when using reference-image editing or style transfer.
  • Duration: Start with duration: 0 to preserve the source, then cap the length only when needed.
  • Audio: Use origin when the original audio must be retained (e.g., dialogue); use auto when the edit changes the scene significantly.
  • Negative prompts: Include: “watermark, text, distortion, blurry, extra limbs”
  • Production integration: Use webhooks for scalable applications instead of polling.
  • Error handling: Implement retry with exponential backoff for 503 errors during high-demand periods.