image_generate.gpt_image_2_t2i
openai/gpt-image-2/text-to-image

The GPT Image 2 API generates images (OpenAI GPT Image 2) from natural-language prompts. Sizes from 1024×1024 up to 4K (3840×2160) across square, portrait and landscape, × three quality tiers (Low / Medium / High) — all through one REST endpoint, priced 5% below OpenAI's published GPT Image 2 API 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: Text to Image

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

The GPT Image 2 API generates images (OpenAI GPT Image 2) from natural-language prompts. Three native sizes (1024×1024 Square, 1024×1536 Portrait, 1536×1024 Landscape) and three quality tiers (Low / Medium / High) configurable per call. PNG, JPEG, and WebP output, optional transparent background.

Pricing on the GPT Image 2 API is 5% below OpenAI's published rate, held flat across the 9-tier matrix. 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 native typography to 5% off official pricing — what the GPT Image 2 API gets right.

Natural-language generation

Describe the image; the GPT Image 2 API renders it. No prompt-engineering tricks required.

Three native sizes

Square 1:1, Portrait 2:3, Landscape 3:2 — set per GPT Image 2 API request via one string parameter.

Three quality tiers

Low / Medium / High — speed-vs-detail trade-off configured per call.

Native typography

The GPT Image 2 API renders in-image text reliably (signs, labels, posters, brand assets).

Transparent backgrounds

PNG with alpha for ecommerce mockups and overlay-ready brand assets.

5% off official

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

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

    Send a prompt in JSON, optionally pin size and quality. 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.

ResolutionRouterBaseOfficialSave
quality=low · size=1024x1024 $0.0047$0.0059−20%
quality=medium · size=1024x1024 $0.042$0.053−20%
quality=high · size=1024x1024 $0.169$0.211−20%
quality=low · size=1024x1536 / quality=low · size=1536x1024 $0.0038$0.0047−20%
quality=medium · size=1024x1536 / quality=medium · size=1536x1024 $0.033$0.041−20%
quality=high · size=1024x1536 / quality=high · size=1536x1024 $0.132$0.165−20%
quality=low · size=1024x2048 / quality=low · size=2048x1024 $0.0032$0.0040−20%
quality=medium · size=1024x2048 / quality=medium · size=2048x1024 $0.028$0.035−20%
quality=high · size=1024x2048 / quality=high · size=2048x1024 $0.113$0.142−20%
quality=low · size=688x2048 / quality=low · size=2048x688 $0.0017$0.0021−20%
quality=medium · size=688x2048 / quality=medium · size=2048x688 $0.016$0.020−20%
quality=high · size=688x2048 / quality=high · size=2048x688 $0.063$0.079−20%
quality=low · size=880x2048 / quality=low · size=2048x880 $0.0026$0.0032−20%
quality=medium · size=880x2048 / quality=medium · size=2048x880 $0.023$0.029−20%
quality=high · size=880x2048 / quality=high · size=2048x880 $0.090$0.112−20%
quality=low · size=1152x2048 / quality=low · size=2048x1152 $0.0038$0.0047−20%
quality=medium · size=1152x2048 / quality=medium · size=2048x1152 $0.034$0.042−20%
quality=high · size=1152x2048 / quality=high · size=2048x1152 $0.136$0.170−20%
quality=low · size=1360x2048 / quality=low · size=2048x1360 $0.0051$0.0063−20%
quality=medium · size=1360x2048 / quality=medium · size=2048x1360 $0.044$0.055−20%
quality=high · size=1360x2048 / quality=high · size=2048x1360 $0.176$0.221−20%
quality=low · size=1536x2048 / quality=low · size=2048x1536 $0.0059$0.0074−20%
quality=medium · size=1536x2048 / quality=medium · size=2048x1536 $0.053$0.067−20%
quality=high · size=1536x2048 / quality=high · size=2048x1536 $0.213$0.267−20%
quality=low · size=2048x2048 $0.0095$0.012−20%
quality=medium · size=2048x2048 $0.086$0.107−20%
quality=high · size=2048x2048 $0.343$0.428−20%
quality=low · size=2160x3840 / quality=low · size=3840x2160 $0.0089$0.011−20%
quality=medium · size=2160x3840 / quality=medium · size=3840x2160 $0.080$0.100−20%
quality=high · size=2160x3840 / quality=high · size=3840x2160 $0.320$0.400−20%

Your request will cost $0.042 per run (quality=medium · size=1024x1024).With $1 you can run this model approximately 23 times.

Customer stories

What teams build with the GPT Image 2 API

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

Marcus Reyes
Marcus ReyesCTO, Paradigm AI

We generate 200 marketing creatives a day through the GPT Image 2 API. Weekly cycles dropped to overnight.

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

In-image typography on the GPT Image 2 API saves us a Photoshop round trip per asset — labels, signs, and posters render correctly first try.

Aoi Tanaka
Aoi TanakaML Lead, Daybreak Robotics

The GPT Image 2 API became our default for synthetic data thumbnails. Pipeline went from days to hours.

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

Generated 1536×1024 hero banners through the GPT Image 2 API at one-fifth our previous cost.

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's flagship image-generation model. It renders images from natural-language prompts across three native sizes and three quality tiers, with PNG / JPEG / WebP output and optional transparent background.