# Precise Edit: AI Inpainting and Local Image Editing | Ideogram

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

Source: https://ideogram.toolspoint.net/tools/precise-edit/
Source observed: 2026-12-03T22:08:18.211Z
Last checked: 2026-12-03T22:08:18.211+00:00
Indexed: 2026-12-03T22:33:14.073+00:00

---

# AI inpainting that edits one part of an image

Precise Edit lets us change a marked region of an image from a plain-language instruction while preserving the surrounding image. With a context window, we edit the region at its original pixels and return the full image at its original width and height. Precise Edit runs on Ideogram 4.5.

Sign in to edit. Each edit uses credits. Free credits are limited; afterward, a paid plan or purchased credits are required.

Upload a PNG, JPEG, WebP, GIF, BMP, or TIFF image up to **50 MB**, or start from an image made or saved in Ideogram. [Browse real edits in the examples](https://ideogram.toolspoint.net/tools/precise-edit/#examples).

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

## Precise Edit with context window

A mask identifies pixels that may change. The context window is the surrounding working region, up to **4,194,304 pixels** (about 4.2 megapixels). We edit that window at original pixels, so a large photo does not need to be downscaled; the area outside it is designed to return as sent. Compare every result with the original before use.

Through the API, an image up to **67 megapixels** and **50 MB** keeps full resolution when a context window is used.

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

*Only the window is edited, so the result keeps the original 4K resolution.*

## Precise Edit at a glance

| What it does | Changes one marked part from an instruction such as a new color, material, or object, while leaving the rest in place. |
|---|---|
| Image | One image per edit; upload PNG, JPEG, WebP, GIF, BMP, or TIFF up to 50 MB, or use an Ideogram image. |
| Selection | Draw a mask with **Magic wand**, **Brush**, **Lasso**, or **Rectangle**. Without a mask, the instruction applies to the whole image. |
| Instruction | Under **What should change?**, describe what should change and what should stay the same. |
| Reference images | Up to four; up to three when a mask is set because the mask uses one reference slot. |
| Images per run | One to eight under **Number of images**. |
| Quality | **Very low**, **Low**, **Medium**, or **High**; Medium is selected initially. |
| Result size | With a context window, the full image returns at the uploaded width and height. |
| Cost | Each edit uses credits; **Apply edit** shows the cost before running. Free credits are limited, then a paid plan or purchased credits is required. |

## Change one region and keep the surrounding image

1. **Open the image in Precise Edit.** Open an image you made or uploaded and select **Edit**.
2. **Mask the area to change.** Select **Add mask** or **Mask & context window** when available. Use **Magic wand**, **Brush**, **Lasso**, or **Rectangle**, then select **Done**.
3. **Describe the change.** Under **What should change?**, write the desired color, material, object, or other change. Add up to three reference images when matching a real product or logo.
4. **Apply and review.** Select **Apply edit**; the button shows the cost first. Compare the result with the original at full size, then download it from **Assets**.

For large images, **Mask & context window** offers **Auto** to fit a window around the mask, **Manual** to place it, or **None** to edit the whole image. Images too large for whole-image editing always use a window in the app.

### How each editing mode treats the rest of the image

| Mode | What you provide | Region edited | Image returned | Outside edited region |
|---|---|---|---|---|
| Whole image | Prompt, with or without a mask; API `context_window=none`, or `auto` without a mask | Whole image | Up to 4,194,304 pixels keeps its size. Through the API, larger images are scaled down; **8192 × 8192** returns at **2048 × 2048**. | No region is held back; review the whole image. |
| Automatic window | Mask; app **Auto** or API `context_window=auto` (default) | Window fitted around the mask, up to 4,194,304 pixels. If the mask exceeds that area, editing falls back to the whole image. | Original width and height | Designed to return as sent. |
| Window you set | Optional mask inside a manually placed window; API `context_window=y_min,x_min,y_max,x_max` | Set window | Original width and height | Designed to return as sent. |

## How to write an edit instruction

1. **Name the thing and the change.** “Change the three brass pendant shades to matte black” is more specific than “make it darker.”
2. **Say what must stay the same.** Example: “Change the suede heel panel to burnt orange suede. Keep the stitching, the white leather, and the lighting exactly as they are.”
3. **Describe material and finish, not only color.** Example: “Change the camel wool overcoat to a deep forest green wool. Keep its cut, texture, buttons.”
4. **For removals, say what continues behind.** Example: “Remove the potted fig tree completely. Continue the bare white wall, the skirting board, and the oak floor behind it.”
5. **Quote exact wording for text.** Example: “Repair the brand name on the label so it reads [brand name] in clean black serif capitals with even letter spacing, exactly like the reference image.”
6. **Make one change per edit.** Run one edit, review it, and start the next from the result.

## How to mask the part of the image to change

- Cover the complete object, including straps, cords, or related reflections.
- Leave a small margin to give the model room to blend.
- Keep hands, faces, labels, and logos that must remain unchanged outside the mask.
- Use **Magic wand** for a product part; add **Brush** strokes for missed areas and use **Rectangle** or **Lasso** for free areas.
- A small painted area can be edited at full size in a large photo with a context window of up to 4.2 megapixels around the mask.

## Replace an object with the real one

Add up to four reference images, or three when a mask is set. Use a packshot or correct label and refer to it in the instruction, for example: “Replace the grey trainers with the white trainers from the reference image, on both feet, matching their pose, angle, and the street light.” The reference guides the edit and is not edited itself.

## Choose quality and number of results

Quality options are **Very low**, **Low**, **Medium**, and **High**. Lower settings suit experiments; higher settings suit fine lettering, fabric texture, or print. **Number of images** runs the same edit one to eight times. Every result uses credits, and **Apply edit** shows the total beforehand.

## Context window comparison

### Without a context window

The 4K original is scaled down for editing and returns at 2K.

![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 without a context window, its label lettering still garbled](https://storage.googleapis.com/ideogram-static/website/images/6d1d4878a1301064.webp)

### With a context window

Only the window is edited, so the original 4K resolution is retained.

![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, the brand name woven cleanly on the label](https://storage.googleapis.com/ideogram-static/website/images/31859159dc0225bf.webp)

**Example prompt:**

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

## Localized edits and related tools

| Task | Tool | Why |
|---|---|---|
| Change, add, or replace something in one area | [Precise Edit](https://ideogram.toolspoint.net/tools/precise-edit/) | Describe the change and keep the image at its own size. |
| Replace a product background | [Precise Edit](https://ideogram.toolspoint.net/tools/precise-edit/) | Mask the background, describe the scene, and inspect product edges. |
| Remove an unwanted object | [Object Remover](https://ideogram.toolspoint.net/tools/object-remover/) | Brush over the object; the gap is filled without a prompt. |
| Recolor up to four product regions | [Colorways](https://ideogram.toolspoint.net/tools/colorways/) | Use preset colors or hex codes. |
| Apply a fabric or finish from a reference | [Material Swap](https://ideogram.toolspoint.net/tools/material-swap/) | Applies reference color, texture, pattern scale, and orientation. |
| Change readable text wording | [Text Layers](https://ideogram.toolspoint.net/features/text-layers/) | Turns detected lettering into editable text layers. |
| Cut out a subject | [Background Remover](https://ideogram.toolspoint.net/tools/background-remover/) | Returns the subject as a transparent PNG. |

Precise Edit can recolor products, repair logos, replace objects, and remove them. A handbag example changes pale blue to burgundy while preserving leather texture and lighting; a camel overcoat becomes forest green wool while retaining its cut, texture, and buttons. For multiple product colors from painted regions and hex codes, use [Colorways](https://ideogram.toolspoint.net/tools/colorways/).

A demonstrated ecommerce example uses a **4,016 × 6,016 px**, **24.2 MP** source and returns the same dimensions. The supplied context window is `2538,2038,3562,3062`. The photo is attributed to Christopher Macsurak, **CC BY 2.0**.

## Multi-round editing

Each result can become the source for the next edit. Open it, select **Edit**, and continue. Results retain the exact image size and are saved to **Assets**. Change one thing per round, inspect it, and restart from an earlier result if needed.

## Fix text, labels, and logos

Mask the lettering and a small margin, write exact capitals and spacing, add a clear reference when matching a real label or logo, use a high quality setting, and inspect every letter at full size. For already readable text, use [Text Layers](https://ideogram.toolspoint.net/features/text-layers/).

## Use cases

- **Ecommerce and product teams:** Change product colors or materials, swap a trainer, or repair a label before a listing goes live. [AI product image editing for ecommerce](https://ideogram.toolspoint.net/ecommerce/).
- **Real estate and property photos:** Remove cars, plants, or scaffolding and check that the result still represents the property honestly.
- **Interior design:** Try different pendant shades, doors, paintings, or roof materials before buying or building.
- **Marketing and campaign images:** Change a product, prop, or color without reshooting; a context window preserves the original image size.
- **Designers and retouchers:** Fix a client-review detail while preserving approved parts.

## Edit part of an image, remove something, or start over?

| Approach | What changes | Result size | Use it when |
|---|---|---|---|
| Precise Edit with context window | Masked pixels inside the window | Uploaded width and height | One detail in a large or finished image |
| Precise Edit without window | Whole image guided by instruction and mask | Up to 4,194,304 pixels; larger API images scale down | Smaller images or changes affecting most of the picture |
| Object Remover | Brushed object, filled with matching background | Uploaded image size | Removing something without writing an instruction |
| Background Remover | Everything except subject | Transparent PNG | Cutting out a product, person, or logo |
| New generation | Entire picture | Generated size | The whole picture should be different |

## Limits

- One source image per edit; app uploads up to **50 MB** in PNG, JPEG, WebP, GIF, BMP, or TIFF. API context-window edits support up to **67 megapixels** and 50 MB at full size.
- Context window maximum: **4,194,304 pixels**. If the mask exceeds that, automatic mode falls back to whole-image editing.
- A manually set window is at least **256 pixels on each side**, has an aspect ratio from **1:6 to 6:1**, and supports up to 4,194,304 pixels. App images longer than 6:1 require a window.
- Up to four references, or three with a mask; up to eight results per run.
- Each edit uses credits. Free credits vary by account; afterward a paid plan or purchased credits is required.
- Preservation outside the edit is the design goal, not a pixel guarantee. Results are new AI-generated images.

## Review before publishing

Compare against the original at full size; inspect mask edges for seams, halos, or old outlines; check shadows, reflections, and lighting; read every edited letter; verify product details; and ensure property or news edits do not mislead.

## API

Endpoint:

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

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

### Context-window values

```text
context_window=auto
```

Default. With a mask, fits the window around it; without a mask, edits the whole image.

```text
context_window=none
```

Edits the whole image. Images over **4,194,304 pixels** are scaled down to fit.

```text
context_window=y_min,x_min,y_max,x_max
```

Sets the window by corner pixels, rows first; maximum edges are exclusive.

### Terms and limits

- The mask has the same width and height as the image. **Black** marks pixels to edit; **white** marks pixels to keep; intermediate values round to the nearer value. The mask needs both black and white areas.
- Coordinates are image pixels measured from the top-left, rows first.
- API images can be JPEG, PNG, or WebP, up to 50 MB and **67,108,864 pixels**.
- A manual window is at least 256 pixels on each side, has a 1:6–6:1 aspect ratio, and is limited to 4,194,304 pixels.
- Requests return edited images directly by default. Set `async` or provide `webhook_url` to receive a `generation_id` and poll for the result.
- [Colorways](https://ideogram.toolspoint.net/tools/colorways/) and [Material Swap](https://ideogram.toolspoint.net/tools/material-swap/) interpret masks oppositely: white marks the region to change.

The API also offers [Inpaint with Ideogram 3.0](https://developer.ideogram.ai/api-reference/images/inpaint/ideogram-3), which repaints a masked region at the nearest supported resolution. Use Precise Edit when the result must retain exact width and height.

## Price per image (USD)

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

Quality is the only setting that changes price; image size and context-window size do not. Add `dry_run=true` to validate and price a request without running or billing it.

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

## More editing tools

- [Object Remover](https://ideogram.toolspoint.net/tools/object-remover/) — remove an object or person.
- [Background Remover](https://ideogram.toolspoint.net/tools/background-remover/) — create a transparent PNG.
- [Upscale](https://ideogram.toolspoint.net/features/upscale/) — enlarge 2×, 4×, or 8×.
- [Colorways](https://ideogram.toolspoint.net/tools/colorways/) — recolor up to four product parts.
- [Material Swap](https://ideogram.toolspoint.net/tools/material-swap/) — apply a reference fabric or finish.
- [Ad Resizer](https://ideogram.toolspoint.net/tools/ad-resizer/) — rebuild an ad for each placement size.
- [Text Layers](https://ideogram.toolspoint.net/features/text-layers/) — make detected lettering editable.

---

[Read this page’s summary](https://ideogram.toolspoint.net/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.toolspoint.net/agents/agent/faq?q={question}&trace=t_380edc68d53d`

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