SPB Git

Repository Public

image-prompting.md 65.7 KB 1,557 lines markdown

1# Image prompting23> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.45<header className="not-prose mb-8">6        <h27          id="gpt-image-2.5-guide"8          className="m-0 text-3xl font-semibold text-default"9        >10          {"GPT Image 2.5 prompting guide"}11        </h2>12        1314          Choose a model, write effective prompts, and preserve details across15          edits.16        1718      </header>19      2021## Overview2223Start with the image you need, then describe the subject, composition, style, and constraints. For edits, identify what should change and what must stay the same. Refine one thing at a time and inspect the result.2425GPT Image 2.5 includes two model choices. GPT Image 2.5 Flare is the small model, optimized for speed, with image quality comparable to GPT Image 2. GPT Image 2.5 Sunburst is the base model, optimized for quality, with higher image quality than GPT Image 2. Both models offer improvements in precise editing and subject preservation.2627For API setup and request examples, see the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation).2829## Choose a model3031For a new workflow, start with GPT Image 2.5 Flare when speed is the priority, or GPT Image 2.5 Sunburst when demanding quality requirements are the priority. Once the output meets your requirements, look for opportunities to reduce latency.3233For migrating from a current image model, use your current image quality as the starting point. Both models support image generation, editing, and transparent backgrounds.3435| Your current workflow                                                               | Start by testing                                                                             |36| ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |37| An existing, validated GPT Image 2 workflow already meets your quality requirements | GPT Image 2.5 Flare. Check whether you can retain acceptable quality while reducing latency. |38| A complex use case where GPT Image 2 does not meet your quality requirements        | GPT Image 2.5 Sunburst. First establish that it delivers the quality you need.               |3940If GPT Image 2.5 Sunburst meets your quality requirements, then test GPT Image 2.5 Flare with the same prompts and inputs. Switch to GPT Image 2.5 Flare if it also meets those requirements and improves latency. Keep GPT Image 2.5 Sunburst when its quality advantage is necessary for your workflow.4142Measure response time and quality on your own workload. Results depend on your prompts, reference images, output dimensions, and quality settings; a speed improvement on one workload doesn't establish a fixed improvement on another.4344## Model parameters4546Set API parameters separately from the prompt.4748| Parameter    | GPT Image 2.5 settings                                                                                                                                                                                                              |49| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |50| `model`      | `gpt-image-2.5-flare` (small model) or `gpt-image-2.5-sunburst` (base model)                                                                                                                                                        |51| `quality`    | `auto` (default), `low`, `medium`, `high`, `xhigh`, or `max`                                                                                                                                                                        |52| `size`       | `auto` or a custom resolution. Common sizes: `1024x1024` (square), `1536x1024` (landscape), `1024x1536` (portrait), `2048x2048` (2K square), `2048x1152` (2K landscape), `3840x2160` (4K landscape), and `2160x3840` (4K portrait). |53| `background` | `auto`, `opaque`, or `transparent`                                                                                                                                                                                                  |5455For a custom resolution, use `WIDTHxHEIGHT` and follow these constraints:5657- Each edge must be no more than 3,840 pixels.58- Both edges must be multiples of 16 pixels.59- The ratio of the longer edge to the shorter edge must not exceed 3:1.60- The total pixel count must be between 655,360 and 8,294,400.6162Outputs with more than 3,686,400 total pixels (`2560x1440`) are experimental.6364Choose the model using the workflow above before tuning `quality`. For the first comparison, keep an explicitly selected quality setting unchanged when both models support it, along with the prompt, reference images, and output dimensions. The same quality label does not imply the same image quality or response time across models.6566If the output falls short, test a higher quality setting. Once it meets your requirements, test lower settings to see whether they preserve acceptable quality while reducing latency. Use `xhigh` or `max` only when they improve an unmet quality requirement within your latency budget. A higher setting doesn't guarantee a better result for every prompt.6768For transparent assets, explicitly request `background="transparent"` and use PNG or WebP. Check the decoded image's alpha channel, including hair, glass, shadows, and object edges. Use `output_compression` only for JPEG or WebP output, not PNG.6970## Migrate an existing workflow71721. **Save a baseline.** Collect representative production prompts and reference images, including difficult edits, exact text, faces, product geometry, and transparent assets. Record the current model, request settings, and results.732. **Choose the first candidate.** If GPT Image 2 already meets your quality requirements, start with GPT Image 2.5 Flare and test for a latency improvement. If GPT Image 2 falls short on a complex use case, start with GPT Image 2.5 Sunburst and first establish that it meets your quality requirements. Keep the prompt, references, dimensions, and output format unchanged for the first comparison.743. **Check the complete result.** Compare instruction following, identity and product preservation, text accuracy, unwanted changes, and transparency. Repeat requests to measure consistency. For editing workflows, test the complete sequence of edits as well as individual steps.754. **Test for a latency gain after quality passes.** If you started with GPT Image 2.5 Sunburst and it meets your quality requirements, evaluate GPT Image 2.5 Flare against the same requirements. Switch only if the quality remains acceptable and latency improves; otherwise, keep GPT Image 2.5 Sunburst.765. **Tune one setting at a time.** Compare quality levels before rewriting the prompt. Measure typical and slow responses, failures, retries, and cost per accepted image. Confirm current pricing rather than assuming the faster model costs less.776. **Roll out by workflow.** Once the released model passes your acceptance criteria, move a small share of traffic, monitor the same measures, and expand gradually. Keep the previous model available for rollback while it remains supported.7879When migrating from GPT Image 1 or 1.5, use the reference tabs to check parameter differences and shutdown dates. Test the candidate model's supported request settings rather than copying older settings unchanged. For GPT Image 2, keep your existing resolution and transparency requirements in the comparison.8081Repeated edits can still change details you intended to preserve. Restate those constraints and inspect each result. If a region must remain pixel-identical, composite the approved edit into the original image instead of relying on prompting alone.8283## Prompting fundamentals84851. **Define the result.** Name the subject and intended use, such as a product photograph, advertisement, or diagram. Specify the composition, aspect ratio, and important placement constraints. For complex requests, organize the prompt as scene, subject, details, and constraints, using labeled sections.862. **Choose a maintainable format.** Short prompts, descriptive paragraphs, JSON-like structures, instructions, and tags can all express the same intent. Choose the format that makes the requirements easiest to read and update rather than relying on special syntax.873. **Describe visible details.** Name materials, lighting, colors, and the visual medium. Request “photorealistic” or “real photograph” explicitly when that is the goal, and describe framing and texture. Treat camera specifications as cues for appearance, not a guarantee of exact physical simulation. For wide, cinematic, low-light, rainy, or neon scenes, specify scale, atmosphere, and color instead of relying on mood words alone.884. **Specify people and actions.** Describe body framing, relative scale, gaze, and interaction with objects. Instructions such as “full body visible, feet included,” “looking down at the open book,” or “hands naturally gripping the handlebars” make the intended pose and action clearer.895. **Specify exact text.** Put required wording in quotes and describe its position and typography. Spell unusual words or brand names letter by letter when needed. Ask for no extra text, then check spelling and legibility in the output. Compare medium or high quality for small text, dense information, or multiple fonts.906. **Separate changes from constraints.** For edits, say “change only X” and list the details to preserve, such as identity, geometry, layout, lighting, or labels. State exclusions such as unwanted text, logos, or watermarks. For precise local edits, also identify saturation, contrast, arrows, camera angle, and surrounding objects that must remain unchanged.917. **Assign roles to references.** Identify each input by number and purpose: subject, style, clothing, or background. Explain how the inputs should combine and which elements should move where.928. **Iterate deliberately.** Pass the previous output as the next edit input, request one change, and repeat the details to preserve. References such as “same style as before” can carry context, but restate critical constraints if the result drifts. Compare results before adding more instructions.9394The examples below each demonstrate a different technique. Keep their prompts as starting points and adapt them to your own images and requirements.9596## Generate images9798### Control style and lighting99100Describe a photograph through its subject, framing, light, and texture. This example specifies a candid composition and explicitly excludes heavy retouching.101102Generation settings: `size="1024x1536"`, `quality="medium"`.103104```text105Create a photorealistic candid photograph of an elderly sailor standing on a small fishing boat.106He has weathered skin with visible wrinkles, pores, and sun texture, and a few faded traditional sailor tattoos on his arms.107He is calmly adjusting a net while his dog sits nearby on the deck. Shot like a 35mm film photograph, medium close-up at eye level, using a 50mm lens.108Soft coastal daylight, shallow depth of field, subtle film grain, natural color balance.109The image should feel honest and unposed, with real skin texture, worn materials, and everyday detail. No glamorization, no heavy retouching.110```111112Example outputs:113114115116  <figure className="m-0 min-w-0">117    <figcaption className="mb-2 min-h-10 text-sm font-semibold">118      GPT Image 2.5 Flare119    </figcaption>120    121122![Photorealistic portrait of a sailor repairing a net — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/photorealism-gpt-image-2-5-flare.webp>)123124125  </figure>126  <figure className="m-0 min-w-0">127    <figcaption className="mb-2 min-h-10 text-sm font-semibold">128      GPT Image 2.5 Sunburst129    </figcaption>130    131132![Photorealistic portrait of a sailor repairing a net — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/photorealism-gpt-image-2-5-sunburst.webp>)133134135  </figure>136137138139### Explain a process visually140141Name the process, audience, and information the image should communicate. For diagrams and information graphics, verify labels and factual relationships as well as appearance.142143Generation settings: `size="1024x1536"`, `quality="medium"`.144145```text146Create a detailed Infographic of the functioning and flow of an automatic coffee machine like a Jura.147From bean basket, to grinding, to scale, water tank, boiler, etc.148I'd like to understand technically and visually the flow.149```150151Example outputs:152153154155  <figure className="m-0 min-w-0">156    <figcaption className="mb-2 min-h-10 text-sm font-semibold">157      GPT Image 2.5 Flare158    </figcaption>159    160161![Diagram explaining an automatic coffee machine — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/infographic-coffee-machine-gpt-image-2-5-flare.webp>)162163164  </figure>165  <figure className="m-0 min-w-0">166    <figcaption className="mb-2 min-h-10 text-sm font-semibold">167      GPT Image 2.5 Sunburst168    </figcaption>169    170171![Diagram explaining an automatic coffee machine — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/infographic-coffee-machine-gpt-image-2-5-sunburst.webp>)172173174  </figure>175176177178### Render exact text179180Quote the required copy and tell the model how many times it should appear. Specify the audience and visual treatment without adding unrelated instructions.181182Generation settings: `size="1024x1536"`, `quality="medium"`.183184```text185Give me a cool in culture ad / fashion shot for a brand called Thread.186It's a hip young street brand. The ad shows a group of friends hanging out together with the tagline "Yours to Create."187Make it feel like a polished campaign image for a youth streetwear audience: stylish, contemporary, energetic, and tasteful.188Use clean composition, strong color direction, natural poses, and premium fashion photography cues.189Render the tagline exactly once, clearly and legibly, integrated into the ad layout.190No extra text, no watermarks, no unrelated logos.191```192193Example outputs:194195196197  <figure className="m-0 min-w-0">198    <figcaption className="mb-2 min-h-10 text-sm font-semibold">199      GPT Image 2.5 Flare200    </figcaption>201    202203![Thread streetwear campaign with the requested tagline — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/thread-ad-gpt-image-2-5-flare.webp>)204205206  </figure>207  <figure className="m-0 min-w-0">208    <figcaption className="mb-2 min-h-10 text-sm font-semibold">209      GPT Image 2.5 Sunburst210    </figcaption>211    212213![Thread streetwear campaign with the requested tagline — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/thread-ad-gpt-image-2-5-sunburst.webp>)214215216  </figure>217218219220### Design a reusable logo221222Describe the brand and the shapes that should define the mark. Specify a clear composition that remains legible at different sizes. Use `n` to request multiple variations.223224Generation settings: `size="1024x1536"`, `quality="medium"`, `background="transparent"`, `output_format="png"`, `n=1`.225226```text227Create an original, non-infringing logo for a company called Field & Flour, a local bakery.228The logo should feel warm, simple, and timeless. Use clean, vector-like shapes, a strong silhouette, and balanced negative space.229Favor simplicity over detail so it reads clearly at small and large sizes. Flat design, minimal strokes, no gradients unless essential.230Fully transparent background. Deliver a single centered logo with generous padding, clean alpha edges, and no solid backdrop, scenery, checkerboard, or watermark.231```232233Each row compares one variation from each model.234235Example outputs:236237238239  <figure className="m-0 min-w-0">240    <figcaption className="mb-2 min-h-10 text-sm font-semibold">241      GPT Image 2.5 Flare242    </figcaption>243    244245![Field and Flour bakery logo, first variation — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-1-gpt-image-2-5-flare.webp>)246247248  </figure>249  <figure className="m-0 min-w-0">250    <figcaption className="mb-2 min-h-10 text-sm font-semibold">251      GPT Image 2.5 Sunburst252    </figcaption>253    254255![Field and Flour bakery logo, first variation — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-1-gpt-image-2-5-sunburst.webp>)256257258  </figure>259260261262263264  <figure className="m-0 min-w-0">265    <figcaption className="mb-2 min-h-10 text-sm font-semibold">266      GPT Image 2.5 Flare267    </figcaption>268    269270![Field and Flour bakery logo, second variation — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-2-gpt-image-2-5-flare.webp>)271272273  </figure>274  <figure className="m-0 min-w-0">275    <figcaption className="mb-2 min-h-10 text-sm font-semibold">276      GPT Image 2.5 Sunburst277    </figcaption>278    279280![Field and Flour bakery logo, second variation — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-2-gpt-image-2-5-sunburst.webp>)281282283  </figure>284285286287288289  <figure className="m-0 min-w-0">290    <figcaption className="mb-2 min-h-10 text-sm font-semibold">291      GPT Image 2.5 Flare292    </figcaption>293    294295![Field and Flour bakery logo, third variation — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-3-gpt-image-2-5-flare.webp>)296297298  </figure>299  <figure className="m-0 min-w-0">300    <figcaption className="mb-2 min-h-10 text-sm font-semibold">301      GPT Image 2.5 Sunburst302    </figcaption>303    304305![Field and Flour bakery logo, third variation — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-3-gpt-image-2-5-sunburst.webp>)306307308  </figure>309310311312313314  <figure className="m-0 min-w-0">315    <figcaption className="mb-2 min-h-10 text-sm font-semibold">316      GPT Image 2.5 Flare317    </figcaption>318    319320![Field and Flour bakery logo, fourth variation — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-4-gpt-image-2-5-flare.webp>)321322323  </figure>324  <figure className="m-0 min-w-0">325    <figcaption className="mb-2 min-h-10 text-sm font-semibold">326      GPT Image 2.5 Sunburst327    </figcaption>328    329330![Field and Flour bakery logo, fourth variation — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/logo-generation-4-gpt-image-2-5-sunburst.webp>)331332333  </figure>334335336337### Use historical and real-world context338339Name the place and date to establish a historical setting. The model can infer contextual details, but inspect clothing, staging, and surroundings for historical accuracy.340341Generation settings: `size="1024x1536"`, `quality="medium"`.342343```text344Create a realistic outdoor crowd scene in Bethel, New York on August 16, 1969.345Photorealistic, period-accurate clothing, staging, and environment.346```347348Example outputs:349350351352  <figure className="m-0 min-w-0">353    <figcaption className="mb-2 min-h-10 text-sm font-semibold">354      GPT Image 2.5 Flare355    </figcaption>356    357358![Crowd scene in Bethel, New York, in August 1969 — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/world-knowledge-gpt-image-2-5-flare.webp>)359360361  </figure>362  <figure className="m-0 min-w-0">363    <figcaption className="mb-2 min-h-10 text-sm font-semibold">364      GPT Image 2.5 Sunburst365    </figcaption>366    367368![Crowd scene in Bethel, New York, in August 1969 — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/world-knowledge-gpt-image-2-5-sunburst.webp>)369370371  </figure>372373374375### Turn a story into a comic strip376377For story-to-comic generation, define the narrative as a sequence of clear visual beats, one per panel. Keep descriptions concrete and action-focused so the model can translate the story into readable, well-paced panels.378379Generation settings: `size="1024x1536"`, `quality="medium"`.380381```text382Create a short vertical comic-style reel with 4 panels.383Panel 1: The owner leaves through the front door. The pet is framed in the window behind them, small against the glass, eyes wide, paws pressed high, the house suddenly quiet.384Panel 2: The door clicks shut. Silence breaks. The pet slowly turns toward the empty house, posture shifting, eyes sharp with possibility.385Panel 3: The house transformed. The pet sprawls across the couch like it owns the place, crumbs nearby, sunlight cutting across the room like a spotlight.386Panel 4: The door opens. The pet is seated perfectly by the entrance, alert and composed, as if nothing happened.387```388389Example outputs:390391392393  <figure className="m-0 min-w-0">394    <figcaption className="mb-2 min-h-10 text-sm font-semibold">395      GPT Image 2.5 Flare396    </figcaption>397    398399![Four-panel comic about a pet at home — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/comic-reel-gpt-image-2-5-flare.webp>)400401402  </figure>403  <figure className="m-0 min-w-0">404    <figcaption className="mb-2 min-h-10 text-sm font-semibold">405      GPT Image 2.5 Sunburst406    </figcaption>407    408409![Four-panel comic about a pet at home — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/comic-reel-gpt-image-2-5-sunburst.webp>)410411412  </figure>413414415416### Create an interface preview417418Interface previews work best when you describe the product as if it already exists. Focus on layout, hierarchy, spacing, and real interface elements, and avoid concept art language so the result looks like a usable, shipped interface rather than a design sketch.419420Generation settings: `size="1024x1536"`, `quality="medium"`.421422```text423Create a realistic mobile app UI mockup for a local farmers market.424Show today’s market with a simple header, a short list of vendors with small photos and categories, a small “Today’s specials” section, and basic information for location and hours.425Design it to be practical, and easy to use. White background, subtle natural accent colors, clear typography, and minimal decoration.426It should look like a real, well-designed, beautiful app for a small local market.427Place the UI mockup in an iPhone frame.428```429430Example outputs:431432433434  <figure className="m-0 min-w-0">435    <figcaption className="mb-2 min-h-10 text-sm font-semibold">436      GPT Image 2.5 Flare437    </figcaption>438    439440![Farmers market mobile app mockup — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/ui-farmers-market-gpt-image-2-5-flare.webp>)441442443  </figure>444  <figure className="m-0 min-w-0">445    <figcaption className="mb-2 min-h-10 text-sm font-semibold">446      GPT Image 2.5 Sunburst447    </figcaption>448    449450![Farmers market mobile app mockup — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/ui-farmers-market-gpt-image-2-5-sunburst.webp>)451452453  </figure>454455456457### Create scientific and educational visuals458459Scientific and educational visuals are strong fits for biology, chemistry, classroom explanations, flat scientific icon systems, diagrams, and learning assets. Prompt them like an instructional design brief: define the audience, lesson objective, visual format, required labels, and scientific constraints. For best results, ask for a clean, flat visual system with consistent icon style, clear arrows, readable labels, and enough white space for students to scan the concept quickly.460461When accuracy matters, list the required components explicitly and say what should not be included. Use `quality="high"` for dense labels, diagrams, or assets that will be used in slides or course materials.462463Generation settings: `size="1536x1024"`, `quality="high"`.464465```text466Create a simple biology diagram titled "Cellular Respiration at a Glance" for high school students.467468Show how glucose turns into energy inside a cell. Include glycolysis, the Krebs cycle, and the electron transport chain.469Use arrows to connect the steps, and label the main molecules: glucose, pyruvate, ATP, NADH, FADH2, CO2, O2, and H2O.470Make it look like a clean classroom handout or slide, with a white background, simple icons, clear labels, and easy-to-read text.471472Avoid tiny text, extra decoration, or anything that makes the diagram hard to understand.473```474475Example outputs:476477478479  <figure className="m-0 min-w-0">480    <figcaption className="mb-2 min-h-10 text-sm font-semibold">481      GPT Image 2.5 Flare482    </figcaption>483    484485![Classroom diagram of cellular respiration — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/scientific-educational-cellular-respiration-gpt-image-2-5-flare.webp>)486487488  </figure>489  <figure className="m-0 min-w-0">490    <figcaption className="mb-2 min-h-10 text-sm font-semibold">491      GPT Image 2.5 Sunburst492    </figcaption>493    494495![Classroom diagram of cellular respiration — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/scientific-educational-cellular-respiration-gpt-image-2-5-sunburst.webp>)496497498  </figure>499500501502### Build slides, diagrams, and charts503504Productivity visuals work best when the prompt is written like an artifact spec rather than an illustration request. Name the exact deliverable (slide, workflow diagram, chart, page image), define the canvas and hierarchy, provide the real text or data, and describe the visual language. These prompts should include practical constraints: readable typography, polished spacing, no decorative clutter, and no generic stock-photo treatment.505506For slides, charts, and diagram-heavy assets, include the numbers and labels directly in the prompt. Use a landscape size for deck-style outputs and `quality="high"` when the image contains small text, legends, axes, or footnotes.507508The sample market figures and citations below are fictional design inputs. Replace them with verified data before using the slide.509510Generation settings: `size="1536x864"`, `quality="high"`.511512```text513Create one pitch-deck slide titled **"Market Opportunity"** that feels like a real Series A fundraising slide from a YC-backed startup.514515Use a clean white background, modern sans-serif typography like Inter, and a crisp, minimal layout. The slide should include:516517* A TAM/SAM/SOM concentric-circle diagram in muted blues and grays518* Specific, believable market sizing numbers:519520  * **TAM:** $42B521  * **SAM:** $8.7B522  * **SOM:** $340M523* A clean bar chart below showing market growth from **2021 to 2026**, with a subtle upward trend524* Small footnotes: **"AGI Research, 2024"** and **"Internal analysis"**525* A company logo placeholder in the bottom-right corner526527The design should look like it belongs in a deck that actually raised money: highly readable text, clear data hierarchy, polished spacing, and professional startup-style visual language.528529Avoid clip art, stock photography, gradients, shadows, decorative elements, or anything that feels generic or overdesigned.530```531532Example outputs:533534535536  <figure className="m-0 min-w-0">537    <figcaption className="mb-2 min-h-10 text-sm font-semibold">538      GPT Image 2.5 Flare539    </figcaption>540    541542![Market opportunity slide with sample market sizing figures — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/market-opportunity-slide-gpt-image-2-5-flare.webp>)543544545  </figure>546  <figure className="m-0 min-w-0">547    <figcaption className="mb-2 min-h-10 text-sm font-semibold">548      GPT Image 2.5 Sunburst549    </figcaption>550    551552![Market opportunity slide with sample market sizing figures — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/market-opportunity-slide-gpt-image-2-5-sunburst.webp>)553554555  </figure>556557558559## Edit images560561Use `client.images.edit` with the referenced input images. For local edits that require a mask, see [editing with a mask](https://developers.openai.com/api/docs/guides/image-generation#edit-an-image-using-a-mask).562563### Translate while preserving layout564565Use each model's coffee-machine diagram from [Explain a process visually](#explain-a-process-visually) as the input. Ask to replace its text while keeping the design unchanged, then check the translation and any words left in the original language.566567Edit settings: `size="1024x1536"`, `quality="high"`.568569```text570Translate the text in the infographic to Spanish. Do not change any other aspect of the image.571```572573Example outputs:574575576577  <figure className="m-0 min-w-0">578    <figcaption className="mb-2 min-h-10 text-sm font-semibold">579      GPT Image 2.5 Flare580    </figcaption>581    582583![Coffee machine diagram translated into Spanish — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/infographic-coffee-machine-sp-gpt-image-2-5-flare.webp>)584585586  </figure>587  <figure className="m-0 min-w-0">588    <figcaption className="mb-2 min-h-10 text-sm font-semibold">589      GPT Image 2.5 Sunburst590    </figcaption>591    592593![Coffee machine diagram translated into Spanish — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/infographic-coffee-machine-sp-gpt-image-2-5-sunburst.webp>)594595596  </figure>597598599600### Transfer a visual style601602Assign the reference image a specific role: its palette, texture, or visual medium. Describe the new subject separately. Use the pixel-art image below as the input.603604Edit settings: `size="1024x1536"`, `quality="medium"`.605606```text607Use the same style from the input image and generate a man riding a motorcycle on a white background.608```609610Input image:611612613614![Pixel-art game screen used as a style reference](<https://developers.openai.com/images/platform/guides/image-prompting/pixels.webp>)615616617618Example outputs:619620621622  <figure className="m-0 min-w-0">623    <figcaption className="mb-2 min-h-10 text-sm font-semibold">624      GPT Image 2.5 Flare625    </figcaption>626    627628![Pixel-art motorcycle rider using the reference style — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/motorcycle-gpt-image-2-5-flare.webp>)629630631  </figure>632  <figure className="m-0 min-w-0">633    <figcaption className="mb-2 min-h-10 text-sm font-semibold">634      GPT Image 2.5 Sunburst635    </figcaption>636    637638![Pixel-art motorcycle rider using the reference style — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/motorcycle-gpt-image-2-5-sunburst.webp>)639640641  </figure>642643644645### Preserve identity and change clothing646647Use the person photograph and three clothing references below as inputs. State which aspects of the person must remain fixed, and allow only the clothing to change. This pattern also applies to edits where a product or object must remain recognizable.648649Edit settings: `size="1024x1536"`, `quality="medium"`.650651```text652Edit 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.653```654655Input images:656657658659  660661![Woman in a museum used as the identity reference](<https://developers.openai.com/images/platform/guides/image-prompting/woman-in-museum.webp>)662663664  665666![Beige jacket used as a clothing reference](<https://developers.openai.com/images/platform/guides/image-prompting/jacket.webp>)667668669  670671![White tank top used as a clothing reference](<https://developers.openai.com/images/platform/guides/image-prompting/tank-top.webp>)672673674  675676![Gray boots used as a clothing reference](<https://developers.openai.com/images/platform/guides/image-prompting/boots.webp>)677678679680681682Example outputs:683684685686  <figure className="m-0 min-w-0">687    <figcaption className="mb-2 min-h-10 text-sm font-semibold">688      GPT Image 2.5 Flare689    </figcaption>690    691692![Woman wearing the supplied clothing items — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/outfit-gpt-image-2-5-flare.webp>)693694695  </figure>696  <figure className="m-0 min-w-0">697    <figcaption className="mb-2 min-h-10 text-sm font-semibold">698      GPT Image 2.5 Sunburst699    </figcaption>700    701702![Woman wearing the supplied clothing items — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/outfit-gpt-image-2-5-sunburst.webp>)703704705  </figure>706707708709### Combine references710711Pass the scene photograph as image 1 and the dog photograph as image 2. Specify which element to move, its destination, and what must remain unchanged.712713Edit settings: `size="1024x1536"`, `quality="medium"`.714715```text716Place 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.717```718719Input images:720721722723  724725![Woman in a street scene, the first compositing input](<https://developers.openai.com/images/platform/guides/image-prompting/test-woman.webp>)726727728  729730![Woman with a dog, the second compositing input](<https://developers.openai.com/images/platform/guides/image-prompting/test-woman-2.webp>)731732733734735736Example outputs:737738739740  <figure className="m-0 min-w-0">741    <figcaption className="mb-2 min-h-10 text-sm font-semibold">742      GPT Image 2.5 Flare743    </figcaption>744    745746![Dog placed beside the woman in the street scene — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/test-woman-with-dog-gpt-image-2-5-flare.webp>)747748749  </figure>750  <figure className="m-0 min-w-0">751    <figcaption className="mb-2 min-h-10 text-sm font-semibold">752      GPT Image 2.5 Sunburst753    </figcaption>754    755756![Dog placed beside the woman in the street scene — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/test-woman-with-dog-gpt-image-2-5-sunburst.webp>)757758759  </figure>760761762763764765766### Create a transparent product cutout767768Request both an isolated subject in the prompt and `background="transparent"` in the API. Use PNG or WebP, preserve the returned alpha channel, and omit `output_compression` for PNG. A drawn checkerboard is not transparency. For subsequent edits, repeat the requirement to preserve the transparent background. Use the product photograph below as the input.769770Edit settings: `size="1024x1536"`, `quality="medium"`, `background="transparent"`, `output_format="png"`.771772```text773Extract the product from the input image and isolate it on a fully transparent background.774Output: centered product, crisp silhouette, no halos/fringing.775Preserve product geometry and label legibility exactly.776Add only light polishing. Do not add a solid backdrop, checkerboard, scenery, or shadow.777Do not restyle the product; remove the background and preserve clean alpha transparency.778```779780Input image:781782783784![Original shampoo product photograph](<https://developers.openai.com/images/platform/guides/image-prompting/shampoo.webp>)785786787788Example outputs:789790791792  <figure className="m-0 min-w-0">793    <figcaption className="mb-2 min-h-10 text-sm font-semibold">794      GPT Image 2.5 Flare795    </figcaption>796    797798![Isolated shampoo bottle from the original example — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/extract-product-gpt-image-2-5-flare.webp>)799800801  </figure>802  <figure className="m-0 min-w-0">803    <figcaption className="mb-2 min-h-10 text-sm font-semibold">804      GPT Image 2.5 Sunburst805    </figcaption>806    807808![Isolated shampoo bottle from the original example — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/extract-product-gpt-image-2-5-sunburst.webp>)809810811  </figure>812813814815### Turn a drawing into a realistic image816817Sketch-to-render workflows are great for turning rough drawings into photorealistic concepts while keeping the original intent. Treat the prompt like a spec: preserve layout and perspective, then _add realism_ by specifying plausible materials, lighting, and environment. Include "do not add new elements/text" to avoid creative reinterpretations.818819Edit settings: `size="1024x1536"`, `quality="medium"`.820821```text822Turn this drawing into a photorealistic image.823Preserve the exact layout, proportions, and perspective.824Choose realistic materials and lighting consistent with the sketch intent.825Do not add new elements or text.826```827828Input image:829830831832![Line drawing of a river valley](<https://developers.openai.com/images/platform/guides/image-prompting/drawings.webp>)833834835836Example outputs:837838839840  <figure className="m-0 min-w-0">841    <figcaption className="mb-2 min-h-10 text-sm font-semibold">842      GPT Image 2.5 Flare843    </figcaption>844    845846![Photorealistic river valley rendered from the drawing — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/realistic-valley-gpt-image-2-5-flare.webp>)847848849  </figure>850  <figure className="m-0 min-w-0">851    <figcaption className="mb-2 min-h-10 text-sm font-semibold">852      GPT Image 2.5 Sunburst853    </figcaption>854    855856![Photorealistic river valley rendered from the drawing — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/realistic-valley-gpt-image-2-5-sunburst.webp>)857858859  </figure>860861862863### Remove an object864865Remove one object by naming it explicitly and preserving everything around it. Keep the person, pose, lighting, and composition unchanged so the edit stays local.866867Edit settings: `size="1024x1536"`, `quality="medium"`.868869```text870Remove the flower from man's hand. Do not change anything else.871```872873Input image:874875876877![Man holding a flower and wearing a blue cap](<https://developers.openai.com/images/platform/guides/image-prompting/man-with-blue-hat.webp>)878879880881Example outputs:882883884885  <figure className="m-0 min-w-0">886    <figcaption className="mb-2 min-h-10 text-sm font-semibold">887      GPT Image 2.5 Flare888    </figcaption>889    890891![Same man after the flower has been removed — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/man-with-no-flower-gpt-image-2-5-flare.webp>)892893894  </figure>895  <figure className="m-0 min-w-0">896    <figcaption className="mb-2 min-h-10 text-sm font-semibold">897      GPT Image 2.5 Sunburst898    </figcaption>899    900901![Same man after the flower has been removed — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/man-with-no-flower-gpt-image-2-5-sunburst.webp>)902903904  </figure>905906907908### Insert a person into a scene909910Insert a person into a new scene while preserving their identity. Specify natural lighting, believable detail, body framing, gaze, and interaction with the scene. State which facial features and proportions must remain unchanged. For `gpt-image-2`, omit `input_fidelity`; image inputs are always processed at high fidelity.911912Use the [woman in the museum](https://developers.openai.com/images/platform/guides/image-prompting/woman-in-museum.webp) as the input image.913914Edit settings: `size="1024x1536"`, `quality="medium"`.915916```text917Generate 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.918She 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.919The 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.920```921922Example outputs:923924925926  <figure className="m-0 min-w-0">927    <figcaption className="mb-2 min-h-10 text-sm font-semibold">928      GPT Image 2.5 Flare929    </figcaption>930    931932![Woman running from a bear in a campsite scene — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/scene-gpt-image-2-5-flare.webp>)933934935  </figure>936  <figure className="m-0 min-w-0">937    <figcaption className="mb-2 min-h-10 text-sm font-semibold">938      GPT Image 2.5 Sunburst939    </figcaption>940    941942![Woman running from a bear in a campsite scene — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/scene-gpt-image-2-5-sunburst.webp>)943944945  </figure>946947948949## Refine an image across turns950951Start with one output, inspect it, and use it as the next input. Keep each follow-up narrow so you can see which change helped.952953### Create the starting image954955Use the shampoo photograph from [Create a transparent product cutout](#create-a-transparent-product-cutout) as the input for this billboard scene. Quote the label text exactly.956957Edit settings: `size="1024x1536"`, `quality="medium"`.958959```text960Create a realistic billboard mockup of the shampoo on a highway scene during sunset.961Billboard text (EXACT, verbatim, no extra characters):962"Fresh and clean"963Typography: bold sans-serif, high contrast, centered, clean kerning.964Ensure text appears once and is perfectly legible.965No watermarks, no logos.966```967968Input image:969970971972![Original shampoo product photograph](<https://developers.openai.com/images/platform/guides/image-prompting/shampoo.webp>)973974975976Example outputs:977978979980  <figure className="m-0 min-w-0">981    <figcaption className="mb-2 min-h-10 text-sm font-semibold">982      GPT Image 2.5 Flare983    </figcaption>984    985986![Shampoo billboard at sunset — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/billboard-gpt-image-2-5-flare.webp>)987988989  </figure>990  <figure className="m-0 min-w-0">991    <figcaption className="mb-2 min-h-10 text-sm font-semibold">992      GPT Image 2.5 Sunburst993    </figcaption>994    995996![Shampoo billboard at sunset — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/billboard-gpt-image-2-5-sunburst.webp>)997998999  </figure>1000100110021003### Change one condition10041005Pass each model's billboard output from the previous step into its next edit request. This short follow-up changes the weather while retaining the existing scene.10061007Edit settings: `size="1024x1536"`, `quality="medium"`.10081009```text1010Make it look like a winter evening with snowfall.1011```10121013Example outputs:1014101510161017  <figure className="m-0 min-w-0">1018    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1019      GPT Image 2.5 Flare1020    </figcaption>1021    10221023![Shampoo billboard in a snowy evening scene — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/billboard-winter-gpt-image-2-5-flare.webp>)102410251026  </figure>1027  <figure className="m-0 min-w-0">1028    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1029      GPT Image 2.5 Sunburst1030    </figcaption>1031    10321033![Shampoo billboard in a snowy evening scene — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/billboard-winter-gpt-image-2-5-sunburst.webp>)103410351036  </figure>1037103810391040### Keep a character consistent10411042For a book with multiple illustrations, create a reusable character reference to help preserve appearance across scenes, poses, and pages. Change the environment and story while repeating the character’s defining details.10431044#### Establish the character10451046Define the character’s appearance, proportions, outfit, and tone.10471048Generation settings: `size="1024x1536"`, `quality="medium"`.10491050```text1051Create a children’s book illustration introducing a main character.10521053Character:1054A young, storybook-style hero inspired by a little forest outlaw,1055wearing a simple green hooded tunic, soft brown boots, and a small belt pouch.1056The character has a kind expression, gentle eyes, and a brave but warm demeanor.1057Carries a small wooden bow used only for helping, never harming.10581059Theme:1060The character protects and rescues small forest animals like squirrels, birds, and rabbits.10611062Style:1063Children’s book illustration, hand-painted watercolor look,1064soft outlines, warm earthy colors, whimsical and friendly.1065Proportions suitable for picture books (slightly oversized head, expressive face).10661067Constraints:1068- Original character (no copyrighted characters)1069- No text1070- No watermarks1071- Plain forest background to clearly showcase the character1072```10731074Example outputs:1075107610771078  <figure className="m-0 min-w-0">1079    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1080      GPT Image 2.5 Flare1081    </figcaption>1082    10831084![Forest hero introducing a children&#x27;s book character — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/childrens-book-illustration-1-gpt-image-2-5-flare.webp>)108510861087  </figure>1088  <figure className="m-0 min-w-0">1089    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1090      GPT Image 2.5 Sunburst1091    </figcaption>1092    10931094![Forest hero introducing a children&#x27;s book character — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/childrens-book-illustration-1-gpt-image-2-5-sunburst.webp>)109510961097  </figure>1098109911001101#### Continue the story11021103Reuse each model's generated character image and describe a new scene. Repeat the appearance constraints so the character stays consistent.11041105Edit settings: `size="1024x1536"`, `quality="medium"`.11061107```text1108Continue the children’s book story using the same character.11091110Scene:1111The same young forest hero is gently helping a frightened squirrel1112out of a fallen tree after a winter storm.1113The character kneels beside the squirrel, offering reassurance.11141115Character Consistency:1116- Same green hooded tunic1117- Same facial features, proportions, and color palette1118- Same gentle, heroic personality11191120Style:1121Children’s book watercolor illustration,1122soft lighting, snowy forest environment,1123warm and comforting mood.11241125Constraints:1126- Do not redesign the character1127- No text1128- No watermarks1129```11301131Example outputs:1132113311341135  <figure className="m-0 min-w-0">1136    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1137      GPT Image 2.5 Flare1138    </figcaption>1139    11401141![Same forest hero helping a squirrel in a winter scene — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/childrens-book-illustration-2-gpt-image-2-5-flare.webp>)114211431144  </figure>1145  <figure className="m-0 min-w-0">1146    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1147      GPT Image 2.5 Sunburst1148    </figcaption>1149    11501151![Same forest hero helping a squirrel in a winter scene — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/childrens-book-illustration-2-gpt-image-2-5-sunburst.webp>)115211531154  </figure>1155115611571158## More workflows11591160### Change furniture in a room11611162Visualize furniture or décor changes in real spaces without recreating the entire scene. The goal is surgical realism: swap a single object while preserving camera angle, lighting, shadows, and surrounding context so the edit looks like a real photograph, not a redesign.11631164Edit settings: `size="1536x1024"`, `quality="medium"`.11651166```text1167In this room photo, replace ONLY the white chairs with chairs made of wood.1168Preserve camera angle, room lighting, floor shadows, and surrounding objects.1169Keep all other aspects of the image unchanged.1170Photorealistic contact shadows and fabric texture.1171```11721173Input image:1174117511761177![Original kitchen with white chairs](<https://developers.openai.com/images/platform/guides/image-prompting/kitchen.webp>)1178117911801181Example outputs:1182118311841185  <figure className="m-0 min-w-0">1186    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1187      GPT Image 2.5 Flare1188    </figcaption>1189    11901191![Kitchen with replacement wooden chairs — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/kitchen-chairs-gpt-image-2-5-flare.webp>)119211931194  </figure>1195  <figure className="m-0 min-w-0">1196    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1197      GPT Image 2.5 Sunburst1198    </figcaption>1199    12001201![Kitchen with replacement wooden chairs — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/kitchen-chairs-gpt-image-2-5-sunburst.webp>)120212031204  </figure>1205120612071208### Design a holiday card12091210For seasonal card concepts, describe the scene, emotional tone, materials, lighting, and exact copy. For a 3D pop-up or photographed-card treatment, specify paper layers, fibers, folds, and soft studio lighting. The example below uses a nostalgic teddy-bear scene.12111212Generation settings: `size="1024x1536"`, `quality="medium"`.12131214```text1215Create a Christmas holiday card illustration.12161217Scene:1218a 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.12191220Mood:1221Warm, nostalgic, gentle, emotional.12221223Style:1224Premium holiday card photography, soft cinematic lighting,1225realistic textures, shallow depth of field,1226tasteful bokeh lights, high print-quality composition.12271228Constraints:1229- Original artwork only1230- No trademarks1231- No watermarks1232- No logos12331234Include ONLY this card text (verbatim):1235"Merry Christmas — some memories never fade."1236```12371238Example outputs:1239124012411242  <figure className="m-0 min-w-0">1243    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1244      GPT Image 2.5 Flare1245    </figcaption>1246    12471248![Holiday card showing a teddy bear by a window — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/christmas-holiday-card-teddy-gpt-image-2-5-flare.webp>)124912501251  </figure>1252  <figure className="m-0 min-w-0">1253    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1254      GPT Image 2.5 Sunburst1255    </figcaption>1256    12571258![Holiday card showing a teddy bear by a window — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/christmas-holiday-card-teddy-gpt-image-2-5-sunburst.webp>)125912601261  </figure>1262126312641265### Design collectible merchandise12661267Explore merchandise and packaging concepts using product photography cues: materials, packaging, and print clarity. Keep designs original and non-infringing, and compare multiple character or packaging variants.12681269Generation settings: `size="1024x1536"`, `quality="medium"`.12701271```text1272Create 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.12731274Concept:1275A nostalgic holiday collectible inspired by the simple toy airplanes1276children used to play with during winter holidays.1277Evokes warmth, imagination, and childhood wonder.12781279Style:1280Premium toy photography, realistic plastic and painted metal textures,1281studio lighting, shallow depth of field,1282sharp label printing, high-end retail presentation.12831284Constraints:1285- Original design only1286- No trademarks1287- No watermarks1288- No logos12891290Include ONLY this packaging text (verbatim):1291"Christmas Memories Edition"1292```12931294Example outputs:1295129612971298  <figure className="m-0 min-w-0">1299    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1300      GPT Image 2.5 Flare1301    </figcaption>1302    13031304![Collectible toy airplane in holiday packaging — GPT Image 2.5 Flare](<https://developers.openai.com/images/platform/guides/image-prompting/christmas-collectible-toy-airplane-gpt-image-2-5-flare.webp>)130513061307  </figure>1308  <figure className="m-0 min-w-0">1309    <figcaption className="mb-2 min-h-10 text-sm font-semibold">1310      GPT Image 2.5 Sunburst1311    </figcaption>1312    13131314![Collectible toy airplane in holiday packaging — GPT Image 2.5 Sunburst](<https://developers.openai.com/images/platform/guides/image-prompting/christmas-collectible-toy-airplane-gpt-image-2-5-sunburst.webp>)131513161317  </figure>1318131913201321## Run a complete example13221323This runnable example remains pinned to `gpt-image-2`. Use it as a baseline, then choose an available model and its supported request settings for your evaluation.13241325The examples below generate four logo variations and extract a product onto a transparent background. Install the [OpenAI SDK](https://developers.openai.com/api/docs/libraries#install-an-official-sdk) with `pip install openai` for Python or `gem install openai` for Ruby. Set `OPENAI_API_KEY` and save the [product photograph](https://developers.openai.com/images/platform/guides/image-prompting/shampoo.webp) as `input_images/shampoo.webp`. Live requests incur API usage charges.1326132713281329### View the complete example133013311332  Generate and edit transparent assets13331334```python1335import base641336from pathlib import Path13371338from openai import OpenAI13391340client = OpenAI()134113421343prompt = """1344Create an original, non-infringing logo for a company called Field & Flour, a local bakery.1345The logo should feel warm, simple, and timeless. Use clean, vector-like shapes, a strong silhouette, and balanced negative space.1346Favor simplicity over detail so it reads clearly at small and large sizes. Flat design, minimal strokes, no gradients unless essential.1347Fully transparent background. Deliver a single centered logo with generous padding, clean alpha edges, and no solid backdrop, scenery, checkerboard, or watermark.1348"""13491350result = client.images.generate(1351    model="gpt-image-2",1352    prompt=prompt,1353    size="1024x1536",1354    quality="medium",1355    background="transparent",1356    output_format="png",1357    n=4,  # Generate 4 versions of the logo1358)13591360# Preserve the returned PNG bytes, including the alpha channel.1361for index, item in enumerate(result.data, start=1):1362    Path(f"logo-generation-{index}-gpt-image-2.png").write_bytes(1363        base64.b64decode(item.b64_json)1364    )13651366# Extract a product from a reference image.1367prompt = """1368Extract the product from the input image and isolate it on a fully transparent background.1369Output: centered product, crisp silhouette, no halos/fringing.1370Preserve product geometry and label legibility exactly.1371Add only light polishing. Do not add a solid backdrop, checkerboard, scenery, or shadow.1372Do not restyle the product; remove the background and preserve clean alpha transparency.1373"""13741375result = client.images.edit(1376    model="gpt-image-2",1377    image=[1378        Path("input_images/shampoo.webp"),1379    ],1380    prompt=prompt,1381    size="1024x1536",1382    quality="medium",1383    background="transparent",1384    output_format="png",1385)13861387Path("extract-product-gpt-image-2.png").write_bytes(1388    base64.b64decode(result.data[0].b64_json)1389)1390```13911392```ruby1393require "base64"1394require "openai"1395require "pathname"13961397client = OpenAI::Client.new1398result = client.images.generate(1399  model: "gpt-image-2",1400  prompt: "Create an original logo for Field & Flour, a local bakery. Use warm, simple shapes on a fully transparent background, with clean alpha edges and no shadow or checkerboard.",1401  size: "1024x1536", quality: :medium, background: :transparent, output_format: :png, n: 41402)1403Array(result.data).each_with_index do |item, index|1404  File.binwrite("logo-generation-#{index + 1}-gpt-image-2.png", Base64.strict_decode64(item.b64_json || raise("No PNG returned")))1405end1406result = client.images.edit(1407  model: "gpt-image-2", image: OpenAI::FilePart.new(Pathname("input_images/shampoo.webp"), content_type: "image/webp"),1408  prompt: "Extract the product onto a fully transparent background. Preserve its geometry and label, with clean edges and no shadow or restyling.",1409  size: "1024x1536", quality: :medium, background: :transparent, output_format: :png1410)1411File.binwrite("extract-product-gpt-image-2.png", Base64.strict_decode64(Array(result.data).fetch(0).b64_json || raise("No PNG returned")))1412```141314141415141614171418For additional prompts and complete workflows, see the [original notebook](https://github.com/openai/openai-cookbook/blob/d310dfa05d20fb653caa9c1c4b89ac1a4aeeeae4/examples/multimodal/image-gen-models-prompting-guide.ipynb).14191420## Check the result14211422Check the output against the requirements before using it:14231424- Is required text accurate and legible? Are diagram labels and relationships correct?1425- Do identities, product shapes, labels, and reference details remain intact?1426- Did the edit change only what you requested?1427- If transparency is required, does the file contain an alpha channel rather than a painted background?14281429Compare quality, latency, and cost on representative inputs when changing prompts or models. See [image generation pricing](https://developers.openai.com/api/docs/pricing#image-generation) for current costs.143014311432    14331434    14351436      <header className="not-prose mb-8">1437        <h21438          id="gpt-image-2-guide"1439          className="m-0 text-3xl font-semibold text-default"1440        >1441          {"GPT Image 2 reference"}1442        </h2>1443        14441445          Overview and request settings for existing GPT Image 2 workflows.1446        14471448      </header>1449      14501451## Overview14521453GPT Image 2 supports image generation and editing, including text rendering, reference-based edits, and flexible output sizes. Use this reference to maintain existing integrations. The [prompting guide](https://developers.openai.com/api/docs/guides/image-prompting?model=gpt-image-2.5) covers shared techniques for composition, text, reference images, and preserving details during edits. Its illustrated examples use GPT Image 2.5 Flare and GPT Image 2.5 Sunburst; outputs can differ across models. For migration, use the guide's [model selection](https://developers.openai.com/api/docs/guides/image-prompting?model=gpt-image-2.5#choose-a-model) and [evaluation workflow](https://developers.openai.com/api/docs/guides/image-prompting?model=gpt-image-2.5#migrate-an-existing-workflow).14541455## Model parameters14561457Use `client.images.generate` for generation and `client.images.edit` for edits. See the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for API setup and request examples.14581459| Parameter            | GPT Image 2                                                                                                          |1460| -------------------- | -------------------------------------------------------------------------------------------------------------------- |1461| `model`              | `gpt-image-2`                                                                                                        |1462| `quality`            | `low`, `medium`, `high`, or `auto`                                                                                   |1463| `size`               | `auto` or a supported resolution; see [size constraints](https://developers.openai.com/api/docs/guides/image-generation#size-and-quality-options) |1464| `input_fidelity`     | Omit it. Image inputs are always processed at high fidelity.                                                         |1465| `output_format`      | `png`, `jpeg`, or `webp`                                                                                             |1466| `background`         | For transparent output, explicitly set `transparent` and use PNG or WebP.                                            |1467| `output_compression` | Use only for JPEG or WebP output, not PNG.                                                                           |14681469Transparent backgrounds are available in preview for `gpt-image-2`.14701471For the original prompts, inputs, and runnable workflows, see the pinned [GPT Image 2 notebook](https://github.com/openai/openai-cookbook/blob/d310dfa05d20fb653caa9c1c4b89ac1a4aeeeae4/examples/multimodal/image-gen-models-prompting-guide.ipynb).147214731474    14751476    14771478      <header className="not-prose mb-8">1479        <h21480          id="gpt-image-1.5-guide"1481          className="m-0 text-3xl font-semibold text-default"1482        >1483          {"GPT Image 1.5 reference"}1484        </h2>1485        14861487          Overview and request settings for existing GPT Image 1.5 workflows.1488        14891490      </header>1491      14921493## Overview14941495**Deprecated model.** `gpt-image-1.5` is scheduled to shut down on December 1,1496  2026. See the [deprecation1497  notice](https://developers.openai.com/api/docs/deprecations#2026-06-02-gpt-image-model-deprecations) and1498  validate existing workflows with `gpt-image-2` before migrating.14991500GPT Image 1.5 supports image generation and editing, including text rendering, photorealistic images, and reference-based edits. Use this reference to maintain existing integrations. The [prompting guide](https://developers.openai.com/api/docs/guides/image-prompting?model=gpt-image-2.5) covers shared techniques for composition, text, reference images, and preserving details during edits. Test those techniques with your model and inputs; outputs can differ across models.15011502## Model parameters15031504Use `client.images.generate` for generation and `client.images.edit` for edits. See the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for API setup and request examples.15051506| Parameter            | GPT Image 1.5                                                                                                                                                                          |1507| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |1508| `model`              | `gpt-image-1.5`                                                                                                                                                                        |1509| `quality`            | `low`, `medium`, `high`, or `auto`                                                                                                                                                     |1510| `size`               | `1024x1024`, `1024x1536`, `1536x1024`, or `auto`                                                                                                                                       |1511| `output_format`      | `png`, `jpeg`, or `webp`                                                                                                                                                               |1512| `output_compression` | 0 to 100, for JPEG or WebP output only                                                                                                                                                 |1513| `background`         | Set `transparent` explicitly for transparent output; use PNG or WebP                                                                                                                   |1514| `input_fidelity`     | `low` or `high`; `high` preserves input details, while `quality` controls output generation. Omit this parameter when migrating to GPT Image 2, which always uses high input fidelity. |151515161517    15181519    15201521      <header className="not-prose mb-8">1522        <h21523          id="gpt-image-1-guide"1524          className="m-0 text-3xl font-semibold text-default"1525        >1526          {"GPT Image 1 reference"}1527        </h2>1528        15291530          Overview and request settings for existing GPT Image 1 workflows.1531        15321533      </header>1534      15351536## Overview15371538**Deprecated model.** `gpt-image-1` is scheduled to shut down on October 23,1539  2026. See the [deprecation1540  notice](https://developers.openai.com/api/docs/deprecations#2026-04-22-legacy-gpt-model-snapshots) and1541  validate existing workflows with `gpt-image-2` before migrating.15421543GPT Image 1 supports image generation and editing with reference images and masks. Use this reference to maintain existing integrations. For shared techniques such as describing a scene, preserving details, and refining an edit, see the [prompting guide](https://developers.openai.com/api/docs/guides/image-prompting?model=gpt-image-2.5).15441545## Model parameters15461547Use `client.images.generate` for generation and `client.images.edit` for edits. See the [image generation guide](https://developers.openai.com/api/docs/guides/image-generation) for API setup and request examples.15481549| Parameter            | GPT Image 1                                                                                                                                                                                                                              |1550| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |1551| `model`              | `gpt-image-1`                                                                                                                                                                                                                            |1552| `quality`            | `low`, `medium`, `high`, or `auto`                                                                                                                                                                                                       |1553| `size`               | `1024x1024`, `1024x1536`, `1536x1024`, or `auto`                                                                                                                                                                                         |1554| `output_format`      | `png`, `jpeg`, or `webp`                                                                                                                                                                                                                 |1555| `output_compression` | 0 to 100, for JPEG or WebP output only                                                                                                                                                                                                   |1556| `background`         | Set `transparent` explicitly for transparent output; use PNG or WebP                                                                                                                                                                     |1557| `input_fidelity`     | `low` or `high`; `high` preserves input details, while `quality` controls output generation. High input fidelity uses more image input tokens. Omit this parameter when migrating to GPT Image 2, which always uses high input fidelity. |
Files main
Menu

Theme