# Chrono Edit Lora

> LoRA endpoint for the Chrono Edit model.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/chrono-edit-lora`
- **Model ID**: `fal-ai/chrono-edit-lora`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: image-to-image, image-editing



## Pricing

Your request will cost **$0.02** per image for 480p or **$0.03** per image for 720p.

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:


- **`image_url`** (`string`, _required_):
  The image to edit.
  - Examples: "https://v3b.fal.media/files/b/zebra/yRvp9rTyDeDGHnbmtcsgK_original-wave.jpg"

- **`prompt`** (`string`, _required_):
  The prompt to edit the image.
  - Examples: "Add a surfer to the wave in the illustration."

- **`num_inference_steps`** (`integer`, _optional_):
  The number of inference steps to perform. Default value: `8`
  - Default: `8`
  - Range: `2` to `50`

- **`guidance_scale`** (`float`, _optional_):
  The guidance scale for the inference. Default value: `1`
  - Default: `1`
  - Range: `0` to `10`

- **`enable_prompt_expansion`** (`boolean`, _optional_):
  Whether to enable prompt expansion. Default value: `true`
  - Default: `true`
  - Examples: true

- **`enable_temporal_reasoning`** (`boolean`, _optional_):
  Whether to enable temporal reasoning.
  - Default: `false`

- **`num_temporal_reasoning_steps`** (`integer`, _optional_):
  The number of temporal reasoning steps to perform. Default value: `8`
  - Default: `8`
  - Range: `2` to `12`

- **`resolution`** (`ResolutionEnum`, _optional_):
  The resolution of the output image. Default value: `"480p"`
  - Default: `"480p"`
  - Options: `"480p"`, `"720p"`

- **`enable_safety_checker`** (`boolean`, _optional_):
  Whether to enable the safety checker. Default value: `true`
  - Default: `true`

- **`seed`** (`integer`, _optional_):
  The seed for the inference.

- **`output_format`** (`OutputFormatEnum`, _optional_):
  The format of the output image. Default value: `"jpeg"`
  - Default: `"jpeg"`
  - Options: `"jpeg"`, `"png"`, `"webp"`

- **`sync_mode`** (`boolean`, _optional_):
  Whether to return the image in sync mode.
  - Default: `false`

- **`turbo_mode`** (`boolean`, _optional_):
  Enable turbo mode to use for faster inference. Default value: `true`
  - Default: `true`

- **`loras`** (`list<ChronoLoraWeight>`, _optional_):
  Optional additional LoRAs to merge for this request (max 3).
  - Default: `[]`
  - Array of ChronoLoraWeight



**Required Parameters Example**:

```json
{
  "image_url": "https://v3b.fal.media/files/b/zebra/yRvp9rTyDeDGHnbmtcsgK_original-wave.jpg",
  "prompt": "Add a surfer to the wave in the illustration."
}
```

**Full Example**:

```json
{
  "image_url": "https://v3b.fal.media/files/b/zebra/yRvp9rTyDeDGHnbmtcsgK_original-wave.jpg",
  "prompt": "Add a surfer to the wave in the illustration.",
  "num_inference_steps": 8,
  "guidance_scale": 1,
  "enable_prompt_expansion": true,
  "num_temporal_reasoning_steps": 8,
  "resolution": "480p",
  "enable_safety_checker": true,
  "output_format": "jpeg",
  "turbo_mode": true,
  "loras": []
}
```


### Output Schema

The API returns the following output format:

- **`images`** (`list<ImageFile>`, _required_):
  The edited image.
  - Array of ImageFile
  - Examples: [{"url":"https://v3b.fal.media/files/b/koala/2_gRhwfsnmNKYtZ_dveyV.jpg","file_name":"2_gRhwfsnmNKYtZ_dveyV.jpg","width":1152,"content_type":"image/jpeg","height":768}]

- **`prompt`** (`string`, _required_):
  The prompt used for the inference.
  - Examples: "The user wants to add a surfer to the wave in the illustration while preserving the original ukiyo-e woodblock art style. The surfer should be depicted mid-action, crouched low on a modern-style surfboard, carving through the crest of the wave with one arm extended for balance and the other gripping the board. Their wavy hair and athletic physique should match the dynamic motion. The background must remain unchanged, including the iconic Mount Fuji and the traditional Japanese text, to maintain the artwork's historical aesthetic and composition."

- **`seed`** (`integer`, _required_):
  The seed for the inference.



**Example Response**:

```json
{
  "images": [
    {
      "url": "https://v3b.fal.media/files/b/koala/2_gRhwfsnmNKYtZ_dveyV.jpg",
      "file_name": "2_gRhwfsnmNKYtZ_dveyV.jpg",
      "width": 1152,
      "content_type": "image/jpeg",
      "height": 768
    }
  ],
  "prompt": "The user wants to add a surfer to the wave in the illustration while preserving the original ukiyo-e woodblock art style. The surfer should be depicted mid-action, crouched low on a modern-style surfboard, carving through the crest of the wave with one arm extended for balance and the other gripping the board. Their wavy hair and athletic physique should match the dynamic motion. The background must remain unchanged, including the iconic Mount Fuji and the traditional Japanese text, to maintain the artwork's historical aesthetic and composition."
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/chrono-edit-lora \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://v3b.fal.media/files/b/zebra/yRvp9rTyDeDGHnbmtcsgK_original-wave.jpg",
     "prompt": "Add a surfer to the wave in the illustration."
   }'
```

### 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/chrono-edit-lora",
    arguments={
        "image_url": "https://v3b.fal.media/files/b/zebra/yRvp9rTyDeDGHnbmtcsgK_original-wave.jpg",
        "prompt": "Add a surfer to the wave in the illustration."
    },
    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/chrono-edit-lora", {
  input: {
    image_url: "https://v3b.fal.media/files/b/zebra/yRvp9rTyDeDGHnbmtcsgK_original-wave.jpg",
    prompt: "Add a surfer to the wave in the illustration."
  },
  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/chrono-edit-lora)
- [API Documentation](https://fal.ai/models/fal-ai/chrono-edit-lora/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/chrono-edit-lora)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
