Ideogram 4.5 Precise Edit

Ideogram 4.5 Precise Edit is the precision editing variant of Ideogram 4.5. It applies a natural-language instruction to a source image, optionally limited by a mask and guided by up to four reference images, and restores unchanged pixels from the source so framing, color, and surrounding detail stay intact across many rounds of edits. It keeps the source dimensions and suits retouching, product and color changes, and multi-step design revisions.

Complete technical specification for integration
Ready-to-use code snippets for common workflows
Step-by-step tutorials for advanced use cases
← All GuidesMasked edits
How to limit an Ideogram 4.5 Precise Edit to one region with a mask, from picking one object out of several to printing a reference graphic onto a garment.
Introduction
A mask tells Ideogram 4.5 Precise Edit where an edit is allowed to land. You pass a black and white image the same size as the source, white over the region to change, and the instruction is aimed there. Whatever the edit does not change comes back from the source untouched, the same way it does on any Precise Edit.
That turns one photo shoot into every colorway of the product. The jacket below was shot once in olive, and each variant is one masked edit on that frame.

Photorealistic e-commerce fashion photograph of a man in his early thirties with short dark hair and a trimmed beard, standing relaxed and facing the camera against a plain warm white studio wall. He wears an olive green quilted puffer jacket, zipped halfway, over a plain white t-shirt, with dark indigo jeans. Three-quarter length framing from mid-thigh to just above the head, the man centered, arms relaxed at his sides. Soft even studio light, crisp fabric detail, catalog lookbook style.


Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.

Change the color of the quilted puffer jacket to a deep rust orange. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.

Change the color of the quilted puffer jacket to a dark navy blue. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.
Switch to the mask to see the region every colorway was aimed at, then through the variants. The quilting lines and the zipper sit in the same place in all four, and his face and the studio wall never change.
This guide covers the mask rules, using a mask to pick one object out of several, placing something new, combining a mask with references and making a mask of your own.
How the mask works
The mask goes in inputs.maskImage, next to the source in inputs.seedImage. Four rules decide whether it works:
- White edits, black keeps. White marks where the edit goes. It is a strong guide rather than a clipping path, as the desk example below shows.
- Same size as the source. The mask must match the pixel dimensions of
inputs.seedImageexactly. - Both regions present. A mask that is entirely white or entirely black is rejected.
- Hard edges only. Gray values round to the nearest of black or white, so a feathered brush does not feather the edit.
The jacket mask in the hero is a rough polygon, not a cutout. It covers the jacket with room to spare and stops below the chin, so the face sits outside the region the edit is aimed at. The instruction does the fine work of finding the jacket inside that region, which is why the white t-shirt under the mask stays white.
import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'ideogram:4.5@precise-edit',
positivePrompt: 'Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.',
inputs: {
seedImage: 'https://example.com/jacket-olive.jpg',
maskImage: 'https://example.com/jacket-mask.png'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "ideogram:4.5@precise-edit",
"positivePrompt": "Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.",
"inputs": {
"seedImage": "https://example.com/jacket-olive.jpg",
"maskImage": "https://example.com/jacket-mask.png"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageInference",
"taskUUID": "3b8e1f6a-92c4-4d07-a5e1-7c0f2d9b4e63",
"model": "ideogram:4.5@precise-edit",
"positivePrompt": "Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.",
"inputs": {
"seedImage": "https://example.com/jacket-olive.jpg",
"maskImage": "https://example.com/jacket-mask.png"
}
}
]'runware run ideogram:4.5@precise-edit \
positivePrompt="Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same." \
inputs.seedImage=https://example.com/jacket-olive.jpg \
inputs.maskImage=https://example.com/jacket-mask.png{
"taskType": "imageInference",
"taskUUID": "3b8e1f6a-92c4-4d07-a5e1-7c0f2d9b4e63",
"model": "ideogram:4.5@precise-edit",
"positivePrompt": "Change the color of the quilted puffer jacket to a soft sage green. Keep its shape, its quilting, its zipper and the way it sits on him exactly the same.",
"inputs": {
"seedImage": "https://example.com/jacket-olive.jpg",
"maskImage": "https://example.com/jacket-mask.png"
}
}Response
[
{
"taskType": "imageInference",
"taskUUID": "3b8e1f6a-92c4-4d07-a5e1-7c0f2d9b4e63",
"imageUUID": "f4c2a7e9-1d3b-4f86-9c50-8e2b6a1d7f34",
"imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/f4c2a7e9-1d3b-4f86-9c50-8e2b6a1d7f34.jpg"
}
]Picking one object out of several
An instruction names a thing, and a frame with two of that thing is ambiguous. The sofa below has two identical pillows, and the instruction asks for "the throw pillow".
Without the mask, the model has to decide which pillow you meant, and it changed both. With the mask over the left end of the sofa, only the left pillow changes and the right one stays cream linen. The instruction did not get more specific. The mask answered the question the words left open.
Rewording can sometimes do the same job ("the pillow on the left"), but a mask is the answer that does not depend on wording, which matters when the same edit runs across a catalog of photos with different layouts.
Placing something new
When the edit adds an object, the mask marks where the object goes. The instruction below only asks for a plant on the desk, and the mask puts it beside the notebook.
The mask does not set the size, though, and it is not a clipping path. The top leaf above already grows past the region, and with a small square instead the plant came back at about the same size: the pot fills the square and the leaves grow well past its top edge.
So draw the region for the whole object, leaves and contact shadow included, rather than for the part you picture first. A region that is too small does not shrink the object, it only gives up control over where the overflow goes.
Masks with references
A mask combines with inputs.referenceImages, which is how a reference graphic lands on an exact spot. With a mask, Precise Edit accepts up to three references, one fewer than without.
- Reference

Flat two-color vector badge graphic for a running club, printed on a plain white background: a circular badge with a stylized mountain peak and a winding trail in the center, the words "SUMMIT RUN CLUB" in bold condensed sans-serif capitals curving around the top, and "EST. 2024" along the bottom. Deep navy and coral orange only, clean edges, centered.
The mask decides where the print goes, and the reference decides what it looks like. The badge comes through intact, lettering and trail included, centered in the masked area of the chest. That is a print-on-demand mockup: one blank garment photo, any customer's artwork.
Making a mask
Paint over the region you want to change and download the result. The file comes out white on black at the source's own size, which is the format inputs.maskImage expects.
Drop an image here or browse
For a repeatable pipeline, draw the mask in code instead. A rectangle or polygon over a known region is usually enough, because the instruction finds the object inside it and restoration puts everything else back.
When to leave the mask out
Without a mask, the instruction applies to the whole image, and restoration still returns every pixel the edit did not change. That is the right call for changes that are meant to touch the whole frame, such as relighting or a change of season, and for targets that appear only once. See Iterative editing for a whole chain run without masks.
Tips
-
Paint generously. A region with room to spare beats a tight cutout that clips a sleeve, and a new object needs space for all of itself or it spills past the edge.
-
Keep naming the target. The mask limits where the edit can happen, and the instruction still says what to change inside it.
-
Export at the source's exact size. A mask one pixel off in either dimension is rejected.
-
Count your references. A masked edit takes three at most, four without the mask.







