# Krea 3 Edit LoRA

> Edit and combine reference images with Krea 3, with up to 3 custom LoRAs applied.


## Overview

- **Endpoint**: `https://fal.run/krea/v3/edit/lora`
- **Model ID**: `krea/v3/edit/lora`
- **Category**: image-to-image
- **Kind**: inference
**Description**: Krea 3 Edit with your own LoRAs: edits and combines up to 4 reference images, cited <image-1> to <image-4> in the prompt, with the same prompt expansion, output-size and seed controls as Krea 3 Edit. loras: up to 3, each an HTTPS .safetensors URL (Krea 3 trainer, PEFT or kohya format, up to 2 GB) with a scale from 0 to 4 (default 1). Train LoRAs with krea/v3/trainer/edit. Output: images, prompt (the expanded prompt), seed.

**Tags**: image editing, multi-reference, lora, image-to-image, krea, krea-3



## Pricing

Your request will cost **$0.05** per megapixel, counting the output and reference images.

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:


- **`prompt`** (`string`, _optional_):
  Edit instruction. Refer to images as <image-1>, <image-2>, ... and regions as @label. May be omitted when a region has a note. Default value: `""`
  - Default: `""`

- **`image_urls`** (`list<string>`, _required_):
  Reference images to edit or combine (1-8). Order sets the <image-N> tags.
  - Array of string
  - Examples: ["https://v3b.fal.media/files/b/0a90b2a1/i89tMXz0SmiwL0ZvbnUvS_image_00240.png"]

- **`loras`** (`list<LoRAInput>`, _optional_):
  LoRA weights to apply (maximum 3), in the Krea 3 trainer, PEFT or kohya format. A file without alpha tensors is applied with alpha equal to its rank, as diffusers does.
  - Default: `[]`
  - Array of LoRAInput

- **`regions`** (`list<EditRegion>`, _optional_):
  Bounding boxes on reference images, with optional labels and editing notes. Requires high or ultra reasoning.
  - Array of EditRegion

- **`regional_edit`** (`boolean`, _optional_):
  With high or ultra reasoning, true preserves pixels outside the edit regions on the chosen canvas; false disables automatic region cropping and preservation. Omit to retain automatic preservation. With image_size=auto, keeps the canvas dimensions; an explicit image_size preserves the resized input. Billing uses the generated render dimensions. Use PNG for lossless output.

- **`image_size`** (`ImageSize | Enum`, _optional_):
  Output size, rounded up to multiples of 16, at most 4,220,160 total pixels (1680×2512). auto lets the prompt expander pick the aspect ratio at about 2048×2048. Default value: `auto`
  - Default: `"auto"`
  - One of: ImageSize | Enum

- **`reasoning_level`** (`ReasoningLevelEnum`, _optional_):
  How much effort the prompt expander spends reasoning about the given editing task. Higher reasoning effort means slower generation time. `medium` is Krea's fast mode, `high` is Krea's high mode and `ultra` is Krea's ultra mode. Default value: `"medium"`
  - Default: `"medium"`
  - Options: `"medium"`, `"high"`, `"ultra"`

- **`negative_prompt`** (`string`, _optional_):
  What to keep out of the image. Default value: `""`
  - Default: `""`

- **`seed`** (`integer`, _optional_):
  Latent noise seed. Use a new seed when editing a previous output again.

- **`output_format`** (`OutputFormatEnum`, _optional_):
  Output image format. Default value: `"png"`
  - Default: `"png"`
  - Options: `"png"`, `"jpeg"`

- **`sync_mode`** (`boolean`, _optional_):
  Return images as data URIs instead of saving them in request history.
  - Default: `false`

- **`enable_safety_checker`** (`boolean`, _optional_):
  Check output images for unsafe content. Disabling requires account authorization. Default value: `true`
  - Default: `true`



**Required Parameters Example**:

```json
{
  "image_urls": [
    "https://v3b.fal.media/files/b/0a90b2a1/i89tMXz0SmiwL0ZvbnUvS_image_00240.png"
  ]
}
```

**Full Example**:

```json
{
  "image_urls": [
    "https://v3b.fal.media/files/b/0a90b2a1/i89tMXz0SmiwL0ZvbnUvS_image_00240.png"
  ],
  "loras": [],
  "regions": [
    {}
  ],
  "image_size": "auto",
  "reasoning_level": "medium",
  "output_format": "png",
  "enable_safety_checker": true
}
```


### Output Schema

The API returns the following output format:

- **`images`** (`list<ImageFile>`, _required_):
  Generated images.
  - Array of ImageFile

- **`seed`** (`integer`, _required_):
  Latent noise seed used for generation.

- **`prompt`** (`string`, _required_):
  Prompt used for generation, after expansion.

- **`timings`** (`Timings`, _required_):
  Seconds spent in each generation stage; `inference` is the total GPU sampling time.

- **`has_nsfw_concepts`** (`list<boolean>`, _required_):
  Safety result for each image.
  - Array of boolean



**Example Response**:

```json
{
  "images": [
    {
      "url": "",
      "content_type": "image/png",
      "file_name": "z9RV14K95DvU.png",
      "file_size": 4404019
    }
  ],
  "prompt": ""
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/krea/v3/edit/lora \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_urls": [
       "https://v3b.fal.media/files/b/0a90b2a1/i89tMXz0SmiwL0ZvbnUvS_image_00240.png"
     ]
   }'
```

### 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(
    "krea/v3/edit/lora",
    arguments={
        "image_urls": ["https://v3b.fal.media/files/b/0a90b2a1/i89tMXz0SmiwL0ZvbnUvS_image_00240.png"]
    },
    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("krea/v3/edit/lora", {
  input: {
    image_urls: ["https://v3b.fal.media/files/b/0a90b2a1/i89tMXz0SmiwL0ZvbnUvS_image_00240.png"]
  },
  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);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/krea/v3/edit/lora)
- [API Documentation](https://fal.ai/models/krea/v3/edit/lora/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=krea/v3/edit/lora)

### 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
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
