Skip to content
Sign in

Apps / Precise Edit

Precise Edit with context window

Make surgical edits with context window in images up to 8K. You no longer have to downscale to edit, or stitch crops back with border and color artifacts.

You can edit any area up to 2K at its original pixels. Everything outside the context window stays untouched, so your image keeps its original resolution, with no seam and no color mismatch.

With and without a context window

The context window also improves editing quality in fine detail.

Without a context window

The 4K original is scaled down to edit, so the result comes back at 2K.

A man in a workshop wearing a brown cap whose woven label lettering is garbled
The cap fixed without a context window, its label lettering still garbled

With a context window

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

A man in a workshop wearing a brown cap whose woven label lettering is garbled
The cap fixed with a context window, carhartt woven cleanly on the label

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 The real cap, with its woven carhartt label

Localized edits in Precise Edit

Precise Edit recolors products, repairs logos, replaces objects, and removes them.

Ecommerce

Full campaign photo with a pale blue handbag
The same campaign photo with a burgundy handbag
Context window

4,016 × 6,016 px · 24.2 MP · full image

Full image, 4,016 by 6,016 pixels, before and after the edit
Full campaign photo with a pale blue handbag
The same campaign photo with a burgundy handbag

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

One field sets where the model works.

context_window names a region of the image. The model edits that region at its original pixels and places it back, and every pixel outside it returns exactly as sent. A mask inside the window narrows the edit to the pixels that may change.

  • Precise Edit

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

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

  • The context window

    context_window=none
    Edit the whole image. Over 2048 × 2048 pixels of area, it comes back scaled down to fit. This is the default.
    context_window=auto
    Fit the window around the mask, so the edit keeps the image's full resolution.
    context_window=y_min,x_min,y_max,x_max
    Set the window yourself, by its corner pixels, rows first. Each side is at least 256 px, the area is at most 2048 × 2048, and the aspect ratio stays within 6:1.
API documentation ↗

Price per image (USD)

Precise Edit
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 thing. You mark the area you want different, describe the change, and Ideogram works inside that area. It runs on Ideogram 4.5 and is available in the app and through the API.
Does editing one detail change the rest of my image?
No. The edit is confined to the region you mark, so everything outside it comes back as you sent it. That is the difference between a targeted edit and a regeneration that quietly shifts a crop, a color, or a texture somewhere else in the frame.
What resolution do I get back?
When you mark a region, either with context_window=auto or by naming the coordinates yourself, the result is returned at the width and height you uploaded. The default none mode behaves differently: it edits the whole image and downscales a large one to fit, so the result comes back smaller than you sent it.
Do I need to supply a mask?
With context_window=auto you send a mask and Ideogram fits the working region around it. The mask is the same width and height as your image, black over the area to change and white everywhere else. If you name the region by coordinates instead, a mask is optional, but if you send one its black area must sit inside that region.
How small an area can I edit?
The area you paint can be very small. The working region fitted around it has limits: at least 256 pixels on each side, no more than 4,194,304 pixels in area, and an aspect ratio between 1:6 and 6:1. Area is the constraint rather than shape, so 2048 by 2048 and 1024 by 4096 both fit.
What is the difference between the mask and the context window?
The mask says which pixels may change. The context window is the region Ideogram reads around it in order to make the change fit. A small marked area does not mean a small context window, because the window still has to satisfy the minimum size above.
Can I use Precise Edit from the API?
Yes. Post to the Precise Edit endpoint for Ideogram 4.5 with your image, a mask and the context_window field. See the API reference for the full request and response shape.

Precise Edit

Try Precise Edit with context window now.

Try Precise Edit API doc