# Ideogram V4.5 Edit

> Edit images with Ideogram 4.5: prompt edits with up to 4 reference images, optional mask, and a high-precision mode that keeps unchanged pixels intact.


## Overview

- **Endpoint**: `https://fal.run/ideogram/v4.5/edit`
- **Model ID**: `ideogram/v4.5/edit`
- **Category**: image-to-image
- **Kind**: inference
**Description**: Ideogram 4.5 editing. Provide a source image and a prompt, plus up to 4 reference images (3 when a mask is used). edit_precision: regular (default) or high, which uses Precise Edit and restores unchanged pixels. Quality: very_low to high for regular, low to very_high for high precision. Output keeps the source size by default (image_size auto).

**Tags**: realism, typography, editing



## Pricing

Your request will cost **$0.008** per image with Very Low, **$0.03** with Low, **$0.06** with Medium, and **$0.22** with High quality. The image size does not change the price.

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`, _required_):
  The generation or editing prompt.
  - Examples: "A colorful storefront with a sign reading hello"

- **`image_url`** (`string`, _required_):
  Primary source image to edit.

- **`reference_image_urls`** (`list<string>`, _optional_):
  Up to four references plus the primary source, or three references plus the primary source and mask.
  - Array of string

- **`mask_url`** (`string`, _optional_):
  Mask matching the source dimensions. Black edits, white preserves. Must contain both regions after rounding.

- **`edit_precision`** (`EditPrecisionEnum`, _optional_):
  regular uses Generate; high uses Precise Edit with unchanged-pixel restoration. Both always prepare structured edit instructions. Default value: `"regular"`
  - Default: `"regular"`
  - Options: `"regular"`, `"high"`

- **`quality`** (`QualityEnum`, _optional_):
  Quality tier for either edit precision. Defaults to medium. Default value: `"medium"`
  - Default: `"medium"`
  - Options: `"very_low"`, `"low"`, `"medium"`, `"high"`

- **`image_size`** (`ImageSize | Enum`, _optional_):
  auto preserves source geometry, downscaled by the provider if needed. Only unmasked regular edits accept named presets or custom sizes: dimensions >=256, multiples of 32, area <=4194304, ratio <=6:1. Named presets use standard fal dimensions. Default value: `auto`
  - Default: `"auto"`
  - One of: ImageSize | Enum

- **`num_images`** (`integer`, _optional_):
  Number of images to generate. Default value: `1`
  - Default: `1`
  - Range: `1` to `8`

- **`seed`** (`integer`, _optional_):
  Random seed. Omit to choose automatically.

- **`sync_mode`** (`boolean`, _optional_):
  Return image data directly in the response.
  - Default: `false`



**Required Parameters Example**:

```json
{
  "prompt": "A colorful storefront with a sign reading hello",
  "image_url": ""
}
```

**Full Example**:

```json
{
  "prompt": "A colorful storefront with a sign reading hello",
  "image_url": "",
  "edit_precision": "regular",
  "quality": "medium",
  "image_size": "auto",
  "num_images": 1
}
```


### Output Schema

The API returns the following output format:

- **`images`** (`list<File>`, _required_)
  - Array of File
  - Examples: [{"url":"https://v3.fal.media/files/penguin/lHdRabS80guysb8Zw1kul_image.png"}]

- **`seed`** (`integer`, _required_):
  Seed used for the random number generator
  - Examples: 123456



**Example Response**:

```json
{
  "images": [
    {
      "url": "https://v3.fal.media/files/penguin/lHdRabS80guysb8Zw1kul_image.png"
    }
  ],
  "seed": 123456
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/ideogram/v4.5/edit \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "A colorful storefront with a sign reading hello",
     "image_url": ""
   }'
```

### 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(
    "ideogram/v4.5/edit",
    arguments={
        "prompt": "A colorful storefront with a sign reading hello",
        "image_url": ""
    },
    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("ideogram/v4.5/edit", {
  input: {
    prompt: "A colorful storefront with a sign reading hello",
    image_url: ""
  },
  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/ideogram/v4.5/edit)
- [API Documentation](https://fal.ai/models/ideogram/v4.5/edit/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=ideogram/v4.5/edit)

### 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`
