Overview
The API lets you generate and edit images from text prompts using gpt-image-2.5-sunburst and gpt-image-2.5-flare. Choose Sunburst for workflows where editing precision matters most, and Flare for fast, high-quality everyday image generation. You can access image generation capabilities through two APIs:
Image API
The Image API provides two endpoints, each with distinct capabilities:
- Generations: Generate images from scratch based on a text prompt
- Edits: Modify existing images using a new prompt, either partially or entirely
Responses API
The Responses API allows you to generate images as part of conversations or multi-step flows. It supports image generation as a built-in tool, and accepts image inputs and outputs within context.
Compared to the Image API, it adds:
- Multi-turn editing: Iteratively make high fidelity edits to images with prompting
- Flexible inputs: Accept image File IDs as input images, not just bytes
For mainline models that can call the image generation tool, refer to supported models.
Choosing the right API
- If you only need to generate or edit a single image from one prompt, the Image API is your best choice.
- If you want to build conversational, editable image experiences with GPT Image, go with the Responses API.
With the Image API, set model to gpt-image-2.5-sunburst or gpt-image-2.5-flare directly. With the Responses API, select a supported mainline model at the top level and specify gpt-image-2.5-sunburst or gpt-image-2.5-flare in the image generation tool's model field.
Both APIs let you customize output by adjusting quality, size, format, and compression.
To ensure these models are used responsibly, you may need to complete the API Organization Verification from your developer console before using GPT Image models.
<div className="not-prose" style={{ float: "right", margin: "10px 0 10px 10px" }}
<img src="https://developers.openai.com/images/image-25-article/mug.png" alt="A beige coffee mug on a wooden table" style={{ height: "180px", width: "auto", borderRadius: "8px" }} />