Skip to content
Lightricks logo

LTX-2 Retake

video-to-video • Lightricks

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

LTX-2 Retake re-generates a chosen section of an existing video from a text prompt: the picture, the soundtrack, or both, while the rest of the clip stays as it was. Powered by LTX-2.3 Pro, with 1080p landscape or portrait output.

Model Info
More informationlink ↗

Providers

These providers serve this model, in order of preference. To choose providers for a request, use the provider ID with multi-provider routing.

ProviderIDPricing
Lightricks ↗lightricks
  • Default (per second): $0.10
  • @1080p (per second): $0.10

Usage

const response = await env.AI.run(
  'lightricks/ltx-2-retake',
  {
    video_uri: 'https://v4-kling.kechuangai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance_10s.mp4',
    start_time: 3,
    duration: 4,
    prompt:
      'The dancer leaps into a spinning jump and lands in a low, dramatic pose, same outfit, same room, same lighting',
    mode: 'replace_video',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "lightricks/ltx-2-retake",
  "input": {
    "video_uri": "https://v4-kling.kechuangai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance_10s.mp4",
    "start_time": 3,
    "duration": 4,
    "prompt": "The dancer leaps into a spinning jump and lands in a low, dramatic pose, same outfit, same room, same lighting",
    "mode": "replace_video"
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://examples.aig.cloudflare.com/lightricks/ltx-2-retake/re-shoot-a-moment.mp4"
  }
}

Examples

Re-score a Section — Keeps the picture and writes a new soundtrack for the first 5 seconds, timed to the dancer's steps.
const response = await env.AI.run(
  'lightricks/ltx-2-retake',
  {
    video_uri: 'https://v4-kling.kechuangai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance_10s.mp4',
    start_time: 0,
    duration: 5,
    prompt: "A punchy funk groove with slap bass and crisp hand claps, landing on the dancer's steps",
    mode: 'replace_audio',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "lightricks/ltx-2-retake",
  "input": {
    "video_uri": "https://v4-kling.kechuangai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance_10s.mp4",
    "start_time": 0,
    "duration": 5,
    "prompt": "A punchy funk groove with slap bass and crisp hand claps, landing on the dancer'\''s steps",
    "mode": "replace_audio"
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://examples.aig.cloudflare.com/lightricks/ltx-2-retake/re-score-a-section.mp4"
  }
}

Parameters

video_uri
stringrequiredformat: uriHTTPS URL of the source video: MP4, MOV or MKV (H.264/H.265), up to 4K, at least 73 frames, up to 32 MB
start_time
numberrequiredminimum: 0Start of the section to re-generate, in seconds. At least 2 seconds must follow it
duration
numberrequiredminimum: 2Length of the section to re-generate, in seconds (minimum 2)
prompt
stringrequiredminLength: 1maxLength: 5000What should happen in the re-generated section
mode
stringrequireddefault: replace_audio_and_videoenum: replace_audio, replace_video, replace_audio_and_videoRe-generate the audio, the picture, or both
resolution
stringenum: 1920x1080, 1080x1920Output resolution. The input is center-cropped to fit
video
stringformat: uriURL to the edited video

API Schemas (Raw)

Input
Output

Was this helpful?