Text to image
Elo · text-to-image arena
Custom pricing for production workloads
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.
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.
openai/gpt-image-2POST https://api.aimlapi.com/v1/images/generationsGPT 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.
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.
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.
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.
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.
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.
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.
Human-preference results for GPT Image 2 in text to image, next to models available on AI/ML API. Data retrieved Nov 3, 2026.
Elo · text-to-image arena
Arena results for models you can call with the same API key.
Blind pairwise human votes on images generated from text prompts. GPT Image 2 ranks #3 of 98.
| Usage | Price | Unit |
|---|---|---|
| Input | $5 | 1M tokens |
| Output | $30 | 1M tokens |
| Cached input | $1.25 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $5 | $30 | |
| $2 | $8 | |
| $5 | $30 | |
| $5 | $30 | |
| $5 | $32 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"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."
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"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."
}
response = requests.post("https://api.aimlapi.com/v1/images/generations", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"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."
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());GPT Image 2 takes image, text as input and returns image.
GPT Image 2 costs $5 input and $30 output per 1M tokens on AI/ML API, billed as you go with no subscription.
GPT Image 2 is billed per token, charged separately for input and output.
Yes, GPT Image 2 accepts image input as well as a text prompt.
GPT Image 2 was built by OpenAI.
Send a request to https://api.aimlapi.com/v1/images/generations with openai/gpt-image-2 as the model id.
Yes. GPT Image 2 is served through AI/ML API, so the same key and endpoint format used for other models applies.
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.