> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ltx.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ltx.io/_mcp/server.

# Propagate edits from still frames across a shot

POST https://api.ltx.io/v2/video-shot-edit
Content-Type: application/json

Export a frame from your source clip, edit it in an image editor, and send it back with the source video and a short prompt describing the change. For example, recolor a jacket in an exported frame and ask the API to carry the new color across the shot. The source clip guides the motion, framing, and camera movement.

### Get the result

The response contains a job `id` and `created_at`. [Poll the job](/async-jobs) at `GET /v2/video-shot-edit/{id}`. When the job completes, download the H.264 MP4 from `result.video_url`.

The output has the same frame count, frame rate, and displayed frame size as the source clip. An odd width or height is padded by one pixel to an even number. The output uses the source audio when available. A source with no audio track gives a video-only MP4.

Billing is based on the length of the input video. See [Pricing](/pricing#shot-edit).

### Best practices

* **Write one short instruction.** Start with a verb such as *add*, *remove*, *replace*, or *relight*. Name the exact target if the shot contains similar objects. For example, “Replace the mug on the left side of the desk with a glass of water.” Describe the edit and let the source video guide the motion and framing.
* **Edit the original frame at full resolution.** Keep the source crop, framing, and size. Leave everything outside the intended edit as it appears in the source frame. A change elsewhere in the still can carry through to the result.
* **Start with one edited frame at `time: 0`.** Shot Edit follows the source video. One edited first frame is usually enough for a change that applies throughout the shot, such as restyling the scene.
* **Add keyframes when the edit needs to change during the clip.** Use them when an edit starts mid-clip, the clip cuts to a new shot or location, different subjects need different edits, or the target appears from a new angle.
* **Match each keyframe to its source frame.** Set `time` to the source frame's timestamp, keep its framing and aspect ratio, and use at most one keyframe per frame. When you show the same edit in several keyframes, keep the change consistent across them.

Try Shot Edit for object removal or replacement, product placement, changes to clothing or materials, relighting, or restyling a scene.

Reference: https://docs.ltx.io/api-documentation/api-reference/async-video-generation/submit-video-shot-edit

## Authentication

- `Authorization` header (bearer token, required) — API key authentication

## Request

### Headers

- `Idempotency-Key` (string, optional) — A unique value per job, 1 to 255 characters, not counting quotes. Resending the request with the same Idempotency-Key returns the same job. See [Idempotent Requests](/idempotent-requests).

### Body (application/json)

This endpoint expects a VideoShotEditRequest.

- `video_uri` (string, required) — The source clip as an HTTPS URL, a base64 data URI, or a [Cloud Storage](/input-formats#cloud-storage-upload) `storage_uri`. See [video formats and codecs](/input-formats#videos). Up to 200 MB from HTTPS or Cloud Storage and up to 15 MB as a data URI. Use a constant frame rate of 20–30 fps and up to 241 frames (about 10 seconds at 24 fps). The long side can be up to 1920 pixels and the short side up to 1080 pixels.
- `keyframes` (list of ShotEditKeyframe, required) — Edited stills from the source clip and their timestamps, in any order. Each must map to a different output frame.
- `prompt` (string, required) — Describe the visual change shown in the edited stills.
- `edit_strength` (double, optional, default: 1) — How strongly the edit is applied.

## Response

### 202

Job submitted successfully

- `id` (string, required) — Unique job identifier. Use this to poll for status.
- `created_at` (datetime, required) — ISO 8601 timestamp of when the job was created.

## Errors

### 400 Bad Request Error

The request is invalid or malformed

- `type` (enum, required) — Response type indicator
  - Allowed values: `error`
- `error` (ErrorError, required)

### 401 Unauthorized Error

Authentication failed

- `type` (enum, required) — Response type indicator
  - Allowed values: `error`
- `error` (ErrorError, required)

### 413 Content Too Large Error

The request body exceeds 32 MB

- `type` (enum, required) — Response type indicator
  - Allowed values: `error`
- `error` (ErrorError, required)

### 422 Unprocessable Entity Error

The Idempotency-Key was already used with a different request

- `type` (enum, required) — Response type indicator
  - Allowed values: `error`
- `error` (ErrorError, required)

### 429 Too Many Requests Error

Queue limit exceeded

- `type` (enum, required) — Response type indicator
  - Allowed values: `error`
- `error` (ErrorError, required)

### 500 Internal Server Error

An unexpected error occurred

- `type` (enum, required) — Response type indicator
  - Allowed values: `error`
- `error` (ErrorError, required)

## Types

### ShotEditKeyframe

- `image_uri` (string, required) — The edited still as an HTTPS URL, a base64 data URI, or a [Cloud Storage](/input-formats#cloud-storage-upload) `storage_uri`. Use PNG, JPEG, or WebP. See [size limits](/input-formats#size-limits). Keep the image's displayed aspect ratio within 1% of the source video. The API applies the still's orientation, then scales and center-crops it to the source video's frame size.
- `time` (double, required) — Time in seconds from the start of the source video track. The API rounds it to the nearest frame of the source clip. A time after the last frame and within the video track's duration maps to the last frame. Two keyframes that map to the same frame are rejected.

### ErrorError

- `type` (string, required) — Error type for programmatic handling
- `message` (string, required) — Human-readable error description

## Examples

### Edit a jacket from the first frame

**Request**

```json
{
  "video_uri": "https://example.com/shot.mp4",
  "keyframes": [
    {
      "image_uri": "https://example.com/edited-first-frame.png",
      "time": 0
    }
  ],
  "prompt": "Change the jacket from blue to red."
}
```

**Response**

```json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2026-01-15T10:00:00.000Z"
}
```

**SDK Code**

```python Edit a jacket from the first frame
import requests

url = "https://api.ltx.io/v2/video-shot-edit"

payload = {
    "video_uri": "https://example.com/shot.mp4",
    "keyframes": [
        {
            "image_uri": "https://example.com/edited-first-frame.png",
            "time": 0
        }
    ],
    "prompt": "Change the jacket from blue to red."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go Edit a jacket from the first frame
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ltx.io/v2/video-shot-edit"

	payload := strings.NewReader("{\n  \"video_uri\": \"https://example.com/shot.mp4\",\n  \"keyframes\": [\n    {\n      \"image_uri\": \"https://example.com/edited-first-frame.png\",\n      \"time\": 0\n    }\n  ],\n  \"prompt\": \"Change the jacket from blue to red.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```java Edit a jacket from the first frame
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.ltx.io/v2/video-shot-edit")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"video_uri\": \"https://example.com/shot.mp4\",\n  \"keyframes\": [\n    {\n      \"image_uri\": \"https://example.com/edited-first-frame.png\",\n      \"time\": 0\n    }\n  ],\n  \"prompt\": \"Change the jacket from blue to red.\"\n}")
  .asString();
```

### Guide the edit at two moments

**Request**

```json
{
  "video_uri": "https://example.com/shot.mp4",
  "keyframes": [
    {
      "image_uri": "https://example.com/edited-frame-at-2s.png",
      "time": 2
    },
    {
      "image_uri": "https://example.com/edited-frame-at-5s.png",
      "time": 5
    }
  ],
  "prompt": "Change the jacket from blue to red."
}
```

**Response**

```json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2026-01-15T10:00:00.000Z"
}
```

**SDK Code**

```python Guide the edit at two moments
import requests

url = "https://api.ltx.io/v2/video-shot-edit"

payload = {
    "video_uri": "https://example.com/shot.mp4",
    "keyframes": [
        {
            "image_uri": "https://example.com/edited-frame-at-2s.png",
            "time": 2
        },
        {
            "image_uri": "https://example.com/edited-frame-at-5s.png",
            "time": 5
        }
    ],
    "prompt": "Change the jacket from blue to red."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go Guide the edit at two moments
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ltx.io/v2/video-shot-edit"

	payload := strings.NewReader("{\n  \"video_uri\": \"https://example.com/shot.mp4\",\n  \"keyframes\": [\n    {\n      \"image_uri\": \"https://example.com/edited-frame-at-2s.png\",\n      \"time\": 2\n    },\n    {\n      \"image_uri\": \"https://example.com/edited-frame-at-5s.png\",\n      \"time\": 5\n    }\n  ],\n  \"prompt\": \"Change the jacket from blue to red.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```java Guide the edit at two moments
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.ltx.io/v2/video-shot-edit")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"video_uri\": \"https://example.com/shot.mp4\",\n  \"keyframes\": [\n    {\n      \"image_uri\": \"https://example.com/edited-frame-at-2s.png\",\n      \"time\": 2\n    },\n    {\n      \"image_uri\": \"https://example.com/edited-frame-at-5s.png\",\n      \"time\": 5\n    }\n  ],\n  \"prompt\": \"Change the jacket from blue to red.\"\n}")
  .asString();
```