---
title: "WAN 2.7 - Edit video"
method: POST
path: "/v1/ai/video-edit/wan-2-7"
tags: ["video-edit"]
---

# WAN 2.7 - Edit video

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

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/video-edit/wan-2-7`
- Auth: API key in header `x-magnific-api-key`

Edit an existing video using WAN 2.7. Transform video content with text instructions, apply visual references, or transfer artistic styles.

**Three editing modes:**
- **Instruction-based editing**: Provide `prompt` with editing instructions (e.g., "change the sky to sunset")
- **Reference-image editing**: Provide `prompt` and `image_urls` to apply visual references to the video
- **Style transfer**: Provide `prompt` and `image_urls` with style reference images to transfer artistic styles

**Key features:**
- 720P and 1080P resolution support
- Up to 3 reference images for editing or style transfer
- Set `duration` to `0` to preserve the full input video duration
- Configurable audio handling: auto-generate or preserve original

## Request body

- VideoEditRequest: Edit an existing video using WAN 2.7. Supports three modes: - Instruction-based editing: provide `prompt` with editing instructions (e.g., "change the sky to sunset") - Reference-image editing: provide `prompt` and `image_urls` to apply visual references to the video - Style transfer: provide `prompt` and `image_urls` with style reference images to transfer artistic styles
  - `webhook_url` string, uri: Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
  - `prompt` string: Editing instructions describing the desired changes. For reference-image or style-transfer modes, describe how the reference images should be applied.
  - `negative_prompt` string: Elements to avoid in the edited video.
  - `video_url` string, uri, required: URL of the input video to edit. Must be publicly accessible. **Supported formats:** MP4, MOV **Duration:** 2-10 seconds **Dimensions:** 240-4096px per side, aspect ratio between 1:8 and 8:1 **Maximum file size:** 100MB
  - `image_urls` string[]: Reference images for editing or style transfer. Up to 3 images. **Supported formats:** JPEG, PNG, BMP, WEBP **Dimensions:** 240-8000px per side **Maximum file size:** 20MB each
  - `aspect_ratio` '16:9' | '9:16' | '1:1' | '4:3' | '3:4': Output video aspect ratio for editing. If not specified, the aspect ratio of the input video is preserved. - `16:9`: Landscape (widescreen) - `9:16`: Portrait (vertical, mobile-optimized) - `1:1`: Square - `4:3`: Standard landscape - `3:4`: Standard portrait
  - `resolution` '720P' | '1080P': Output video resolution: - `720P`: 720p HD (1280x720) - `1080P`: 1080p Full HD (1920x1080)
  - `duration` integer: Duration of the output video in seconds. Set to `0` to preserve the full duration of the input video.
  - `seed` integer: Random seed for reproducible generation. Use the same seed with identical parameters to reproduce results. Leave unset for random seed.
  - `additional_settings` VideoEditAdditionalSettings: Additional settings for video editing.
    - `audio_setting` 'auto' | 'origin': Audio handling mode for the edited video: - `auto`: Automatically generate or adapt audio for the edited video - `origin`: Preserve the original audio from the input video
    - `prompt_extend` boolean: Enable automatic prompt expansion to enrich shorter prompts with additional detail for better editing results.

## Response `200`

OK - The task exists and the status is returned

- InlineObject4
  - `data` TaskDetail1, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
