OpenAI

OpenAI: GPT Image 2

Image Generation-15%
openai/gpt-image-2

GPT-image-2 is OpenAI's latest cutting-edge image generation model. Key value adds include better performance, quality, editing controls, and face preservation. The model supports high input_fidelity and adding/removing one aspect of the image while retaining others. This model includes improvements in aspect ratio, resolution, and editing capabilities.

0 context window
0 max output tokens
Released: 2026-04-21
Supported Protocols:OpenAIopenai
Available Providers:OpenAIOpenAI
Capabilities:VisionPrompt Caching

Providers

OpenAIOpenAI
-15%
Input Tokens
$4.25/M
$5/M
Output Tokens
$25.5/M
$30/M
Cache Read
$1.06/M
$1.25/M
Image Input
$8/M
Cached Image
$2/M
Output Image
$30/M
Web Search
$0.01/R
Protocols
OpenAIopenai/v1/images/generations

Code Examples

from openai import OpenAI
client = OpenAI(
base_url="https://api.ofox.ai/v1",
api_key="YOUR_OFOX_API_KEY",
)
response = client.images.generate(
model="openai/gpt-image-2",
prompt="A beautiful sunset over mountains",
size="1024x1024",
)
print(response.data[0].url)

Frequently Asked Questions

OpenAI: GPT Image 2 on Ofox.ai costs $5/M per million input tokens and $30/M per million output tokens. Pay-as-you-go, no monthly fees.