LLM Reference
OpenAI API

GPT Image 2 on OpenAI API

GPT Image · OpenAI

Serverless

Last refreshed 2026-05-10. Next refresh: weekly.

Why use GPT Image 2 on OpenAI API?

OpenAI API offers GPT Image 2 with pay-as-you-go pricing at $8.00/1M input tokens. OpenAI is a leading AI research and deployment company dedicated to developing safe and beneficial artificial general intelligence (AGI) for humanity.

Compare GPT Image 2 across 2 providers to find the best fit for your use case
Input / 1M
$8.00
Output / 1M
$30.00
Cache
read $2.00
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install openai
Auth
export OPENAI_API_KEY=...
Call
import os
from openai import OpenAI
client = OpenAI()  # reads OPENAI_API_KEY from env
response = client.chat.completions.create(
Model ID
gpt-image-2

Request example

import os
from openai import OpenAI

client = OpenAI()  # reads OPENAI_API_KEY from env
response = client.chat.completions.create(
    model="gpt-image-2",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Gotchas

  • Use the model slug directly, e.g. "gpt-4o" or "gpt-4.1-mini".
  • The examples expect OPENAI_API_KEY; rename it only if your application config maps the new variable.

Compare GPT Image 2 Across Providers

ProviderInput (per 1M)Output (per 1M)
OpenAI API$8.00$30.00
Vercel AI Gateway$5.00$30.00

Pricing

TypePrice (per 1M)
Input tokens$8.00
Output tokens$30.00
Image input$8.00

Capabilities

VisionMultimodalReasoning

About GPT Image 2

OpenAI's image generation model succeeding DALL-E 3, released April 21, 2026. Uses an autoregressive architecture with native reasoning — the model plans structure and composition before generating pixels. Supports up to 4K (4096×4096) resolution, achieves ~99% character-level text accuracy across Latin, CJK, Hindi, and Bengali scripts, and generates images ~2× faster than DALL-E 3. Debuted at #1 on the Image Arena leaderboard by a +242-point margin. Powered by the GPT-5.4 backbone. API: $8/M image input tokens, $2/M cached, $30/M image output tokens. ChatGPT GA April 22, 2026; API access May 2026.

FAQ

What does GPT Image 2 cost on OpenAI API?

On OpenAI API, GPT Image 2 costs $8.00 per 1M input tokens and $30.00 per 1M output tokens.

How does OpenAI API compare to other GPT Image 2 providers?

GPT Image 2 is available from 2 providers. The cheapest input pricing is $5/1M tokens from Vercel AI Gateway.

What API model ID do I use for GPT Image 2 on OpenAI API?

Use the model ID gpt-image-2 when calling OpenAI API's API.

Who created GPT Image 2?

GPT Image 2 was created by OpenAI as part of the GPT Image model family.

Is GPT Image 2 open source?

GPT Image 2 is not open source; the seed data lists it as proprietary.

Get Started

Model Specs

Released2026-04-21
ArchitectureAutoregressive Image