GPT Image 2

OpenAI's image model for fast, high-quality image generation and editing from text and image input.

Starting at
Input
$5.00/ 1M
Output
$30.00/ 1M
Open dashboard

Channel

Each channel is compared at its lowest input-price tier; output breaks ties. A dash means /api/pricing does not provide that rate. Selecting a channel updates the endpoints and call example below.

openai/gpt-image-2
Input
$5.00 USD per 1M tokens
Output
$30.00 USD per 1M tokens
Cache read
$2.00 USD per 1M tokens
Cache write
- USD per 1M tokens

Endpoints

POST/v1/images/generationsImage generation
POST/v1/chat/completionsChat Completions

Call it

Using openai/gpt-image-2

1from openai import OpenAI23client = OpenAI(4    base_url="https://www.realrelay.ai/v1",5    api_key="sk-***",6)78image = client.images.generate(9    model="openai/gpt-image-2",10    prompt="A quiet reading room at golden hour",11)1213print(image.data[0].url)
1import OpenAI from "openai";23const client = new OpenAI({4  baseURL: "https://www.realrelay.ai/v1",5  apiKey: process.env.REALRELAY_API_KEY,6});78const image = await client.images.generate({9  model: "openai/gpt-image-2",10  prompt: "A quiet reading room at golden hour",11});1213console.log(image.data[0].url);
1curl https://www.realrelay.ai/v1/images/generations \2  -H "Authorization: Bearer $REALRELAY_API_KEY" \3  -H "Content-Type: application/json" \4  -d '{5    "model": "openai/gpt-image-2",6    "prompt": "A quiet reading room at golden hour"7  }'

Prices and availability as published on Oct 12, 2026.

Capabilities

GPT Image 2 creates images from a text description and edits existing images from image input, including inpainting of a chosen region. Flexible image sizes let the output match the layout it is made for.

High-fidelity image inputs let a supplied picture keep more of its detail when it guides the result.

VisionText to imageImage to image
Input
TextImage
Output
Image

Overview

GPT Image 2 is an image generation model from OpenAI for fast, high-quality image generation and editing. It supports flexible image sizes and high-fidelity image inputs, so a reference picture or photo can guide the result. It accepts text and image input and returns images, billed by token.

It accepts text and image input and returns images. It was released on April 21, 2026.

Pricing

GPT Image 2 is priced from $5.00 per 1M input tokens and from $30.00 per 1M output tokens. Cached input reads are priced from $2.00 per 1M tokens. Pricing is token-based, and the rates shown are starting prices.

GPT Image 2 is available through RealRelay's OpenAI-compatible API.

Use cases

Use GPT Image 2 to generate visuals from a written brief at the size a layout needs, such as banners, illustrations, product imagery or social posts.

Use image input to edit an existing picture: inpaint one region of a photo, restyle a reference image or adjust a product shot while keeping its details.

Frequently asked questions

What is GPT Image 2?
GPT Image 2 is an OpenAI image model for fast, high-quality image generation and editing, with text and image input and image output.
How much does GPT Image 2 cost?
GPT Image 2 is priced from $5.00 per 1M input tokens and from $30.00 per 1M output tokens. The rates shown are starting prices. Cached input reads are priced from $2.00 per 1M tokens.
What inputs and outputs does GPT Image 2 support?
GPT Image 2 accepts text and image input and returns images.
Can GPT Image 2 edit existing images?
Yes. GPT Image 2 accepts image input and supports inpainting, so it can edit part of an existing image as well as generate images from scratch.
When was GPT Image 2 released?
GPT Image 2 was released on April 21, 2026.
How do I call GPT Image 2 via the API?
Call GPT Image 2 through RealRelay's OpenAI-compatible API using the model ID openai/gpt-image-2.

More from OpenAI

All 42 OpenAI models