OpenAI: GPT Image 2

GPT Image 2 is OpenAI's image generation model, released 2026-06, built for high-fidelity generation and editing through the Images API.

Modalities
inTextinImageoutImage
Price / 1M−34%
$1.50 / $9.00$8.00 / $8.00
Context
400K
Knowledge cutoff

Capabilities

VisionLong contextPrompt cachingStructured output

Channels

Same weights on every channel. Requests route to the cheapest healthy one; the channel used is printed on each billing line.

Provider
Discount
Input /M
Output /M
Cache Read /M
Cache Create 5m /M
Cache Create 1h /M
Codexcheap
−34%
$1.50
$9.00
$0.38
Defaultstable
+53%
$3.50
$21.00
$0.88

Quick Start

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.mirapi.ai/v1",   # changed
    api_key=os.environ["MIRAPI_API_KEY"],   # changed
)

resp = client.chat.completions.create(
    model="openai/gpt-image-2",
    messages=[{"role": "user", "content": "Hello"}],
)
Wire GPT Image 2 into your product

1M free tokens to start · no card · OpenAI-compatible, one base_url change

Start free