---
title: "Submit an instruction-based video edit job"
method: POST
path: "/v2/videos/edit"
tags: ["Videos"]
---

# Submit an instruction-based video edit job

`POST /v2/videos/edit`

## Request

- Base URL: `https://api.apiframe.ai`
- URL: `https://api.apiframe.ai/v2/videos/edit`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Today wired to Wan 2.7 VideoEdit. Per-second pricing — `duration` is required, otherwise the route probes the input video and bills its length.

## Headers

- `Idempotency-Key` string

## Request body

- VideoEditRequest: Instruction-based video editing via Wan 2.7 VideoEdit.
  - `prompt` string, required
  - `model` 'wan-2.7-videoedit', required
  - `webhookUrl` string, uri
  - `webhookEvents` string[]
  - `wan27VideoeditParams` object, required
    - `video` string, required
    - `reference_image` string
    - `negative_prompt` string
    - `resolution` '720p' | '1080p'
    - `aspect_ratio` 'auto' | '16:9' | '9:16' | '1:1' | '4:3' | '3:4'
    - `audio_setting` 'auto' | 'origin'
    - `duration` integer
    - `seed` integer

## Response `202`

Job accepted and queued. Track via `GET /v2/jobs/{id}` or webhook.

- JobAccepted: Returned by every successful job submission.
  - `jobId` string, uuid, required
  - `status` 'QUEUED' | 'PROCESSING' | 'COMPLETED' | 'FAILED', required: Status at the moment the job record was persisted. Almost always `QUEUED`; idempotent replays may return the original status.

## Other responses

- `400`: Request body failed validation.
- `401`: Authentication failed (missing / invalid API key).
- `402`: Team has insufficient credits to run this model.
- `403`: Authenticated but the API key is inactive or lacks permission.
- `429`: Rate limit exceeded. Retry after the `Retry-After` seconds.
- `503`: Service temporarily unavailable (queue / DB outage). Retry with backoff.

---

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