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

Lightricks/

LTX-Compositing

Partner

from $0.20 / second

*

LTX Compositing by Lightricks blends an element pasted into a video so it looks filmed there. It matches the element's lighting, color, shadows and reflections to the scene and cleans up its edges, keeping the background, size, frame rate and length, up to 4K.

Public
Lightricks/LTX-Compositing cover image
api

Input

Please upload a video file

Prompt

Describe the element you added, such as what it is and where it sits. Optional. (Default: empty)

You need to log in to use this model

Log in

Settings

Output

Model Information

LTX Compositing by Lightricks blends an element you pasted into a video so it looks like it was filmed there. Put a person, animal or object over your background footage in any editor, export that rough composite, and the model matches the element's lighting, color, shadows and reflections to the scene, cleaning up the edges as it goes. The background stays as it was.

  • One video in, one video out, at the same size, frame rate and length
  • An optional prompt that says what you added
  • Source audio is kept

In the sample above, the top half is the rough composite: a dog filmed at night, nearly black, pasted onto a sunny tropical beach. It looks cut out. The bottom half is the result: the same dog in bright midday sun, its golden coat lit like the sand around it and a hard shadow under its feet.

Input

video, required: the rough composite. An https URL (up to 100 MB), or a data URI, base64 or file upload (up to 15 MB encoded). MP4, MOV or MKV, encoded as H.264 or H.265.

  • Constant 20 to 60 fps, up to 20 seconds
  • Long side 448 to 3840 px, short side 256 to 2176 px, landscape or portrait
  • The maximum number of frames depends on the size:
Input sizeMax framesAbout, at 24 fps
up to 1280x7201,68920 s
up to 1920x108076120 s
up to 2560x144041717 s
up to 3840x21601857 s

Other sizes take the cap of the smallest listed size with at least as many pixels.

prompt, optional: describe the element you added and where it is, for example "A golden retriever trotting across the white sand of a sunny tropical beach".

Output

video_url: an H.264 MP4 at the input's size, frame rate and frame count. An odd width or height is padded by one pixel.

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.20
up to 1080 px$0.40
up to 1440 px$0.80
up to 2176 px$1.60

A 4-second 1080p clip costs $1.60.

Example

curl -X POST https://api.deepinfra.com/v1/inference/Lightricks/LTX-Compositing \
  -H "Authorization: bearer $DEEPINFRA_TOKEN" \
  -F video=@rough_composite.mp4 \
  -F 'prompt=A golden retriever trotting across the white sand of a sunny tropical beach'
copy

The request returns when the job is done, typically in one to three 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.