OpenAI: GPT Image 2
gpt-image-2- Input / Output-30%
- $5.00 / $30.00$3.50 / $21.00
- Modalities
- Image
About GPT Image 2
gpt-image-2 is OpenAI's image model for generating and editing pictures from written directions and reference images. It accepts text and images and returns images through the image generation and image edit endpoints. It supports inpainting, flexible output sizes, and high-fidelity image inputs. GPT Image 2.5 Flare and Sunburst now succeed it, so it is mainly the established option.
Where it works well
- Generates from text and edits from reference images in the same model.
- Supports inpainting, so a masked region can change while the rest stays put.
- Offers flexible image sizes, which helps when a layout needs a particular shape.
- Takes high-fidelity image input, useful for keeping a product or subject recognizable across edits.
When to choose another model
- GPT Image 2.5 Flare produces higher-quality images with lower latency, per OpenAI, so it is the better default for new work.
- Sunburst gives tighter control across edits, which gpt-image-2 does not match on premium revisions.
Getting started
Create API key
Create a key in Console, then use it with every model on the platform.
Send your first request
Copy the example for your language and run it against the endpoint.
Image editingText to imageTokenLab endpointPOST/v1/images/generationscurl -X POST "https://api.tokenlab.sh/v1/images/generations" \ -H "Authorization: Bearer sk-xxx" \ -H "Content-Type: application/json" \ -d '{ "background": "auto", "operation": "text-to-image", "quality": "auto", "size": "auto", "model": "gpt-image-2", "prompt": "A minimalist product photo of matte black headphones on a soft blue background." }'
Pricing
The Verified price applies to Verified, which costs less on most models. The Official price is the model maker's published price and applies to the more reliable Official route. Auto bills the route that completes the request.
Text to image / Image editing · Image
per 1M tokens- Official price
- Input $5.00 / Output $30.00 / Text Input $5.00 / Text Input · Cache read $1.25 / Image Input $8.00 / Image Input · Cache read $2.00 / Image Output $30.00
- Verified price
- Input $3.50 / Output $21.00 / Text Input $3.50 / Text Input · Cache read $0.875 / Image Input $5.60 / Image Input · Cache read $1.40 / Image Output $21.00
- Discount
- -30%
Default spec
per 1M tokens- Official price
- Cache read $1.25
- Verified price
- Cache read $0.875
- Discount
- -30%
Cache read
- Official price
- $1.25
- Verified price
- $0.875
- Discount
- -30%
| Official priceper 1M tokens | Verified priceper 1M tokens | Discount | |
|---|---|---|---|
| Text to image / Image editing · Image | Input $5.00 / Output $30.00 / Text Input $5.00 / Text Input · Cache read $1.25 / Image Input $8.00 / Image Input · Cache read $2.00 / Image Output $30.00 | Input $3.50 / Output $21.00 / Text Input $3.50 / Text Input · Cache read $0.875 / Image Input $5.60 / Image Input · Cache read $1.40 / Image Output $21.00 | -30% |
| Default spec | Cache read $1.25 | Cache read $0.875 | -30% |
| Prompt cache pricing | |||
| Cache read | $1.25 | $0.875 | -30% |
Usage & activity
Success rate is the share of requests that completed. Latency is how long a full response takes; P95 means 95% of requests finished within that time.
Usage & availability
Last 24 hours- Requests
- Success rate
- P95 latency
- Total tokens
- 30-day success rate
- 99.5%
- 7-day median latency
- 36.7 sn=1,640
- 7-day P95 latency
- 131.3 sn=1,640
- 30-day requests
- 5K+
- Last active
- 4 hours ago
Data is based on aggregate user requests, excluding status checks.
Open in Console
Open GPT Image 2 in Console with a prompt ready to edit or send.
Help me create an image with gpt-image-2 using text-to-image at /v1/images/generations. Show the result, cost, and any limits I should know.
Use cases
Best for- Text to Image
Product scene edits
Place an existing product shot in a new background or setting while the item itself stays intact.
Concept art iteration
Describe a composition, then refine it through several edit passes, changing colour, mood, or layout one step at a time.
Marketing visuals
Create banners and social images that follow the style and subject of references you supply, at the size your layout needs.
Masked retouching
Replace one area, such as a sign or a sky, using inpainting.
Prompt examples
A ceramic coffee mug on a walnut desk beside a window, soft morning light, shallow depth of field.
Keep the sneaker as it is and change the background to a rain-wet city street at night.
Replace the blank poster in the masked area with a retro travel poster of Lisbon.
This model has conditional pricing. Monthly token totals alone cannot produce a reliable estimate; use the detailed pricing for the request specification, cache, and applicable time window.
FAQ
What is gpt-image-2 used for?
It is an OpenAI model that creates and edits images from text and image inputs. It is reached through the image generation and image edit endpoints.
Can gpt-image-2 edit an existing image?
Yes. It supports the image edits endpoint with reference images and inpainting, so you can change one part of a picture while the rest of the image stays unchanged.
Should I use gpt-image-2 or GPT Image 2.5?
OpenAI says Flare gives higher quality than gpt-image-2 at half the latency, and Sunburst is for premium editing control. Stay on gpt-image-2 only where outputs are already approved.
Does gpt-image-2 support different sizes?
Yes. OpenAI documents flexible image sizes and high-fidelity image inputs, so you can request the aspect ratio your layout needs and still keep detail from a supplied reference.
What does it output?
Images only. It does not return text answers or video, and it works through the image generation and edit endpoints rather than through chat completions requests.
How much does GPT Image 2 cost?
On TokenLab, GPT Image 2 costs Input $3.50 / Output $21.00 per 1M tokens. The pricing table above shows the full breakdown. Rates depend on the billing unit, specification, and usage. Compare matching conditions in the model's detailed pricing; a single rate does not determine the total cost.
Which endpoint should GPT Image 2 use?
Use https://api.tokenlab.sh/v1/images/generations for GPT Image 2. The request example below shows the matching code shape.
Which operations does GPT Image 2 support?
GPT Image 2 supports Image editing, Text to image. Select an operation above to see its endpoint and request example.
Compare GPT Image 2
Guides that use GPT Image 2
Sources
Reviewed Oct 2, 2026