Runbase

Command Palette

Search for a command to run...

OpenAI

GPT Image 2

ID:openai/gpt-image-2

GPT Image 2 image generation API by OpenAI — up to 4K with native reasoning, multilingual text rendering, and reference-guided editing.

Text to imageImage editingReference imagesCommercial use
Input
Aspect ratio
Resolution
Reference images
Max 4 images, 4MB each
OutputView all
Output will appear here
1K
$0.05
2K
$0.07
4K
$0.12
cURL
curl https://api.runbase.net/v1/runs \
  -H "Authorization: Bearer $RUNBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "input": {
      "prompt": "A cinematic product photo of a ceramic lamp",
      "aspect_ratio": "1:1",
      "resolution": "1K"
    }
  }'

Examples

Scientific Infographic

Scientific Infographic

1:1

A detailed scientific infographic of an integrated biohybrid artificial photosynthesis platform for solar-to-fuel conversion, with labeled cross-section diagrams, molecular structures, efficiency charts, and process flow annotations

Candid Photorealism

Candid Photorealism

16:9

A photorealistic candid shot of a young man in a light grey Covernat hoodie sitting at station 139 in a premium PC cafe, focused on his laptop screen, soft window light mixing with monitor glow, shallow depth of field

UI Recreation

UI Recreation

16:9

A pixel-perfect recreation of the YouTube homepage UI with a left sidebar showing Home, Shorts, Subscriptions, History, and Explore sections, a top navigation bar with search and profile icon, category filter chips, and an 8-video thumbnail grid with realistic titles, channel names, view counts, and duration stamps

Overview

GPT Image 2 is OpenAI's flagship image generation model, released in April 2026. It's one of the first image models with built-in reasoning — the model plans composition and verifies prompt constraints before generating. It supports multilingual text rendering across scripts including CJK, Hindi, and Bengali, making it well-suited for global creative work.

Use cases

Product photography with accurate lighting and materials. Campaign and editorial visuals where photorealism and fine detail matter. Infographics, UI mockups, and poster designs that require legible embedded text. Reference-guided editing — upload up to 4 images to steer style, color palette, or composition.

Inputs

All parameters are passed in the input object of the run request.

ParameterRequiredDescription
promptYesText description of the image to generate (1–4000 chars)
aspect_ratioNoOutput aspect ratio. Default 1:1. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
resolutionNoOutput resolution. Default 1K. Options: 1K, 2K, 4K (4K only with 16:9, 9:16, or 21:9)
image_urlsNoUp to 4 reference images (max 4 MB each) for image-to-image generation

Prompt tips

Describe materials and lighting explicitly

GPT Image 2 responds well to physical descriptions. "Matte ceramic vase on a walnut table, soft window light from the left" consistently outperforms "a vase on a table."

Pair 4K with widescreen ratios

4K output is restricted to 16:9, 9:16, and 21:9. For maximum detail in landscape or ultra-wide compositions, combine resolution: "4K" with one of these ratios.

Use reference images for style consistency

Provide reference images that closely match your target style — the model uses them to guide color palette and composition rather than extrapolating from distant references.

Limitations

  • Small text in images may need iteration for accuracy
  • Complex hands, logos, and precise layout constraints should be reviewed manually
  • 4K resolution only available with 16:9, 9:16, or 21:9 aspect ratios
  • Maximum 4 reference images per request, 4 MB each
  • Prompt length capped at 4000 characters

FAQ

What aspect ratios does GPT Image 2 support?

Ten options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, and 21:9. The default is 1:1.

Does GPT Image 2 support 4K?

Yes — 1K, 2K, and 4K are available. 4K is limited to 16:9, 9:16, and 21:9 ratios.

Can I edit existing images?

Yes. Upload up to 4 reference images via image_urls to guide the generation with your own visuals.