# Ideogram 4.6 Edit

> Ideogram 4.6 edits an image from a text instruction, with optional masks, reference images, and precision controls.


## Overview

- **Endpoint**: `https://fal.run/ideogram/v4.6/edit`
- **Model ID**: `ideogram/v4.6/edit`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: image editing, precise editing, inpainting



## Pricing

Billing is per output image. At **2K or below**, very low costs **$0.008**, low **$0.03**, medium **$0.06**, and high **$0.22**. Above 2K, low costs **$0.06**, medium **$0.20**, and high **$0.60** per image; very low is limited to 2K. The 2K tier covers up to 4,194,304 pixels. For example, two medium-quality 2K edits cost **$0.12**.

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

- **`context_window`** (`ContextWindowEnum`, _optional_):
  Region to edit with high edit_precision. none edits the whole image, downscaled to at most 4194304 pixels. auto requires mask_url and fits the region around the mask; an oversized mask falls back to whole-image editing. Set context_window_box instead to pick the region yourself. Localized edits preserve the original image resolution and every pixel outside the region. Default value: `"none"`
  - Default: `"none"`
  - Options: `"none"`, `"auto"`

- **`context_window_box`** (`ContextWindowBox`, _optional_):
  Explicit region to edit with high edit_precision, in source pixels with exclusive x_max/y_max. Must lie inside the image, measure at least 256 pixels per side, cover at most 4194304 pixels, and have an aspect ratio within 1:6 and 6:1. A mask may select only pixels inside it. Cannot be combined with context_window auto. Leave unset to edit the whole image.

- **`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. Only unmasked regular edits accept named presets or custom sizes: dimensions >=256, multiples of 32, at most 4096 per side, ratio <=6:1. very_low quality rejects a custom size larger than 2048x2048 in area. Named presets use standard fal dimensions. Outputs larger than 2048x2048 in area are billed at the 4K price. Default value: `auto`
  - Default: `"auto"`
  - One of: ImageSize | Enum

- **`background`** (`Enum`, _optional_):
  Regular edits only. transparent returns an image with an alpha channel; opaque forces a solid background. Leave unset for the model default.
  - Options: `"transparent"`, `"opaque"`

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

- **`enable_safety_checker`** (`boolean`, _optional_):
  Authorized callers may set false to request relaxed screening. Default value: `true`
  - Default: `true`



**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",
  "context_window": "none",
  "quality": "medium",
  "image_size": "auto",
  "num_images": 1,
  "enable_safety_checker": true
}
```


### 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.6/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.6/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.6/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);
```


## 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/ideogram/v4.6/edit)
- [API Documentation](https://fal.ai/models/ideogram/v4.6/edit/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=ideogram/v4.6/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
- [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`
