GPT Image 2 API — OpenAI Image Generation, One Endpoint
GPT Image 2 generates and edits images through one OpenAI-style API. Async tasks, credit pricing, two variants — production-ready in minutes.
Per-call billing tiered by resolution.
Same API endpoint. The model parameter selects the variant.
Free text · required · ≤ 4000 chars
Provide a prompt or at least one reference image / video / frame.
auto picks ratio from prompt or refs
4k needs widescreen ratio
Up to 16 · uploaded to R2
What you can build
Real workflows powered by this model.

Refresh product photos in batches
Edit existing e-commerce shots without a reshoot. Swap colorways, change backgrounds, or restyle for a new season — GPT Image 2 keeps the original product untouched while the surrounding scene gets reworked. One image URL goes in, an updated render comes out. Run a hundred SKUs through the same prompt template and the catalog stays visually consistent.
Edit a photo
Generate ad creatives at draft speed
Spin four hero variants from a single prompt with the stable channel of GPT Image 2 (n=4). Pick the winner, ship to social, iterate on the rest. The basic channel handles single-image drafts when budget matters more than choice. Same endpoint either way — switch with one string in the request body.

Compose scenes from reference images
Pass up to 16 reference images and the model fuses them into a new composition that respects your brand. Add a mask URL for inpainting — replace a sky, repaint a wall, or swap a logo without redrawing the surrounding pixels. GPT Image 2 handles the fine edges and texture transitions automatically.
Pricing
Credit-based — 1 credit = $0.001 USD. Pay only for completed generations.
| Mode | Category | Unit | Price |
|---|---|---|---|
| Self | |||
| 1K | 1 image | $0.007 7 credits | |
| 2K | 1 image | $0.014 14 credits | |
| 4K | 1 image | $0.02 20 credits | |
| Stable | |||
| Low | 1 image | $0.006 6 credits | |
| Medium | 1 image | $0.047 47 credits | |
| High | 1 image | $0.186 186 credits | |
| High 4K | 1 image | $1.467 1467 credits | |
Why reAPI
Two variants, one endpoint
Send model `gpt-image-2` for the cheap basic channel — single image, flat per-resolution price. Send `gpt-image-2-official` for the stable channel: batches up to four, quality tiers, inpainting masks, transparent backgrounds, output format and compression control. Switch channels by changing one string. No client refactor, no second SDK to learn.
Credits, not surprises
1 credit equals $0.001 USD. The live estimator on this page costs your exact configuration before you submit, so the GPT Image 2 charge in your dashboard matches what you saw at request time. No metering surprises, no minimum commitment, no monthly platform fee — only what your app actually generates.
Async by default
Submit a task, get an ID instantly, poll until done. Nothing to time out, nothing to retry. The same async pattern slots into serverless functions, queue workers, and edge runtimes — wherever you run, the GPT Image 2 endpoint fits the shape your stack already uses.
Integrate GPT Image 2 in three steps
- step 01
Create an API key
Sign up and grab a key from the dashboard. Free signup credits cover a few hundred basic-channel generations before you ever top up — enough to ship the first feature and watch the bill stay at zero.
Open - step 02
Submit a generation
POST a JSON body with `model`, `prompt`, and any optional fields to `/api/v1/images/generations`. Pick `gpt-image-2` for cheap drafts or the stable variant for the full feature set. The endpoint returns a task ID immediately so the request never blocks your handler.
Open - step 03
Poll the result
GET `/api/v1/tasks/:id` until status flips to `completed`. The GPT Image 2 response holds image URLs on our CDN — stable for seven days. Mirror them to your own storage if you need them longer than that.
Open
Frequently asked questions
Common questions about this model.
POST /api/v1/images/generations
Authorization: Bearer $REAPI_API_KEY
Content-Type: application/json
{
"prompt": "..."
}Ready to ship?
Try it in the playground or grab an API key to integrate now.