GPT Image 2 API

GPT Image 2 (gpt-image-2) is OpenAI's most capable image generation model to date, reason before it draws, search the web in real time, and render production-ready text in over a dozen languages.

Modalities
Text, ImageImage
In / Out price
$5/$30per 1M
Model type
Image generation
Released
Apr 22, 2026

GPT Image 2 overview

Quality
Size
Sample GPT Image 2 image generated through AI/ML API: A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lette

GPT Image 2 by OpenAI

The model combines advanced multimodal training with diffusion-based image generation. This enables it to convert complex instructions into visually consistent outputs while preserving strong control over composition, typography, and layout.

GPT Image 2 specs

Model ID
openai/gpt-image-2
Developer
OpenAI
Input
Text, Image
Output
Image
Endpoint
POST https://api.aimlapi.com/v1/images/generations

What Is GPT Image 2 API?

GPT Image 2  is OpenAI's third-generation flagship image model, officially launched on April 21, 2026. It follows gpt-image-1 (March 2025) and gpt-image-1.5 (December 2025), representing the most significant architectural leap in the series.

What sets GPT Image 2 apart from everything before it is a fundamental shift in how the model approaches generation. Rather than jumping straight from a text prompt to pixels, GPT Image 2 first thinks. It reasons about composition, structure, and accuracy before committing to an output. That reasoning step, borrowed from OpenAI's O-series language models, is what makes it the industry's first truly agentic image generation model.

Core Capabilities

GPT Image 2 does not improve any single dimension of image generation, it expands what the category can do. These are the capabilities that matter most for real production workflows.

Agentic Reasoning

Before generating a single pixel, the model researches, plans, and reasons about image structure. This is the first image model with O-series reasoning built in, resulting in fewer failed generations on complex briefs.

Built-In Web Search

GPT Image 2 can query the web in real time before generating, confirming brand logos, event details, product designs, and geographic references that would otherwise be approximated or hallucinated.

Near-Perfect Text Rendering

Typography inside generated images now reads correctly more than 99% of the time. Multi-line headlines, CTA buttons, UI labels, and fine-print captions are all handled reliably, including mixed-script layouts.

2K Resolution & Flexible Aspect Ratios

Outputs up to 2048px, with aspect ratios from 3:1 (ultra-wide banners) to 1:3 (mobile screens). Covers every production format from social ads to presentation slides without post-processing resizing.

Use cases

GPT Image 2 is documented as suited to producing marketing and brand assets such as product mockups, ad creatives, and social graphics with accurate text and logo placement. It is also suited to UI and product design work, including realistic interface screenshots and app mockups for early-stage prototyping and stakeholder presentations. Another documented use case is publishing and editorial work, including book covers, infographics, and illustrated articles where readable text inside images is required. It is also described as useful for e-commerce tasks such as product photography variations, background replacements, and packaging visualization.

GPT Image 2 benchmarks by Artificial Analysis

Human-preference results for GPT Image 2 in text to image, next to models available on AI/ML API. Data retrieved Nov 3, 2026.

Text to image

Elo · text-to-image arena

Models on AI/ML API

Arena results for models you can call with the same API key.

Text to image

Blind pairwise human votes on images generated from text prompts. GPT Image 2 ranks #3 of 98.

GPT Image 2 API pricing

GPT Image 2 pricing in US dollars
UsagePriceUnit
Input$51M tokens
Output$301M tokens
Cached input$1.251M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

GPT Image 2 vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
GPT Image 2$5$30
GPT Image 1 Mini$2$8
GPT Image 2.5 Flare$5$30
GPT Image 2.5 Sunburst$5$30
GPT Image 1.5$5$32

How to use the GPT Image 2 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/images/generations' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-image-2",
  "prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo."
}'

Related articles

All posts

GPT Image 2 FAQ

What inputs and outputs does GPT Image 2 support?

GPT Image 2 takes image, text as input and returns image.

How much does GPT Image 2 cost?

GPT Image 2 costs $5 input and $30 output per 1M tokens on AI/ML API, billed as you go with no subscription.

How is GPT Image 2 billed?

GPT Image 2 is billed per token, charged separately for input and output.

Can GPT Image 2 take an existing image as input?

Yes, GPT Image 2 accepts image input as well as a text prompt.

Who created GPT Image 2?

GPT Image 2 was built by OpenAI.

How do I call GPT Image 2 on AI/ML API?

Send a request to https://api.aimlapi.com/v1/images/generations with openai/gpt-image-2 as the model id.

Is GPT Image 2 available through a single API key?

Yes. GPT Image 2 is served through AI/ML API, so the same key and endpoint format used for other models applies.

What is the GPT Image 2 model ID?

Use openai/gpt-image-2 as the model parameter. Requests go to https://api.aimlapi.com/v1/images/generations with your AI/ML API key.

Start building with GPT Image 2

GPT Image 2 API

openai/gpt-image-2

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/images/generations' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-image-2",
  "prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo."
}'