# LTX Video 2.0 Retake

> Change sections of a video using LTX-2


## Overview

- **Endpoint**: `https://fal.run/fal-ai/ltx-2/retake-video`
- **Model ID**: `fal-ai/ltx-2/retake-video`
- **Category**: video-to-video
- **Kind**: inference


## Pricing

Your request will cost $0.10 per second.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`video_url`** (`string`, _required_):
  The URL of the video to retake
  - Examples: "https://v3b.fal.media/files/b/kangaroo/409mvS2FMwb6S7WcwkSW7_output.mp4"

- **`prompt`** (`string`, _required_):
  The prompt to retake the video with
  - Examples: "Remove the man"

- **`start_time`** (`float`, _optional_):
  The start time of the video to retake in seconds
  - Default: `0`
  - Range: `0` to `20`

- **`duration`** (`float`, _optional_):
  The duration of the video to retake in seconds Default value: `5`
  - Default: `5`
  - Range: `2` to `20`

- **`retake_mode`** (`RetakeModeEnum`, _optional_):
  The retake mode to use for the retake Default value: `"replace_audio_and_video"`
  - Default: `"replace_audio_and_video"`
  - Options: `"replace_audio"`, `"replace_video"`, `"replace_audio_and_video"`



**Required Parameters Example**:

```json
{
  "video_url": "https://v3b.fal.media/files/b/kangaroo/409mvS2FMwb6S7WcwkSW7_output.mp4",
  "prompt": "Remove the man"
}
```

**Full Example**:

```json
{
  "video_url": "https://v3b.fal.media/files/b/kangaroo/409mvS2FMwb6S7WcwkSW7_output.mp4",
  "prompt": "Remove the man",
  "duration": 5,
  "retake_mode": "replace_audio_and_video"
}
```


### Output Schema

The API returns the following output format:

- **`video`** (`VideoFile`, _required_):
  The generated video file
  - Examples: {"url":"https://v3b.fal.media/files/b/zebra/qM8Ve4OM8BcYnX23hoxd8_zvgLuC4m.mp4","file_name":"ltxv-2-retake-output.mp4","content_type":"video/mp4"}



**Example Response**:

```json
{
  "video": {
    "url": "https://v3b.fal.media/files/b/zebra/qM8Ve4OM8BcYnX23hoxd8_zvgLuC4m.mp4",
    "file_name": "ltxv-2-retake-output.mp4",
    "content_type": "video/mp4"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/ltx-2/retake-video \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "video_url": "https://v3b.fal.media/files/b/kangaroo/409mvS2FMwb6S7WcwkSW7_output.mp4",
     "prompt": "Remove the man"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/ltx-2/retake-video",
    arguments={
        "video_url": "https://v3b.fal.media/files/b/kangaroo/409mvS2FMwb6S7WcwkSW7_output.mp4",
        "prompt": "Remove the man"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/ltx-2/retake-video", {
  input: {
    video_url: "https://v3b.fal.media/files/b/kangaroo/409mvS2FMwb6S7WcwkSW7_output.mp4",
    prompt: "Remove the man"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/ltx-2/retake-video)
- [API Documentation](https://fal.ai/models/fal-ai/ltx-2/retake-video/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/ltx-2/retake-video)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
