OpenAI API exposes GPT Image 2 through model ID gpt-image-2. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.
Last refreshed 2026-05-10. Next refresh: weekly.
Quick Start
- 1
- 2
- 3
Code Examples
pip install openaiOPENAI_API_KEYgpt-image-2Use the model slug directly, e.g. "gpt-4o" or "gpt-4.1-mini".
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)Pricing on OpenAI API
| Type | Price (per 1M) |
|---|---|
| Input tokens | $8.00 |
| Output tokens | $30.00 |
| Image input | $8.00 |
Capabilities
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.