image_generate.gpt_image_2_edit
openai/gpt-image-2/edit

The GPT Image 2 API edits images (OpenAI GPT Image 2) from natural-language prompts. Optional masks for surgical inpainting, transparent-background output, three quality tiers (Low / Medium / High) across sizes from 1024×1024 up to 4K (3840×2160) — all through one REST endpoint, priced 5% below OpenAI's published rate. Representative tiers below; all 18 sizes plus `auto` are available via the API.

Input
The text prompt sent to the model
Output
Sample edited image — run the model to replace this previewSampleRun the model to replace this preview

GPT Image 2 API: Image Editing

Use the GPT Image 2 API to edit images from natural-language prompts.

GPT Image 2 API edits images (OpenAI GPT Image 2) from natural-language prompts. Three quality tiers (Low / Medium / High), 1024–1536 px output, optional masks for inpainting, and transparent-background support — all through one REST endpoint.

Pricing on the GPT Image 2 API is 5% below OpenAI's published rate, held flat across quality tiers. The GPT Image 2 API uses one RouterBase key — no provider-specific SDKs.

Why this model

Six reasons teams ship on the GPT Image 2 API

From mask-driven inpainting to 5% off official pricing — what the GPT Image 2 API gets right.

Natural-language editing

Skip masks and layers. Describe the change and the GPT Image 2 API renders it.

Mask-driven inpainting

Pass an optional mask for surgical edits — the model touches only the masked region.

Transparent backgrounds

PNG with alpha channel. Drop ecommerce assets onto any backdrop in one call.

5% off official

Pay 5% less than OpenAI's published rate; the GPT Image 2 API discount is flat across tiers.

REST + JSON

One endpoint, one key, no SDK lock-in. Plain JSON in, signed URL out.

Three quality tiers

Low / Medium / High render quality at 1024×1024 to 1024–1536 px, set per-call.

RouterBase dashboard preview
Quickstart

Get started with the GPT Image 2 API in 3 steps

From sign-up to your first GPT Image 2 API call in under 5 minutes.

  1. Create a RouterBase API key

    Sign up and generate sk-rb-… — one key works for the GPT Image 2 API and 200+ other models.

  2. POST to the GPT Image 2 API endpoint

    Send a base image, prompt, and optional mask in JSON. The GPT Image 2 API returns a signed URL within seconds.

  3. Inspect the result

    Each GPT Image 2 API response includes generation metadata for auditing and a render URL ready to embed.

Pricing

Pay only for what you use

RouterBase passes through partner-tier pricing. Compared against the model's official published API rate.

SizeLow Quality Medium Quality High Quality
1024 × 1024 Square 1:1$0.0056 $0.0060$0.050 $0.053$0.200 $0.211
1024 × 1536 Portrait 2:3$0.0045 $0.0050$0.039 $0.041$0.156 $0.165
1536 × 1024 Landscape 3:2$0.0045 $0.0050$0.039 $0.041$0.156 $0.165
1024 × 2048 Tall 1:2$0.0038 $0.0040$0.034 $0.035$0.135 $0.142
2048 × 1024 Wide 2:1$0.0038 $0.0040$0.034 $0.035$0.135 $0.142
688 × 2048 Tall 1:3$0.0020 $0.0020$0.019 $0.020$0.075 $0.079
2048 × 688 Wide 3:1$0.0020 $0.0020$0.019 $0.020$0.075 $0.079
880 × 2048 Ultra-tall 9:21$0.0030 $0.0030$0.027 $0.029$0.107 $0.112
2048 × 880 Ultrawide 21:9$0.0030 $0.0030$0.027 $0.029$0.107 $0.112
1152 × 2048 Portrait 9:16$0.0045 $0.0050$0.040 $0.042$0.161 $0.170
2048 × 1152 Landscape 16:9$0.0045 $0.0050$0.040 $0.042$0.161 $0.170
1360 × 2048 Portrait 2:3$0.0060 $0.0060$0.052 $0.055$0.209 $0.221
2048 × 1360 Landscape 3:2$0.0060 $0.0060$0.052 $0.055$0.209 $0.221
1536 × 2048 Portrait 3:4$0.0070 $0.0070$0.063 $0.067$0.253 $0.267
2048 × 1536 Landscape 4:3$0.0070 $0.0070$0.063 $0.067$0.253 $0.267
2048 × 2048 Square 2K$0.011 $0.012$0.102 $0.107$0.407 $0.428
2160 × 3840 Portrait 4K$0.011 $0.011$0.095 $0.100$0.340 $0.400
3840 × 2160 Landscape 4K$0.011 $0.011$0.095 $0.100$0.340 $0.400

Your request will cost $0.050 per run (1024 × 1024 / Medium).With $1 you can run this model approximately 20 times.

Pay only for what you use. GPT Image 2 bills on OpenAI's token model — 5% below published rates: image output priced by size × quality (each of n images billed separately), plus your prompt text ($5 / 1M tokens) and, on edit, reference images ($8 / 1M). The table shows per-image output rates; Official = OpenAI's published rate.

Customer stories

What teams build with this image-edit model

Real production loads running on the GPT Image 2 API and the RouterBase model catalog.

Marcus Reyes
Marcus ReyesCTO, Paradigm AI

We piped product photography through this model and edit cycles dropped from days to minutes.

Priya Lakshmi
Priya LakshmiFounder, Quillo

We swapped three providers through RouterBase in one line of code when OpenAI had its outage. Our users never noticed.

Thomas Beck
Thomas BeckStaff Engineer, Northbeam

Locked product detail across a 500-shot catalog with the GPT Image 2 API — masks plus prompt, no manual cleanup.

Aoi Tanaka
Aoi TanakaML Lead, Daybreak Robotics

The GPT Image 2 API replaced three artist-hours of mask cleanup per shot. Our pipeline barely flinched.

Jonas Keller
Jonas KellerIndie Developer

Plugged the GPT Image 2 API into my existing OpenAI SDK with one base URL swap — less work than writing this testimonial.

Ethan Nguyen
Ethan NguyenHead of Engineering, Compound Studio

RouterBase puts 200+ models behind one key. Our research team stopped asking for new provider accounts.

Sophia Martín
Sophia MartínCTO, Relay

Background-removal moved to the GPT Image 2 API — transparent backgrounds and 1536 px renders behind one REST call.

Lucas Fernandes
Lucas FernandesEngineering Manager, Light

We migrated 42 services to RouterBase over a weekend. The only PR comment we got was 'wait, that's all?'.

David Okonkwo
David OkonkwoCo-founder, Figment

Pricing on the GPT Image 2 API is 5% below OpenAI's published rate — at our scale that's six figures saved per quarter.

Frequently Asked Questions

Common questions about the GPT Image 2 API.

The GPT Image 2 API is RouterBase's pass-through to OpenAI GPT Image 2 (image edit). It edits images from natural-language prompts with optional masks, transparent backgrounds, three quality tiers, and 1024–1536 px output.