# Precise Edit with context window

Ideogram publishes a public search API over its indexed pages; the guide is at https://ideogram.ai/agents/agent-access.

Source: https://ideogram.ai/tools/precise-edit/
Source observed: 2026-11-08T15:45:22.109Z
Last checked: 2026-11-08T15:45:22.109+00:00
Indexed: 2026-11-08T16:10:44.88+00:00

---

# Precise Edit with context window

We provide targeted image editing in the Ideogram 4.5 app and API. Edit images up to 8K while preserving the original pixels outside the working region. You can edit any area up to 2K at its original pixels, avoiding downscaling, seams, border artifacts, and color mismatch.

[Try Precise Edit](https://ideogram.ai/create/image/precise-edit/ideogram-4-5) · [API documentation](https://developer.ideogram.ai/api-reference/images/precise-edit/ideogram-4-5)

## How the context window works

We edit only the selected context window and place it back into the full image. Everything outside that window returns exactly as sent. A mask inside the window further narrows which pixels may change.

Without a context window, a 4K original is scaled down for editing and the result returns at 2K. With a context window, only the selected window is edited and the result keeps the original 4K resolution.

![A man in a workshop wearing a brown cap whose woven label lettering is garbled](https://storage.googleapis.com/ideogram-static/website/images/1dcc94a28c9638c2.webp)

![The cap fixed with a context window, carhartt woven cleanly on the label](https://storage.googleapis.com/ideogram-static/website/images/31859159dc0225bf.webp)

### Example prompt

> Repair the lowercase carhartt lettering on the woven label so every letter is separate and legible in dark brown thread, like the reference image.

### Reference images

![A man in a workshop wearing a brown cap whose woven label lettering is garbled](https://storage.googleapis.com/ideogram-static/website/images/1dcc94a28c9638c2.webp) ![The real cap, with its woven carhartt label](https://storage.googleapis.com/ideogram-static/website/images/a92f426f564d08e7.webp)

## Localized edits in Precise Edit

We use Precise Edit to recolor products, repair logos, replace objects, and remove objects. The page includes examples for **Ecommerce**, **Real estate**, **Fix detail**, **Interior design**, and **Architecture**. Ecommerce examples include product colorway, sneaker colorway, trainer color, trainer swap, coat color, bag color, and scarf print.

### Ecommerce example: product colorway

A campaign image is shown before and after changing a pale blue handbag to burgundy while retaining leather texture and lighting.

![Full campaign photo with a pale blue handbag](https://storage.googleapis.com/ideogram-static/website/images/afeb01087532bf24.webp)

![The same campaign photo with a burgundy handbag](https://storage.googleapis.com/ideogram-static/website/images/65c13ee6880ceb3d.webp)

- Full image: **4,016 × 6,016 px · 24.2 MP**
- Prompt: “Change the handbag from pale blue to burgundy. Keep the leather texture and lighting.”
- Photo: Christopher Macsurak, CC BY 2.0
- Sent: mask and context window
- Context window: `2538,2038,3562,3062`
- Returned: **4,016 × 6,016 px**, the same as the source

## API

### Endpoint

```http
POST /v2/image/precise-edit/ideogram-4-5
```

Send an image and prompt with a mask, a `context_window`, or both. The response is the full image at its own size.

### `context_window` values

| Value | Behavior and limits |
| --- | --- |
| `none` | Edits the whole image. This is the default. If the area is over 2048 × 2048 pixels, the result is scaled down to fit. |
| `auto` | Fits the window around the mask so the edit keeps the image’s full resolution. |
| `y_min,x_min,y_max,x_max` | Sets the window by corner pixels, with rows first. Each side is at least 256 px, the area is at most 2048 × 2048, and the aspect ratio stays within 6:1. |

A mask is required with `context_window=auto`. The mask has the same width and height as the image: black marks the area to change and white covers the rest. With coordinate-based windows, a mask is optional; if supplied, its black area must be inside the window.

The painted area can be very small, but the fitted working region must be at least 256 pixels on each side, no larger than 4,194,304 pixels, and have an aspect ratio between 1:6 and 6:1. For example, 2048 × 2048 and 1024 × 4096 fit the stated constraints.

[API documentation](https://developer.ideogram.ai/api-reference/images/precise-edit/ideogram-4-5)

## Price per image (USD)

| Quality | Price |
| --- | ---: |
| Very low | $0.008 |
| Low | $0.03 |
| Medium | $0.06 |
| High | $0.22 |

## Frequently asked questions

### What is Precise Edit in Ideogram?

Precise Edit changes one part of an image instead of regenerating the whole image. Mark the area, describe the change, and we work inside that area. It runs on Ideogram 4.5 and is available in the app and API.

### Does editing one detail change the rest of my image?

No. The edit is confined to the marked region, and everything outside it comes back as sent.

### What resolution do I get back?

With `context_window=auto` or coordinates, the result is returned at the uploaded width and height. With the default `none` mode, a large whole-image edit is downscaled to fit.

### Do I need to supply a mask?

Use a mask with `context_window=auto`. With coordinate-based regions, a mask is optional, but any black area must remain inside the named region.

### How small an area can I edit?

The painted area can be very small. The working region must be at least 256 pixels on each side, no more than 4,194,304 pixels, and between 1:6 and 6:1 in aspect ratio.

### What is the difference between the mask and the context window?

The mask identifies pixels that may change. The context window is the surrounding region the model reads so the edit fits naturally.

### Can I use Precise Edit from the API?

Yes. Post to the Ideogram 4.5 Precise Edit endpoint with your image, prompt, mask, and `context_window` as needed. See the [API reference](https://developer.ideogram.ai/) for request and response details.

[Try Precise Edit](https://ideogram.ai/create/image/precise-edit/ideogram-4-5) · [API documentation](https://developer.ideogram.ai/api-reference/images/precise-edit/ideogram-4-5)

---

[Read this page’s summary](https://ideogram.ai/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fideogram.ai%2Ftools%2Fprecise-edit%2F&trace=t_380edc68d53d)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Ideogram’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://ideogram.ai/agents/agent/faq?q={question}&trace=t_380edc68d53d`

[Tool guide and examples](https://ideogram.ai/agents/agent-access) · [OpenAPI](https://ideogram.ai/agents/api/public/v1/openapi.json) · [Page TLDR form](https://ideogram.ai/agents/agent-tools/page-tldr?url=https%3A%2F%2Fideogram.ai%2Ftools%2Fprecise-edit%2F). Opening a form does not execute a tool.