GPT Image 2.5 Official Prompting Handbook 2
Everything the official guide says about changing an image: eight editing scenarios, multi-turn refinement, character consistency and a runnable example. Each prompt is the official text verbatim, paired with the official output from both model tiers.
Writing an edit: what changes, what must not
A generation prompt only describes the picture. An editing prompt describes the picture and the boundary at the same time. The guide splits this into two parallel lists: what should change, and what must not move. Leave the second list out and the model will happily repaint everything you did not mention.
Edits go through client.images.edit, with the reference images passed in the image parameter; local edits that need a mask have their own path. The eight scenarios below all sit on top of this one writing pattern.
- Say "change only X" and list the details to preserve: identity, geometry, layout, lighting, labels.
- State the exclusions too: no extra text, no logos, no watermarks.
- For precise local edits, also name the saturation, contrast, arrows, camera angle and surrounding objects.
- Give every input image a role and a number. Subject, style, clothing or background.
- Request one change per turn, pass the previous output in as the next input, and repeat the details to preserve.
Scenario one: translate while preserving layout
The official input here is the coffee-machine infographic from part one: translate its text into Spanish and change nothing else. Two things need checking afterwards, the translation itself and any wording left in the original language.
The prompt is worth studying because one sentence expresses the whole structure of a contained edit: change one thing, freeze everything else.
Official edit settings: size="1024x1536", quality="high".
Translate the text in the infographic to Spanish. Do not change any other aspect of the image.
Scenario two: transfer a visual style
Style transfer works when the reference image is given one explicit role: this one supplies the palette, the texture or the medium. In the official prompt the reference supplies style only, and the new subject is described separately. Keep the two out of the same clause.
Official edit settings: size="1024x1536", quality="medium".
Use the same style from the input image and generate a man riding a motorcycle on a white background.
Scenario three: preserve identity and change clothing
This is the guide's most complete freeze list. It opens by declaring that only the clothing changes, then enumerates what may not: face, facial features, skin tone, body shape, pose, identity, likeness, expression, hairstyle, proportions. It even freezes background, camera angle, framing and image quality, and closes by excluding accessories, text, logos and watermarks.
The same structure transfers to products: what must stay is the recognisable shape, the label and the material, and exactly one thing is allowed to change.
Official edit settings: size="1024x1536", quality="medium". Inputs: one person photograph plus three clothing references.
Edit the image to dress the woman using the provided clothing images. Do not change her face, facial features, skin tone, body shape, pose, or identity in any way. Preserve her exact likeness, expression, hairstyle, and proportions. Replace only the clothing, fitting the garments naturally to her existing pose and body geometry with realistic fabric behavior. Match lighting, shadows, and color temperature to the original photo so the outfit integrates photorealistically, without looking pasted on. Do not change the background, camera angle, framing, or image quality, and do not add accessories, text, logos, or watermarks.
Scenario four: combine references
Compositing needs three statements: which element moves, where it lands, and that nothing else changes. The official example passes the scene photograph as image 1 and the photograph with the dog as image 2, points at them by number, and additionally pins lighting, composition and background to the first image.
Official edit settings: size="1024x1536", quality="medium".
Place the dog from the second image into the setting of image 1, right next to the woman, use the same style of lighting, composition and background. Do not change anything else.
Scenario five: create a transparent product cutout
Cutouts are the one scenario that needs both halves, prompt and parameter. The official prompt asks for a centred product, a crisp silhouette, no halos or fringing, and exactly preserved product geometry and label legibility, then explicitly excludes a solid backdrop, a checkerboard, scenery and shadow. The request sets background="transparent" and writes PNG or WebP, and output_compression is left out for PNG.
If that transparent result is edited further, the guide says the requirement to preserve the transparent background has to be repeated.
Official edit settings: size="1024x1536", quality="medium", background="transparent", output_format="png".
Extract the product from the input image and isolate it on a fully transparent background. Output: centered product, crisp silhouette, no halos/fringing. Preserve product geometry and label legibility exactly. Add only light polishing. Do not add a solid backdrop, checkerboard, scenery, or shadow. Do not restyle the product; remove the background and preserve clean alpha transparency.
Scenario six: turn a drawing into a realistic image
The guide frames sketch-to-render as turning a rough drawing into a photorealistic concept while keeping the original intent. The prompt is written like a spec: hold the exact layout, proportions and perspective first, then let the model choose plausible materials and lighting consistent with the sketch, and finally close the door with "do not add new elements or text", which is what stops the model from reinterpreting the composition.
Official edit settings: size="1024x1536", quality="medium".
Turn this drawing into a photorealistic image. Preserve the exact layout, proportions, and perspective. Choose realistic materials and lighting consistent with the sketch intent. Do not add new elements or text.
Scenario seven: remove an object
Removal produces the shortest editing prompt there is: name the object that goes, then freeze everything else. The official example says only to remove the flower from the man's hand and not to change anything else, and that second clause is what keeps the person, pose, lighting and composition local to the edit.
Official edit settings: size="1024x1536", quality="medium".
Remove the flower from man's hand. Do not change anything else.
Scenario eight: insert a person into a scene
Inserting a person into a new scene means solving identity preservation and scene believability at once. The official prompt uses the same museum photograph as its input, first requiring the picture to look like a real photograph someone could have taken rather than a movie poster, then giving her position, gaze, clothing condition and emotional state, and finally pinning the location, time of day and natural light while excluding cinematic lighting, dramatic grading and stylised composition.
The section carries one technical note too: for gpt-image-2, omit input_fidelity, because image inputs are always processed at high fidelity.
Official edit settings: size="1024x1536", quality="medium".
Generate a highly realistic action scene where this person is running away from a large, realistic brown bear attacking a campsite. The image should look like a real photograph someone could have taken, not an overly enhanced or cinematic movie-poster image. She is centered in the image but looking away from the camera, wearing outdoorsy camping attire, with dirt on her face and tears in her clothing. She is clearly afraid but focused on escaping, running away from the bear as it destroys the campsite behind her. The campsite is in Yosemite National Park, with believable natural details. The time of day is dusk, with natural lighting and realistic colors. Everything should feel grounded, authentic, and unstyled, as if captured in a real moment. Avoid cinematic lighting, dramatic color grading, or stylized composition.
Refining across turns: start, then change one condition
The guide's refinement rule is two lines long: pass the previous output as the next input, and change one thing at a time. The point is attribution — you can tell which change helped.
Step one turns the shampoo photograph into a highway billboard at sunset, quoting the billboard copy and requiring it verbatim, once, and legible, with no watermarks or logos. Step two is a single sentence: make it a snowy winter evening. Scene, layout and copy all carry over from the previous result.
Official edit settings (both steps): size="1024x1536", quality="medium".
Create a realistic billboard mockup of the shampoo on a highway scene during sunset. Billboard text (EXACT, verbatim, no extra characters): "Fresh and clean" Typography: bold sans-serif, high contrast, centered, clean kerning. Ensure text appears once and is perfectly legible. No watermarks, no logos.
Make it look like a winter evening with snowfall.
Character consistency: establish, then continue
For a book with several illustrations the guide recommends creating a reusable character reference first, then carrying it across scenes, poses and pages. The method is to write the character's appearance, proportions, outfit and tone as a fixed definition, and repeat that block every time the scene changes.
Official settings (step 1 generates, step 2 edits): size="1024x1536", quality="medium".
Create a children's book illustration introducing a main character. Character: A young, storybook-style hero inspired by a little forest outlaw, wearing a simple green hooded tunic, soft brown boots, and a small belt pouch. The character has a kind expression, gentle eyes, and a brave but warm demeanor. Carries a small wooden bow used only for helping, never harming. Theme: The character protects and rescues small forest animals like squirrels, birds, and rabbits. Style: Children's book illustration, hand-painted watercolor look, soft outlines, warm earthy colors, whimsical and friendly. Proportions suitable for picture books (slightly oversized head, expressive face). Constraints: - Original character (no copyrighted characters) - No text - No watermarks - Plain forest background to clearly showcase the character
Continue the children's book story using the same character. Scene: The same young forest hero is gently helping a frightened squirrel out of a fallen tree after a winter storm. The character kneels beside the squirrel, offering reassurance. Character Consistency: - Same green hooded tunic - Same facial features, proportions, and color palette - Same gentle, heroic personality Style: Children's book watercolor illustration, soft lighting, snowy forest environment, warm and comforting mood. Constraints: - Do not redesign the character - No text - No watermarks
Workflow one: change furniture in a room
The guide defines the goal here as surgical realism: swap a single object while preserving camera angle, lighting, shadows and surrounding context, so the result reads as a real photograph rather than a redesign. The prompt shape is "replace ONLY X" plus a freeze list plus a material requirement.
Official edit settings: size="1536x1024", quality="medium".
In this room photo, replace ONLY the white chairs with chairs made of wood. Preserve camera angle, room lighting, floor shadows, and surrounding objects. Keep all other aspects of the image unchanged. Photorealistic contact shadows and fabric texture.
Workflow two: design a holiday card
Seasonal cards need scene, mood, materials, lighting and exact copy at once. The official example uses a nostalgic teddy bear and writes "include ONLY this card text" as its own requirement, quoting the line verbatim.
Official generation settings: size="1024x1536", quality="medium".
Create a Christmas holiday card illustration. Scene: a cozy Christmas scene with an old teddy bear sitting inside a keepsake box, slightly worn fur, soft stitching repairs, placed near a window with falling snow outside. The scene suggests the child has grown up, but the memories remain. Mood: Warm, nostalgic, gentle, emotional. Style: Premium holiday card photography, soft cinematic lighting, realistic textures, shallow depth of field, tasteful bokeh lights, high print-quality composition. Constraints: - Original artwork only - No trademarks - No watermarks - No logos Include ONLY this card text (verbatim): "Merry Christmas — some memories never fade."
Workflow three: design collectible merchandise
Merchandise and packaging concepts lean on product photography cues: materials, packaging and print clarity. The guide requires the design to stay original and non-infringing, and recommends comparing several character or packaging variations. Packaging copy is again written as its own verbatim requirement.
Official generation settings: size="1024x1536", quality="medium".
Create a collectible action figure of a vintage-style toy propeller airplane with rounded wings, a front-mounted spinning propeller, slightly worn paint edges, classic childhood proportions, designed as a nostalgic holiday collectible, in blister packaging. Concept: A nostalgic holiday collectible inspired by the simple toy airplanes children used to play with during winter holidays. Evokes warmth, imagination, and childhood wonder. Style: Premium toy photography, realistic plastic and painted metal textures, studio lighting, shallow depth of field, sharp label printing, high-end retail presentation. Constraints: - Original design only - No trademarks - No watermarks - No logos Include ONLY this packaging text (verbatim): "Christmas Memories Edition"
Run a complete example
The guide also ships a runnable example: one request generates four logo variations, then a second extracts a product from a reference image. The guide states that this example remains pinned to gpt-image-2 and should be used as a baseline, choosing an available model and its supported request settings for your own evaluation.
Before running it, install the OpenAI SDK (pip install openai for Python), set OPENAI_API_KEY, and save the product photograph as input_images/shampoo.webp. The guide notes that live requests incur API usage charges.
- The official page carries both a Python and a Ruby version; the Python one is reproduced here.
- Preserve the returned PNG bytes when generating logos, including the alpha channel.
- The extraction prompt is identical to the transparent cutout scenario above, so the two can be read together.
import base64
from pathlib import Path
from openai import OpenAI
client = OpenAI()
prompt = """
Create an original, non-infringing logo for a company called Field & Flour, a local bakery.
The logo should feel warm, simple, and timeless. Use clean, vector-like shapes, a strong silhouette, and balanced negative space.
Favor simplicity over detail so it reads clearly at small and large sizes. Flat design, minimal strokes, no gradients unless essential.
Fully transparent background. Deliver a single centered logo with generous padding, clean alpha edges, and no solid backdrop, scenery, checkerboard, or watermark.
"""
result = client.images.generate(
model="gpt-image-2",
prompt=prompt,
size="1024x1536",
quality="medium",
background="transparent",
output_format="png",
n=4, # Generate 4 versions of the logo
)
# Preserve the returned PNG bytes, including the alpha channel.
for index, item in enumerate(result.data, start=1):
Path(f"logo-generation-{index}-gpt-image-2.png").write_bytes(
base64.b64decode(item.b64_json)
)
# Extract a product from a reference image.
prompt = """
Extract the product from the input image and isolate it on a fully transparent background.
Output: centered product, crisp silhouette, no halos/fringing.
Preserve product geometry and label legibility exactly.
Add only light polishing. Do not add a solid backdrop, checkerboard, scenery, or shadow.
Do not restyle the product; remove the background and preserve clean alpha transparency.
"""
result = client.images.edit(
model="gpt-image-2",
image=[
Path("input_images/shampoo.webp"),
],
prompt=prompt,
size="1024x1536",
quality="medium",
background="transparent",
output_format="png",
)
Path("extract-product-gpt-image-2.png").write_bytes(
base64.b64decode(result.data[0].b64_json)
) Check the result before you ship it
The guide closes with a checklist, and edited results need it most — an edit is exactly where something you never mentioned can quietly change.
- Is required text accurate and legible? Are diagram labels and relationships correct?
- Do identities, product shapes, labels and reference details remain intact?
- Did the edit change only what you requested?
- If transparency is required, does the file contain an alpha channel rather than a painted background?
- When changing prompts or models, compare quality, latency and cost on representative inputs.
Questions
How does writing an edit differ from writing a generation prompt?
The guide reduces it to one sentence: say "change only X", and list the details to preserve. The preservation list covers identity, geometry, layout, lighting and labels. You also state exclusions such as unwanted text, logos or watermarks, and for precise local edits you name the saturation, contrast, arrows, camera angle and surrounding objects that must not move.
Why does a face or product drift after several rounds of editing?
The guide states plainly that repeated edits can still change details you intended to preserve. The remedy is to restate those constraints on every round and inspect each result. Where a region must remain pixel-identical, it recommends compositing the approved edit into the original image rather than relying on prompting alone.
How should multiple reference images be described?
The guide requires assigning roles: identify each input by number and purpose, saying whether it supplies the subject, the style, the clothing or the background, then explain how the inputs combine and which elements move where. The official compositing example does exactly that: place the dog from the second image into the setting of image 1.
Why do transparent cutouts sometimes fail?
The guide asks for both halves. The prompt must isolate the subject on a fully transparent background and exclude a solid backdrop, checkerboard, scenery or shadow; the request must set background="transparent" and write PNG or WebP. It also warns that a drawn checkerboard is not transparency, so the decoded alpha channel has to be checked.
What most often goes wrong when rendering a drawing?
The guide frames sketch-to-render as preserving the original intent while adding realism: require the exact layout, proportions and perspective to hold, let the model choose plausible materials and lighting consistent with the sketch, and state "do not add new elements or text". Without that last constraint the model tends to reinterpret the composition.
Can the official runnable example be used as-is?
The guide says the example remains pinned to gpt-image-2 and should be treated as a baseline: choose an available model and its supported request settings for your own evaluation. It needs the OpenAI SDK installed, OPENAI_API_KEY set, and the product photograph saved as input_images/shampoo.webp. Live requests incur API usage charges.
Bring your own image
Editing prompts separate themselves the moment they run on a real photo. Open the GPT Image 2.5 workspace, upload a reference and swap the constraints below for your own.
Open the GPT Image 2.5 workspace