> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Wan 2.7 Video Edit

> Rework existing footage with Wan 2.7 using text and an optional reference image to guide changes to the scene.

<Tip>
  1. Submit the request with `VIDGO_API_KEY`. A `task_id` is returned immediately. Keep it until the task reaches `finished` or `failed`.
  2. Use [Query Task Status](/api-manual/task-management/status) to retrieve the result. If you provide a `callback_url`, Vidgo sends the result to your [webhook](/api-manual/task-management/webhooks) when the task finishes or fails.
</Tip>

# Wan 2.7 Video Edit

Rework existing footage with Wan 2.7 using text and an optional reference image to guide changes to the scene.

## Available Models

* **alibaba/wan-2.7/video-edit** - Edit an existing video using written instructions.

## Duration Options

* **Automatic** - `duration: 0` is the default. The service detects the source-video duration, checks that it is **2-10 seconds**, then rounds down to whole seconds. The same whole-second duration is used for billing and upstream generation.
* **Explicit output length** - Set `duration` to `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10` seconds.
* With `duration: 0`, the source must be a publicly reachable HTTP(S) file no larger than **100 MiB**.

## Key Features

* Edit an existing video using written instructions.
* Choose from `720p`, `1080p` output resolutions.

## Advanced Parameters

Set `model` and optional `callback_url` at the request root. Place all workflow parameters, including output options, inside `input`.

Send only the input fields supported by this workflow. Unsupported `input` fields are rejected before credits are deducted. Input URLs must use HTTP(S), include a hostname, and contain no embedded credentials. Image inputs also accept image Data URIs or raw Base64. Image conversion and media validation complete before credits are deducted.

`duration` and `seed` also accept integer strings such as `"5"`; decimal numbers such as `5.0` and decimal strings such as `"5.0"` are rejected. Null or empty values use the default duration or omit the seed. Supported boolean fields also accept `0`/`1` and case-insensitive strings `true`/`false`, `1`/`0`, `yes`/`no`, `y`/`n`, and `on`/`off`; null omits the field. Surrounding whitespace is trimmed, and resolution values are case-insensitive.

### Prompt

* `prompt`: Required. Describe the requested changes. Maximum: **5,000 Unicode characters**.
* Leading and trailing whitespace is trimmed. A nonblank prompt is required.

### Reference Image URL

* `reference_image_url`: Optional. Provide an image to guide the edit as a public HTTP(S) URL, image Data URI, or raw Base64.

### Source Video

* `video_url`: Required. Provide the source video URL. Use a publicly accessible HTTP(S) URL.

### Aspect Ratio

* `aspect_ratio`: Optional. Accepted values: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`. Default: `16:9`.

### Resolution

* `resolution`: Optional. Accepted values: `720p`, `1080p`. Default: `720p`.

### Multi-Shot Generation

* `multi_shots`: Optional. Enable multi-shot generation. Use `true` or `false`.

### Audio Settings

* `audio_setting`: Optional. Supply the audio setting as a string.

### Seed

* `seed`: Optional. Set the generation seed. Integer from `0` to `2147483647`.

### Safety Checker

* `enable_safety_checker`: Optional. Control safety checking. Use `true` or `false`.

## Pricing

Usage equals output seconds multiplied by the selected resolution rate. See [Pricing](https://vidgo.ai/apis/api-pricing) for current rates.

Credits are deducted on submission and refunded if the task fails.


## OpenAPI

````yaml api-manual/video-series/alibaba-wan-2-7-video-edit.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Wan 2.7 Video Edit
  description: Wan 2.7 Video Edit through the Vidgo unified submit API.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Video Series
      summary: Wan 2.7 Video Edit
      description: >-
        Send only the fields shown for this workflow. Parameters from other
        workflows are rejected before credits are deducted.


        Prompts are trimmed and limited to 5,000 Unicode characters; required
        except for image-to-video, where blank or null prompts are omitted.
        Image inputs accept HTTP(S) URLs, image Data URIs, or raw Base64.
        Conversion and validation complete before charging. Other media require
        public HTTP(S) URLs.


        Usage equals output seconds multiplied by the selected resolution rate.
        See [Pricing](https://vidgo.ai/apis/api-pricing) for current rates.


        duration=0 (the default) detects source duration, checks that it is
        between two and ten seconds, then rounds down to whole seconds. The same
        whole-second duration is used for billing and upstream generation. An
        explicit duration selects the output length instead.


        Media inspected for duration must be a publicly reachable HTTP(S) file
        of at most 100 MiB when duration=0.


        `duration` and `seed` also accept integer strings such as `"5"`; decimal
        numbers such as `5.0` and decimal strings such as `"5.0"` are rejected.
        Null or empty values use the default duration or omit the seed.
        Supported boolean fields also accept `0`/`1` and case-insensitive
        strings `true`/`false`, `1`/`0`, `yes`/`no`, `y`/`n`, and `on`/`off`;
        null omits the field. Surrounding whitespace is trimmed, and resolution
        values are case-insensitive.
      operationId: submit_alibaba_wan_2_7_video_edit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              additionalProperties: true
              description: >-
                Keep model and callback_url at the root. Unknown root fields are
                ignored; unsupported input fields are rejected.
              properties:
                model:
                  type: string
                  enum:
                    - alibaba/wan-2.7/video-edit
                  example: alibaba/wan-2.7/video-edit
                  description: Vidgo public model ID. Must be `alibaba/wan-2.7/video-edit`.
                input:
                  type: object
                  properties:
                    prompt:
                      type: string
                      maxLength: 5000
                      minLength: 1
                      description: Prompt.
                    reference_image_url:
                      type: string
                      minLength: 1
                      description: Reference image url.
                    video_url:
                      type: string
                      format: uri
                      description: Video url.
                    aspect_ratio:
                      type: string
                      enum:
                        - '16:9'
                        - '9:16'
                        - '1:1'
                        - '4:3'
                        - '3:4'
                      default: '16:9'
                      description: Aspect ratio.
                    resolution:
                      type: string
                      enum:
                        - 720p
                        - 1080p
                      default: 720p
                      description: Resolution.
                    duration:
                      type: integer
                      default: 0
                      enum:
                        - 0
                        - 2
                        - 3
                        - 4
                        - 5
                        - 6
                        - 7
                        - 8
                        - 9
                        - 10
                      description: Duration.
                    multi_shots:
                      type: boolean
                      description: Multi shots.
                    audio_setting:
                      type: string
                      description: Audio setting.
                    seed:
                      type: integer
                      minimum: 0
                      maximum: 2147483647
                      description: Seed.
                    enable_safety_checker:
                      type: boolean
                      description: Enable safety checker.
                  additionalProperties: false
                  required:
                    - prompt
                    - video_url
                callback_url:
                  type: string
                  nullable: true
                  description: >-
                    Optional public HTTP(S) endpoint for task completion
                    notifications. HTTPS is recommended. Omit, use null, or use
                    an empty string to disable callbacks.
            examples:
              basic:
                summary: Basic workflow
                value:
                  model: alibaba/wan-2.7/video-edit
                  input:
                    prompt: >-
                      A quiet forest under soft morning light, with natural
                      detail.
                    video_url: https://example.com/video.mp4
                    aspect_ratio: '16:9'
                    resolution: 720p
                    duration: 0
              callback:
                summary: Receive a completion callback
                value:
                  model: alibaba/wan-2.7/video-edit
                  input:
                    prompt: >-
                      A quiet forest under soft morning light, with natural
                      detail.
                    video_url: https://example.com/video.mp4
                    aspect_ratio: '16:9'
                    resolution: 720p
                    duration: 0
                  callback_url: https://your-domain.com/callback
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - not_started
                          - running
                          - finished
                          - failed
                      created_time:
                        type: string
                        format: date-time
              example:
                code: 200
                data:
                  task_id: task-unified-example
                  status: running
                  created_time: '2026-09-10T08:00:00'
        '400':
          description: >-
            Invalid input, unsupported tier, inaccessible media, or insufficient
            credits
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '404':
          description: Unknown or disabled model
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '408':
          description: Request timed out
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: Invalid JSON or non-object request body
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '429':
          description: Rate or API key credit limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '502':
          description: Unable to create the upstream generation task
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '503':
          description: Model configuration or capability is not approved
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Use VIDGO_API_KEY.

````