Back to Models

GPT Image 2

openaiopenai/gpt-image-2

How TheRouter serves this differently from the vendor

As the vendor operates it

OpenAI serves direct gpt-image-2 calls on /v1/images/generations and /v1/images/edits; its model page marks /v1/responses and /v1/chat/completions as not supported for the model ID itself.

On TheRouter

TheRouter exposes the same image generation and image edit surfaces under https://api.therouter.ai/v1 with the routed model id openai/gpt-image-2. Examples therefore keep the OpenAI SDK shape but change baseURL, API key, and model slug.

Media Generation Capabilities

image_generation
sizes
  • 1024x1024
  • 1024x1536
  • 1536x1024
qualities
  • low
  • medium
  • high
max_outputs_per_request
4
output_formats
  • png
  • jpeg
  • webp
defaults
size
1024x1024
quality
medium
image_edit
sizes
  • 1024x1024
  • 1024x1536
  • 1536x1024
qualities
  • low
  • medium
  • high
max_reference_images
4
output_formats
  • png
  • jpeg
  • webp
defaults
size
1024x1024
quality
medium

API guide

Image generation

Generate images from text prompts using the standard OpenAI Images API. Supports 2K resolution, quality tiers, output format selection, transparent backgrounds, and up to 8 images per batch.

cURL
curl https://api.therouter.ai/v1/images/generations \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "prompt": "A serene mountain landscape at sunset, photorealistic style",
    "n": 1,
    "size": "2048x2048",
    "quality": "medium",
    "output_format": "png"
  }'

Image editing

Edit existing images using text prompts and reference images. Supports high-fidelity image inputs, masked editing, and multi-image composition.

cURL
curl https://api.therouter.ai/v1/images/edits \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -F "model=openai/gpt-image-2" \
  -F "image=@input.png" \
  -F "prompt=Replace the sky with a starry night sky, keep the foreground unchanged" \
  -F "size=2048x2048"

Recent coverage

Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release dateopenai.com β†—2026-05-29verified
Max resolutiondevelopers.openai.com β†—2026-08-04verified
Aspect ratiosdevelopers.openai.com β†—2026-08-04verified
Output formatsdevelopers.openai.com β†—2026-08-04verified
Knowledge cutoffdevelopers.openai.com β†—2026-08-04unknown
Thinking modeopenai.com β†—2026-05-29verified
Images per promptdevelopers.openai.com β†—2026-08-04unknown
Licenseβ€”β€”verified
Image Arena β€” Text-to-Image (overall)arena.ai β†—2026-08-04verified
Image Arena β€” Single-Image Editarena.ai β†—2026-08-04verified
Image Arena β€” Multi-Image Editarena.ai β†—2026-08-04verified
Image Arena β€” Text Rendering sub-categoryarena.ai β†—2026-08-04verified
Image Arena β€” Product, Branding & Commercial Designarena.ai β†—2026-08-04verified
Image Arena β€” Portraits sub-categoryarena.ai β†—2026-08-04verified
OpenAI launches ChatGPT Images 2.0 with gpt-image-2 β€” reasoning-powered image generationopenai.com β†—2026-05-29verified
How is gpt-image-2 different from gpt-image-1.5?openai.com β†—2026-05-29to verify
What resolution and aspect ratios does gpt-image-2 support?felloai.com β†—2026-05-29to verify
Is gpt-image-2 compatible with the existing DALLΒ·E 3 integration I already have?gptimage2.design β†—2026-05-29to verify
Help & contact