DeepInfra raises $107M Series B to scale the inference cloud — read the announcement

Lightricks/

LTX-Shot-Edit

Partner

from $0.12 / second

*

LTX Shot Edit by Lightricks carries an edit made to a still frame through a whole video shot. Edit one or more frames in any image editor, and it recolors, removes, adds or relights to match across every frame, following the original motion and camera, up to 1080p.

Public
Lightricks/LTX-Shot-Edit cover image
api

Input

Please upload a video file

Please upload an image file

Prompt

Required. One short instruction describing the change in the stills, starting with a verb such as add, remove, replace or relight. Naming what must stay unchanged helps keep the rest of the shot as it was

You need to log in to use this model

Log in

Settings

Image Time

Time of the frame that image edits, in seconds from the start of the video; defaults to 0, the first frame (Default: empty, 0 ≤ image_time)

Keyframes

Instead of image: several edited stills of the source clip with their times, in any order, for an edit that starts mid-clip, a clip that cuts, or a target seen from a new angle. In a multipart form, send the list as a JSON string; that field is capped at 1 MB, so use image URLs there

Edit Strength

How strongly the edit is applied. LTX's default is 1 (Default: empty)

Output

Model Information

LTX Shot Edit by Lightricks carries an edit you made to one still frame through a whole video shot. Take a frame of your clip, change it in any image editor or image-edit model (recolor clothing, remove an object, add a prop, relight the scene), and the model applies that change to every frame, following the original motion and camera.

  • Same size, frame rate and length as your clip; source audio is kept
  • One edited frame at time 0 is usually enough
  • A short prompt says what changed

In the sample above, the top half is the original shot. The first frame was edited to swap the brown leather apron for a blue canvas one, and the bottom half is the result: the new apron stays in place through the camera's push-in.

How to use it

  1. Export a frame of your clip at full resolution, usually the first one.
  2. Edit it. Keep the framing: don't crop or resize, since the aspect ratio must be within 1% of the video's.
  3. Send the clip as video, the edited frame as image, and a one-line prompt that starts with a verb such as add, remove, replace or relight. If you edited a later frame, set image_time to its time in seconds. If something else in the shot drifts, such as an object the model redraws, name it in the prompt as something to keep unchanged.

For an edit that starts mid-clip, a shot that cuts, or a subject seen from a new angle, send several edited frames as keyframes instead of image. Two keyframes on the same frame are rejected.

Inputs

FieldWhat it is
videoRequired. The source clip: an https URL (up to 200 MB), or a data URI, base64 or file upload (up to 15 MB encoded). MP4, MOV or MKV, H.264 or H.265. Constant 20 to 30 fps, up to 241 frames (about 10 s at 24 fps), up to 1920x1080 in landscape or portrait.
imageYour edited frame, PNG, JPEG or WebP: a file upload, an https URL (up to 15 MB), or a data URI or base64 (up to 7 MB). Give this or keyframes.
image_timeOptional. Time in seconds of the frame you edited; defaults to 0, the first frame.
keyframesInstead of image: a list of {"image": ..., "time": ...} edited frames, each an https URL or a data URI, with its time in seconds, rounded to the nearest frame.
promptRequired. One short instruction describing the change, for example "Replace the brown leather apron with a deep blue canvas apron. Keep everything else unchanged, including the glowing glass on the pipe".
edit_strengthOptional. How strongly the edit is applied; LTX's default is 1.

Output

video_url: an H.264 MP4 at the input's size, frame rate and frame count.

Pricing

Billed per started second of the output video, which is as long as your input, by its short side:

Short sidePrice per second
up to 720 px$0.12
up to 1080 px$0.17

A 4-second 1080p clip costs $0.68.

Example

One edited first frame, with local files:

curl -X POST https://api.deepinfra.com/v1/inference/Lightricks/LTX-Shot-Edit \
  -H "Authorization: bearer $DEEPINFRA_TOKEN" \
  -F video=@clip.mp4 \
  -F image=@first_frame_edited.png \
  -F 'prompt=Replace the brown leather apron with a deep blue canvas apron'
copy

Several edited frames, as JSON:

curl -X POST https://api.deepinfra.com/v1/inference/Lightricks/LTX-Shot-Edit \
  -H "Authorization: bearer $DEEPINFRA_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "video": "https://example.com/clip.mp4",
    "keyframes": [
      {"image": "https://example.com/frame_at_0s_edited.png", "time": 0},
      {"image": "https://example.com/frame_at_3s_edited.png", "time": 3}
    ],
    "prompt": "Replace the brown leather apron with a deep blue canvas apron"
  }'
copy

The request returns when the job is done, typically in one to two minutes; pass webhook to be called instead. The output link is hosted by Lightricks and isn't permanent, so save the video you want to keep.