Explainer / Finishing
Ideogram Precise Edit context window tested on a 24 MP photo
Without a mask, Ideogram's Precise Edit shrank a 24 MP photo to about 4 MP. A mask kept full size but the edit reached outside it; a manual window held.

Ideogram's Precise Edit can change one thing in a photo and leave the rest alone, but on a large photo its default setting quietly throws away most of the file. In our test, a 24-megapixel photo sent with no mask came back at about 4 megapixels, a sixth of the original, with no warning.
The fix is a setting called the context window. With a mask, or with a rectangle drawn by hand, the photo came back at full size. The mask had a catch of its own: on the full-size photo the edit also recoloured part of the mug the mask had left out. Only the hand-drawn rectangle kept everything outside it untouched.
The test photo is Lawrence Aritao's shot of an orange enamel mug with an aquamarine rim, 6016 x 4016 pixels, from Unsplash. We made seven calls on 13 November 2026, each asking for one change, the body from orange to navy: one for each mode on the original and on a 9.8-megapixel copy, plus one mask just over the size limit, all at medium quality. Every call carried this prompt:
Change the mug's enamel body from orange to deep navy blue. Keep its texture, highlights, shading, the aquamarine rim, the handle and the shadow on the table exactly as they are. Change nothing else in the image.

What is a context window?
It is the part of the photo the model works on at full resolution. Ideogram's API reference says only that region changes and the file keeps its width and height. Without one, the whole image is the edit, and Ideogram caps that at about 4.2 megapixels, the area of a 2048 x 2048 square, so anything larger comes back scaled down. You set it to auto, which fits it around your mask, or to four coordinates of your own.
What does each context_window mode return?
Only none shrank the photo. The other two modes returned it at full size, and they differed in what else they changed. Every call returned status 200.
The table counts a pixel as changed when any colour channel moved by more than 12 out of 255, outside the mask (auto), outside the window (manual) or outside a box around the mug (none, compared with the source scaled to the same size). The interior column is a patch inside the rim, which every mask left out.
| Mode | 9.8 MP copy returned | 24 MP original returned | Changed outside the edit area, 9.8 MP / 24 MP | Mug interior, 9.8 MP / 24 MP |
|---|---|---|---|---|
none |
2493 x 1664 | 2493 x 1664 | 0.12% / 0.12% | Recoloured / kept |
auto with a body mask |
3840 x 2563 | 6016 x 4016 | 0.12% / 0.68% | Kept / blue-violet |
| Manual 2048 x 2048 window | 3840 x 2563 | 6016 x 4016 | 0.0% / 0.0% | Recoloured / recoloured |
On the original, none returned about 4.1 million of 24.2 million pixels. Whether that is enough depends on where the image goes, and our guide to image sizes and aspect ratios lists what each platform asks for. It is not the master you sent.
What do the close-ups show?
The photo is low-key: most of the body sits in shadow close to black, so the recolour you can see is the lit strip on the left and the highlights. In every call that strip turned blue, and the rim and handle stayed close to the source. The interior is where the modes part ways.
The third crop is the surprise. The interior sat outside the mask, and Ideogram's tool page says the mask narrows the edit to the pixels that may change. In this one call the interior, beyond a rim that kept its aquamarine, turned a muddy blue-violet anyway. One call on one photo shows that this can happen, not how often.
What happens when the mask is just over the limit?
The request falls back to the shrunk whole-image edit and says nothing. Our rectangle over the mug and handle selected 4,202,000 pixels, 7,696 over the 4,194,304-pixel limit. It came back at 2493 x 1664 with status 200, the usual 6 cents and no warning field. The reference documents this fallback; in practice only the returned size gives it away. Count a mask's black pixels before you send it.
How do you set a manual context window?
Give four numbers, rows first: y_min,x_min,y_max,x_max, in the photo's own pixels, counted from the top-left corner. The maximum edges are exclusive, so the window measures x_max minus x_min wide and y_max minus y_min tall. It must sit inside the image, measure at least 256 pixels on each side, be no more than six times as long as it is wide either way, and hold at most 4,194,304 pixels.
Here is a centred 2048 x 2048 window on a 6016 x 4016 photo, in that order:
- y_min = (4016 - 2048) / 2 = 984
- x_min = (6016 - 2048) / 2 = 1984
- y_max = 984 + 2048 = 3032
- x_max = 1984 + 2048 = 4032
The field reads 984,1984,3032,4032, exactly at the limit. On our original, a square that size around the body could not also take in the handle.
A window draws the outer boundary and nothing inside it. With no mask, our window recoloured the interior along with the body, which is what you would expect: everything inside the window is fair game.
Which colour of the mask means edit?
Black is the part the model may change, and white is the part it must leave alone. The reference rounds values in between to the nearer of the two. The mask must match the image's width and height and contain both colours, and with a manual window its black area has to sit inside the window.
Does image size or mode change the price?
No. Every call cost 6 cents at medium quality, $0.42 for all seven. The reference says quality is the only field that sets the price, and the tool page listed 0.8 cents at very low quality, 3 cents at low, 6 cents at medium and 22 cents at high when we read it.
How does an agent keep a large photo at full size?
Send a mask with no more than 4,194,304 black pixels, or a manual window, then compare data[0].resolution in the response with the source's width and height. Where pixels outside the edit matter, also compare the output with the source outside the mask. In our run, a 200 at full size did not mean the edit had stayed inside the mask.
A person has to create an Ideogram account and buy credit before the first call, as our image to SVG API test describes. That piece sets Ideogram beside sellers an agent can pay per call with no account. The request is a form upload with the key in a header:
curl -X POST "https://api.ideogram.ai/v2/image/precise-edit/ideogram-4-5" \
-H "Api-Key: $IDEOGRAM_API_KEY" \
-F image=@mug_6016x4016.jpg \
-F context_window=984,1984,3032,4032 \
-F quality=medium \
-F prompt="Change the mug's enamel body from orange to deep navy blue."
Add ?dry_run=true to the URL first to get the price without running or billing anything. Ideogram's tool page says a mask placed inside a window confines the edit further. In our run at 24 MP the edit reached outside the mask, so if part of the window has to stay as it is, compare that part with the source too.
Frequently asked questions
Why did my Ideogram Precise Edit image come back smaller?
A whole-image edit, with context_window set to none or left at its auto default with no mask, is capped at about 4.2 megapixels, so a larger image is scaled down. Our 24 MP photo came back at 2493 x 1664.
Does a mask keep Ideogram Precise Edit at full resolution?
It did in our run, with masks under the 4,194,304-pixel limit; a mask just over it came back shrunk. On the 24 MP photo, though, the edit also changed pixels outside the mask.
Is the Ideogram mask black or white for the area to edit?
Black is where the edit goes and white is what stays, and the mask must be the same size as the image.
What is a context window in Ideogram?
It is the rectangle the model works on at the photo's own pixels, set by auto around a mask or by four coordinates, rows first. It lets an edit to a large photo keep the file's full width and height.
Does a bigger image cost more to edit with Precise Edit?
No. Ideogram's reference says only quality sets the price, and each of our calls cost 6 cents at medium on 13 November 2026, whatever the size or mode.
Read this article as Markdown Open in ChatGPT Open in Claude






