Skip to content
Sign in Contact sales

AI inpainting that edits one part of an image.

Mask the area to change and describe the edit in plain words. With a context window, Ideogram edits that region at its original pixels and returns the whole image at its original size; the context window depends on your account. Precise Edit runs on Ideogram 4.5.

or drop a PNG, JPEG, WebP, GIF, BMP or TIFF image, up to 50 MB

No image yet? Browse real edits in the examples

Sign in to edit. Each edit uses credits. Free credits are limited; after that, Precise Edit needs a paid plan or bought credits.

Precise Edit with context window

The mask marks the pixels that may change. The context window is the working region around it, up to 4.2 megapixels in area. Ideogram edits that window at its original pixels, so a large photo does not have to be downscaled, and the image outside the window is designed to come back as you sent it. Review the result against the original before you use it.

Through the API, an image up to 67 megapixels and 50 MB keeps its full resolution when the edit uses a context window.

Open Precise Edit API doc

The cap fixed with a context window, the brand name woven cleanly on the label
Only the window is edited, so the result keeps the original 4K resolution.

Overview

Precise Edit at a glance

AI inpainting, sometimes called generative fill, means changing one part of a picture and letting the model blend the change into the scene. These are the controls Precise Edit gives you in the Ideogram app.

What it does Changes one marked part of an image from an instruction in plain words, such as a new color, material or object, and leaves the rest of the picture in place.
Image One image per edit. Upload a PNG, JPEG, WebP, GIF, BMP or TIFF file up to 50 MB, or start from an image you made or saved in Ideogram.
Selection A mask you draw with Magic wand, Brush, Lasso or Rectangle. Without a mask, the instruction applies to the whole image.
Instruction Written under What should change? Say what should change and what should stay the same.
Reference images Up to four images that show the result you want, or three when a mask is set, because the mask uses one reference slot.
Images per run From one to eight, chosen under Number of images.
Quality Very low, Low, Medium or High. Medium is selected to start.
Size of the result With a context window, the whole image comes back at the width and height you uploaded.
Cost Each edit uses credits, and Apply edit shows the cost before it runs. Free credits are limited; after that, Precise Edit needs a paid plan or bought credits.

Inpainting in the app

Change one region and keep the surrounding image.

Inpainting means changing one marked part of an image while the rest stays in place. In the Ideogram app it takes four steps.

  1. Open the image in Precise Edit

    Open an image you made or uploaded and select Edit. Precise Edit opens with the image loaded.

  2. Mask the area to change

    Select Add mask (shown as Mask & context window when your account has the context window), mark the area with Magic wand, Brush, Lasso or Rectangle, and click Done.

  3. Describe the change

    Under What should change?, write the edit in plain words, such as a new color, material or object. Add up to three reference images when the result should match a real product or logo.

  4. Apply the edit and review it

    Click Apply edit. The button shows the cost before you run it. Compare the result with the original at full size, then download it from Assets.

For a large image, open Mask & context window if it is available on your account. In the mask editor, choose Auto to fit the window around your mask, Manual to place it yourself, or None to edit the whole image. An image too large to edit as a whole always uses a window, so the result keeps its exact size.

The examples below show product color changes in Ecommerce, label and logo repair in Fix detail, object replacement in Interior design, and object removal in Real estate.

How each editing mode treats the rest of the image

Mode What you provide Region Ideogram edits Image you get back Outside the edited region
Whole image You send a prompt, with or without a mask. In the API, that is context_window=none, or auto with no mask. The whole image An image up to 4,194,304 pixels keeps its size. Through the API, a larger image comes back scaled down to fit, so 8192 × 8192 returns at 2048 × 2048. In the app, an image too large to edit whole always uses an edit window. No region is held back, so review the whole image.
Automatic window You send a mask. In the app, choose Auto in the mask editor. In the API, use context_window=auto, which is the default. Ideogram fits a window around the mask, at most 4,194,304 pixels in area. If the mask covers more than that, the edit falls back to the whole image. The original width and height Designed to come back as you sent it
Window you set You place a window, with an optional mask inside it. In the app, choose Manual in the mask editor. In the API, send context_window=y_min,x_min,y_max,x_max. The window you set The original width and height Designed to come back as you sent it

Inside the window, the mask marks the pixels that may change. Compare the result with the original at full size before you publish it.

Writing the edit

How to write an edit instruction

The instruction is the only place you say what the new pixels should show. These patterns come from the edits in the examples on this page.

  1. Name the thing and the change

    Start with the object in the masked area and what it should become. Change the three brass pendant shades to matte black works better than make it darker, because the model knows both the target and the result.

  2. Say what must stay the same

    List the details that should survive the edit. Change the suede heel panel to burnt orange suede. Keep the stitching, the white leather, and the lighting exactly as they are. tells the model which neighbouring parts to leave alone.

  3. Describe material and finish, not only color

    Colors read differently on leather, silk or wool. Change the camel wool overcoat to a deep forest green wool. Keep its cut, texture, buttons keeps the fabric believable while the color changes.

  4. For removals, say what continues behind

    When something should disappear, describe the surface that replaces it: 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

    When lettering must read a certain way, spell it out and point to a reference: 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

    Two changes in one instruction compete for the same pixels. Run one edit, check it, then start the next edit from the result.

Masking

How to mask the part of the image to change

The mask decides which pixels may change. A good mask is the difference between a clean edit and a visible patch.

  1. Cover everything that should change

    The mask marks the pixels that may change. Paint the whole object, including a strap, a cord or a reflection that belongs to it, so no old color or shape is left at the edge.

  2. Leave a little margin

    A slightly generous mask gives the model room to blend the new pixels into the surroundings. A mask traced tightly to the edge can leave a visible seam.

  3. Keep what must not change outside the mask

    Hands, faces, labels and product logos next to the edit stay safer outside the mask. If a detail must stay exactly as it is, do not paint over it.

  4. Use Magic wand for one part of a product

    Magic wand selects one part with a click, such as a panel of a shoe. Add Brush strokes for anything it misses, and Rectangle or Lasso for a free area such as an empty table top.

  5. Mask small, edit large photos at full size

    The area you paint can be small. With a context window, Ideogram works on a region of up to 4.2 megapixels around the mask, so a detail in a large photo is edited at its original pixels.

Reference images

Replace an object in a photo with the real one

Words describe a color well but a specific product or logo poorly. Next to the instruction, add images that show the result you want, such as a packshot of the trainer you sell or the correct label. Precise Edit takes up to four reference images, or three when a mask is set, because the mask uses one slot.

Refer to the reference in the instruction, as the examples do: 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 never edited itself.

The Trainer swap and label repairs below were made this way.

Quality and results

Choose the quality and the number of results

Quality offers Very low, Low, Medium and High, with Medium selected to start. Lower settings are useful for trying an idea; use a higher one for fine lettering, fabric texture or a result you will print.

Number of images runs the same edit from one to eight times, so you can pick the best of several. Each result uses credits, and Apply edit shows the total before it runs.

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, the brand name woven cleanly on the label

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.

Reference images

A man in a workshop wearing a brown cap whose woven label lettering is garbled The real cap, with its woven brand label

Localized edits in Precise Edit

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

Choose the right tool for the edit

Task Ideogram tool Why
Change, add or replace something in one area Precise Edit Describe any change in words and keep the image at its own size.
Replace the background behind a product Precise Edit Mask the background, describe the new scene, and check the product edges in the result.
Remove an unwanted object Object Remover Remove an object It takes the object out and fills the gap, with no prompt.
Recolor parts of a product to colors you choose Colorways Change a product color Paint up to four regions and give each a preset color or a hex code.
Apply a fabric or finish from a reference image Material Swap Apply a reference material It applies the reference's color, texture, pattern scale and orientation to the regions you paint.
Change the wording of readable text Text Layers Make detected text editable Layerize Text turns detected lettering into editable text layers.
Cut the subject out as a transparent PNG Background Remover Remove a background It returns the subject on a transparent background, with no prompt.

Change a product's color and keep its texture and lighting

Precise Edit recolors one product in a scene when the instruction names the new color and what to keep, as in the Ecommerce examples below. A handbag goes from pale blue to burgundy with the instruction to keep the leather texture and lighting, and a camel overcoat becomes forest green wool with its cut, texture and buttons kept. To make several colors of the same product from painted regions and hex codes, use Colorways.

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

Correct lettering without rebuilding the design

Precise Edit repairs lettering that is part of the image, such as a printed tongue label, a debossed tag or packaging text, as in the Fix detail examples. Mask the lettering, write the exact words it should read, and add a reference image of the real label when you have one. When the text is clear, mostly straight lettering that you want to keep editing, Text Layers can turn it into editable text instead.

Make detected text editable

Multi-round editing

Make several edits in a row at full resolution.

Each Precise Edit result can be the source for the next edit. Open the result and select Edit, and Precise Edit loads it for the next change. Because every result keeps the image's exact size, a series of edits does not shrink the picture.

Change one thing per round and say what should stay the same. Inspect each result before you continue. Every result is saved to Assets, so when a round moves away from what you want, start the next edit from an earlier result.

Text and logos

Fix text, labels and logos in an image

Small lettering is where image models most often slip. Precise Edit can repair a garbled label or a broken letter in place, as in the Fix detail examples.

  • Mask only the lettering and a small margin around it, not the whole label.

  • Write the exact words in your instruction, including capitals and spacing.

  • Add a clear reference image of the correct label or logo when the result must match a real one.

  • Use a high quality setting for small print, then zoom in on every letter before you publish.

  • To change the wording of text that is already readable, Text Layers turns detected lettering into editable text.

Use cases

Who uses AI inpainting, and for what

The same edit works across very different pictures. These are the jobs the examples on this page were made for.

  1. Ecommerce and product teams

    Show a product in another color or material from the photo you already have, swap a trainer for the one you sell, or repair a garbled label before a listing goes live. More on AI product image editing for ecommerce.

  2. Real estate and property photos

    Take a parked car or a plant out of a listing photo, green a patchy lawn, or remove scaffolding from a facade, then check that the result still represents the property honestly.

  3. Interior design

    Try matte black pendant shades, a sage green door, a different painting or a new roof material in a real room or street before anything is bought or built.

  4. Marketing and campaign images

    Change one product, prop or color in a finished campaign image without reshooting. With a context window, the rest of the picture keeps its original size for print and large screens.

  5. Designers and retouchers

    Fix one detail after a client review, such as a broken letter, a strap with holes or a stray object, and keep the approved parts of the image untouched.

Compare

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

Approach What changes Size of the result Use it when
Precise Edit with a context window Only the masked pixels inside the window The width and height you uploaded One detail in a large or finished image
Precise Edit without a window The whole image, guided by your instruction and mask Up to 4,194,304 pixels kept; larger images are scaled down through the API Smaller images, or a change that touches most of the picture
Object Remover The object you brush over, filled with background that matches The image you uploaded Take something out with no instruction to write
Background Remover Everything except the subject A transparent PNG of the subject Cut a product, person or logo out of its background
A new generation Everything Whatever size you generate The picture itself should be different, not one part of it

Limits

Limits to know before you start

  • One source image per edit, up to 50 MB, as PNG, JPEG, WebP, GIF, BMP or TIFF in the app. Through the API, an image up to 67 megapixels and 50 MB keeps its full size when the edit uses a context window.

  • A context window covers at most 4,194,304 pixels. If your mask covers more than that, the automatic window falls back to editing the whole image.

  • A window you set yourself is at least 256 pixels on each side and keeps an aspect ratio between 1:6 and 6:1. An image longer than 6:1 needs a window in the app.

  • Up to four reference images, or three with a mask, and up to eight results per run.

  • Each edit uses credits. Free credits are limited and vary by account; after that, a paid plan or bought credits are needed.

  • Preservation outside the edit is what Precise Edit is designed to do, not a pixel guarantee. Results are new AI-generated images.

Review

What to check before you publish an edit

  • Compare the result with the original at full size, not only as a thumbnail.

  • Check the edge of the mask for seams, halos or a leftover outline of the old object.

  • Look at shadows, reflections and lighting around the edit so the new detail sits in the same light.

  • Read every letter of edited text, logos and labels.

  • For products, make sure the color, material and details still match the item you sell.

  • For property and news images, check that the edit does not mislead about the real place or event.

API

Make precise masked edits through the 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 the image outside it is designed to come back as you sent it. A mask inside the window narrows the edit to the pixels that may change. Check the returned image against the original before you use it.

  • Precise Edit

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

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

  • The context window

    context_window=auto
    This is the default. With a mask, Ideogram fits the window around it, so the edit keeps the image's full resolution. Without a mask, it edits the whole image, as none does.
    context_window=none
    Edit the whole image. An image over 4,194,304 pixels, the area of 2048 × 2048, comes back scaled down to fit.
    context_window=y_min,x_min,y_max,x_max
    Set the window yourself, by its corner pixels, rows first. The maximum edges are exclusive.
  • Terms and limits

    Mask
    The mask is a file the same width and height as the image. Black marks the area to edit and white the area to keep, and values in between round to the nearer of the two. The mask needs both black and white areas.
    Context window
    The app calls it the edit window. Write it in the image's own pixels, rows first, measured from the top-left corner.
    Limits
    The image can be JPEG, PNG or WebP, up to 50 MB and 67,108,864 pixels. A window you set is at least 256 pixels on each side, with an aspect ratio between 1:6 and 6:1, and any window holds at most 4,194,304 pixels. You can add up to four reference images, or three with a mask.
    Results
    Requests return the edited images directly by default. Set async or send a webhook_url to get a generation_id and poll for the result.

    Colorways and Material Swap read masks the other way round, with white marking the region to change.

The API also offers Inpaint with Ideogram 3.0 (opens in a new tab), which repaints a masked region and returns the image at the nearest supported resolution. Use Precise Edit when the result must keep the exact width and height.

API documentation ↗

Price per image (USD)

Precise Edit
Quality Price
Very low $0.008
Low $0.03
Medium $0.06
High $0.22

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

Frequently asked questions

Will my image still be there after I sign in?
Yes, for up to an hour. If you choose an image at the top of this page before you sign in, it stays in this browser and opens in the app once you sign in. Nothing is uploaded before then. If you close the sign-in prompt, the image is deleted and you return to this page to choose again.
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.
Is Precise Edit an AI inpainting or generative fill tool?
Yes. Precise Edit is inpainting: you paint over the part of the image to change, describe what should appear there, and Ideogram fills that area to match the scene. To take something out without describing a replacement, use Object Remover.
Does editing one detail change the rest of my image?
When the edit uses a context window, fitted around your mask or placed by you, the image outside that window is designed to come back as you sent it. Inside the window, the mask marks the pixels that may change. Compare the result with the original at full size before you use it. Without a mask or a window, Ideogram edits the whole image.
What resolution do I get back?
With a context window, either fitted to your mask or named by coordinates, the result comes back at the width and height you uploaded. Through the API, auto is the default and fits a window whenever you send a mask. Without a mask, or with context_window=none, Ideogram edits the whole image and scales an image over 4,194,304 pixels down to fit. In the app, an image too large to edit whole always uses an edit window.
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 small. A window that auto fits around it holds at most 4,194,304 pixels. A window you set yourself is at least 256 pixels on each side, holds at most 4,194,304 pixels, and keeps 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 window you set yourself still has to be at least 256 pixels on each side, even when the marked area inside it is smaller.
Can I replace an object in a photo with something else?
Yes. Mask the object, then describe what should appear in its place, such as a different painting in the same frame. To match a real product, add a reference image of it and refer to it in the instruction. Check the edges and shadows of the new object at full size.
How do I fix text in an image?
Mask only the lettering, write the exact words in the instruction, and add a reference image of the correct label when it must match a real one. Zoom in on every letter in the result. To change readable text instead, Text Layers turns detected lettering into editable text.
Which image files can I edit?
In the app you can upload a PNG, JPEG, WebP, GIF, BMP or TIFF image up to 50 MB, or start from an image you made in Ideogram. Each edit works on one image.
How many results does one edit give me?
Choose from one to eight under Number of images. Every result is saved, so you can compare them and start the next edit from the best one.
Can I use Precise Edit from the API?
Yes, the API has a Precise Edit endpoint. Post to /v2/image/precise-edit/ideogram-4-5 with your image, a prompt, and a mask, a context_window, or both. The Precise Edit API reference has the full request and response.

Precise Edit

Try Precise Edit with context window now.

Try Precise Edit API doc

Keep reading