Skip to content
Agents tracked: 504 Releases (7d): 602 Agent status: no reported issuesSince last limit reset: Claude 13d · Codex 11d For AI agents: Markdown Updated Nov 24, 2026

OpenAI Image API (GPT Image)

by OpenAI

Make and edit pictures from text.

Image generation APIsUp · live status

WebsitePricingGitHub

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-generation

Checked 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

148M
SDK downloads a week
+18.0% on the 4-week average
11.3K
GitHub stars, openai/openai-node
SDK downloads per weeknpm openai, pypi openai 147,735,189

SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.

Pricing

Free tier

None

Cheapest plan

No monthly plan

Usage price

gpt-image-2 1024x1024: $0.006 low / $0.053 medium / $0.211 high per image

Plans

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

ActionPrice
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

Usage tiers (Free, Build, Launch, Grow)

Images per minute (IPM) and other limits depend on your tier and the model; see the limits page in your account

All plans

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

Right now
Up

All Systems Operational

Last 30 days

19 incidents, 2 of them major

From the official status page, checked Nov 23, 2026. status.openai.com

Key and access

How it signs in

OpenAI API key sent as a Bearer header from your server (Authorization: Bearer $OPENAI_API_KEY); the organization may need verification first

Environment variable
OPENAI_API_KEY
Safe in browser code
No, keep it on your server
Card at sign-up

Not 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.

In a paid app
With conditions

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

client-work
With conditions

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

redistribute-files
With conditions

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

Trains on what you send

“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).”

Keeps your data

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

Where data is stored

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

400 image_generation_user_error (for example moderation_blocked)

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.

401 Incorrect API key provided

The key sent with the request is wrong or was revoked.

Check the key; do not retry unchanged.

429 Rate limit reached for requests

Too many images or requests per minute for your tier.

Retry with backoff after Retry-After.

429 credit_balance_exhausted

No prepaid credits left.

Top up credits; retrying does not help.

500 Server error

A problem on OpenAI's side.

Retry after a short wait with backoff.

Use it from an agent

Our agent check

4 of 6: llms.txt yes, OpenAPI no, SDK yes, MCP no, status page yes, AI assistants allowed yes

Checked Nov 13, 2026.

MCP server

OpenAI Docs MCP (documentation only)

claude mcp add --transport http openaiDeveloperDocs https://developers.openai.com/mcp

npm
npm install openai
PyPI
pip install openai

Alternatives

OpenAI Image API (GPT Image) This page

from $0.006No free tier

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.

from $0.0336 per 1K imageNo free tier

Recraft API

Pick Recraft when vector (SVG) images and vectorizing existing pictures are the main need; our catalog lists $0.035 per image.

from $0.04 per raster imageNo free tierOfficial MCP

FLUX API

Pick the FLUX API for FLUX.2 and FLUX 3 generation and editing; our catalog lists it from $0.014 per image.

from $0.03/imageNo free tierOfficial MCP

All image generation apis APIs

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.”

  1. 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

  2. Install the official package (pip install openai or npm install openai).

    pip install openai

    From developers.openai.com/api/docs/quickstart.md

  3. Ask 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.png
    

    From 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"
  }'

Mistakes to avoid

model="gpt-image-1" (or dall-e-3 code copied from an old tutorial)
model="gpt-image-2.6-flare" or "gpt-image-2.6-sunburst" (or the 2.5 versions)

gpt-image-1 was shut down, and old DALL-E examples assume features GPT Image does not have.

Reading result.data[0].url or passing response_format="url"
Decode result.data[0].b64_json and save or upload the bytes yourself

GPT Image models only return base64 data, never a hosted link.

Asking for a transparent background with output_format="jpeg", or drawing a checkerboard in the prompt
background="transparent" with output_format="png" or "webp", and an isolated subject in the prompt

Only PNG and WebP keep transparency; a drawn checkerboard is not transparency.

Retrying a moderation_blocked error in a loop
Show the person a message and ask for a changed prompt or image

User-correctable errors fail again until the request changes.

A 30-second HTTP timeout on the server route that calls images.generate
Allow at least 2 minutes, or stream partial images to show progress

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.