OpenAI Image API (GPT Image)
by OpenAI
Make and edit pictures from text.
Image generation APIsUp · live status
1. Price
No free tier on the pricing page. As reported on the official pricing page, checked Nov 1, 2026.
developers.openai.com/api/docs/guides/image-generation2. Commercial use
“Yes, customers own their input and output from our models, including in the case of embeddings.”
You own inputs and outputs; prompts and pictures must pass OpenAI's content policy and follow its Terms of Use (the policy pages block automated readers, so read them in a browser).
developers.openai.com/api/docs/guides/embeddings.md3. Key & sign-up
“Load API keys from an environment variable or key management service on the server.”
OpenAI API key sent as a Bearer header from your server (Authorization: Bearer $OPENAI_API_KEY); the organization may need verification first
developers.openai.com/api/reference/overview.md4. Agent access
“This MCP server is documentation-only. It does not call the OpenAI API on your behalf.”
Our agent check: 4 of 6 (Nov 13, 2026).
developers.openai.com/learn/docs-mcp.mdChecked against the maker's official pages, pricing on Nov 1, 2026. Tap a verdict to see its source.How we checkedReport an error
What OpenAI Image API (GPT Image) does
GPT Image is OpenAI's paid online service for making pictures from a written description and for editing pictures you already have. Your server sends a prompt, and optionally photos, and gets back a finished image file to show or save. It can also return a logo as an editable vector file or a short looping animation.
- OpenAI Image API (GPT Image) is one of 13 APIs in the Image generation APIs category on AgentGid.
- It is not among the 3 that can be started for free.
- 4 of them ship an official MCP server; OpenAI Image API (GPT Image) does not.
- Its official SDK is the 1st most downloaded in the category (156M a week).
What people build with it
Illustrations for posts and lessons
Make a matching picture for each blog post, lesson or children's story from a short description, instead of searching stock sites.
Product shots without a background
Cut a product out of a phone photo onto a see-through background, ready to place on any page or banner.
Change one part of a photo
Mark an area of a room or product photo and describe the change, such as adding a pool or swapping a color, while everything else stays the same.
A logo you can recolor later
Get a simple logo or icon as a vector file, so a designer can change its colors and shapes without redrawing it.
Short looping animations
Turn a description of a small motion, like a lantern lifting and lowering, into a looping GIF for a page or a message.
Cover images for every article Idea
Generate a cover in your site's style each time an editor publishes a post, with the title as the prompt.
OpenAI Image API (GPT Image) popularity
SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.
Pricing
None
No monthly plan
gpt-image-2 1024x1024: $0.006 low / $0.053 medium / $0.211 high per image
Newest models gpt-image-2.5-sunburst and -flare: $8/1M image input, $30/1M image output tokens (Batch 50% off). gpt-image-2 standard: $8 input / $30 output per 1M image tokens. Legacy per-image tables also list GPT Image 1.5, 1 and 1 Mini.
What one action costs
| Action | Price |
|---|---|
| 1 image, gpt-image-2, 1024x1024, low quality | $0.006 |
| 1 image, gpt-image-2, 1024x1024, medium quality | $0.053 |
| 1 image, gpt-image-2, 1024x1024, high quality | $0.211 |
| 1M image output tokens, gpt-image-2.6-sunburst or -flare (standard) | $30.00 |
| 1M image output tokens, gpt-image-2 (Batch) | $15.00 |
As reported on the official pricing page, checked Nov 1, 2026. Prices change: confirm before you buy. developers.openai.com/api/docs/guides/image-generation
Limits
Images per minute (IPM) and other limits depend on your tier and the model; see the limits page in your account
Custom sizes in multiples of 16, aspect ratio from 1:3 to 3:1, up to 3840x2160
From the official docs. developers.openai.com/api/docs/guides/rate-limits.md
Status and incidents
All Systems Operational
19 incidents, 2 of them major
From the official status page, checked Nov 23, 2026. status.openai.com
Key and access
OpenAI API key sent as a Bearer header from your server (Authorization: Bearer $OPENAI_API_KEY); the organization may need verification first
OPENAI_API_KEYNot stated on the pages we read
Steps only a person can do
- Sign in to the OpenAI platform and create an API key. Put it in .env as OPENAI_API_KEY (kept out of git) and read it on the server only.
- Complete API Organization Verification if the dashboard asks for it before GPT Image works. Retry the first request; no code change.
- Add a payment method and buy prepaid credits. No code change.
Commercial use and your data
It is a paid online service, not open source. You own the prompts and images you send and the pictures you get back. Prompts and results must follow OpenAI's content rules, which filter every request.
You own inputs and outputs; prompts and pictures must pass OpenAI's content policy and follow its Terms of Use (the policy pages block automated readers, so read them in a browser).
“Yes, customers own their input and output from our models, including in the case of embeddings.” source
Use a separate project and service account key per client app, and pass a hashed safety identifier for each end user.
“Don't share one developer's key across a team or use that person's identity as the permanent identity of a production application.” source
You own the generated pictures and may pass them on; the content policy still applies, and photos you edit keep their own rights.
“Yes, customers own their input and output from our models, including in the case of embeddings.” source
“As of March 1, 2023, data sent to the OpenAI API is not used to train or improve OpenAI models (unless you explicitly opt in to share data with us).”
Image requests are kept in abuse monitoring logs up to 30 days, not as application state; input images are scanned for CSAM and flagged ones are kept for review.
“Image and file inputs are scanned for CSAM content upon submission.” source
Data residency per project for eligible customers (via sales).
“Data residency controls are a project configuration option that allow you to configure the location of infrastructure OpenAI uses to provide services.” source
Errors to handle
The prompt or input image was rejected, for example by the content filter.
Do not retry as is; change the prompt or the input images, and read error.code.
The key sent with the request is wrong or was revoked.
Check the key; do not retry unchanged.
Too many images or requests per minute for your tier.
Retry with backoff after Retry-After.
No prepaid credits left.
Top up credits; retrying does not help.
A problem on OpenAI's side.
Retry after a short wait with backoff.
Use it from an agent
4 of 6: llms.txt yes, OpenAPI no, SDK yes, MCP no, status page yes, AI assistants allowed yes
Checked Nov 13, 2026.
OpenAI Docs MCP (documentation only)
claude mcp add --transport http openaiDeveloperDocs https://developers.openai.com/mcp
npm install openaipip install openaiAlternatives
OpenAI Image API (GPT Image) This page
Gemini API image generation (Nano Banana / Imagen)
Pick Gemini image generation (Nano Banana) when you already use the Gemini API; our catalog lists it at $0.0336 per image.
Pick Recraft when vector (SVG) images and vectorizing existing pictures are the main need; our catalog lists $0.035 per image.
Pick the FLUX API for FLUX.2 and FLUX 3 generation and editing; our catalog lists it from $0.014 per image.
Get started
Tell your AI assistant
“Add image generation to my app on the server: call OpenAI images.generate with gpt-image-2.6-flare and quality "low" for drafts, decode b64_json, save the PNG to storage and return its URL; key from OPENAI_API_KEY, never in browser code.”
Create an OpenAI API key, keep it in OPENAI_API_KEY on the server, and complete organization verification if the dashboard asks for it.
export OPENAI_API_KEY="your_api_key_here"From developers.openai.com/api/docs/guides/image-generation.md
Install the official package (pip install openai or npm install openai).
pip install openaiAsk for an image and save the returned base64 data as a file.
curl -X POST "https://api.openai.com/v1/images/generations" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-type: application/json" \ -d '{ "model": "gpt-image-2.5-sunburst", "prompt": "A children'\''s book drawing of a veterinarian using a stethoscope to listen to the heartbeat of a baby otter." }' | jq -r '.data[0].b64_json' | base64 --decode > otter.pngFrom developers.openai.com/api/docs/guides/image-generation.md
First request
curl https://api.openai.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-image-2.5-flare",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}'
{
"created": 1713833628,
"data": [
{
"b64_json": "..."
}
],
"usage": {
"total_tokens": 100,
"input_tokens": 50,
"output_tokens": 50,
"input_tokens_details": {
"text_tokens": 10,
"image_tokens": 40
}
}
}
Mistakes to avoid
gpt-image-1 was shut down, and old DALL-E examples assume features GPT Image does not have.
GPT Image models only return base64 data, never a hosted link.
Only PNG and WebP keep transparency; a drawn checkerboard is not transparency.
User-correctable errors fail again until the request changes.
Complex prompts can take up to 2 minutes.
Questions
How much does one picture cost?
It depends on model, size and quality. For gpt-image-2 at 1024x1024 the docs list $0.006 low, $0.053 medium and $0.211 high; newer models are billed per image token.
Do I get a link or a file back?
A file. GPT Image models always return the picture as base64 text that your code decodes and saves.
Can I use the pictures in my product?
Yes, you own your inputs and outputs, as long as prompts and results follow OpenAI's content policy.
Can I get a transparent PNG?
Yes. Ask for an isolated subject and set background to transparent with PNG or WebP output.
Which model should I start with?
GPT Image 2.6 Flare when speed matters most, GPT Image 2.6 Sunburst when detail, layout or precise edits matter.