Seedance 2.5 is live — 30-second cinematic video with native audio & real-person references

GPT Image 2 — 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.

Highlights
1K–4K · mask editing · up to 4 images per request
Best for
Design assets, edits, text rendering
Input
Text, reference images, optional mask
Output
Up to 4 images per request
Input

Free text · required · ≤ 32000 chars

auto picks ratio from prompt or refs

4k needs widescreen ratio

0/16 files

Up to 16 · uploaded to R2

Estimated cost~$0.0330 credits
Result

Try one of these prompts

What is the GPT Image 2 API?

GPT Image 2 is OpenAI's image generation and editing model, exposed on reAPI as one async endpoint that covers text-to-image, image-to-image with up to 16 reference URLs, and mask-based inpainting. Prompts run up to 32,000 characters and output picks from 14 aspect ratios at 1K, 2K or 4K — 4K is reserved for the six widescreen ratios (16:9, 9:16, 2:1, 1:2, 21:9, 9:21). Billing is per image.

What is the GPT Image 2 API?

What you can build with this model

Real-world workflows and production use cases you can build and ship with this model.

Product photo refresh with GPT Image 2

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
Marketing creatives generated with GPT Image 2

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.

Reference-driven composition with GPT Image 2

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.

First test cost
$0.02222 credits

One sample at the cheapest tier (1 image).

Testing budget guide
Add credits
$10
≈ 454 tests
$50
≈ 2272 tests
$100
≈ 4545 tests
ModelCategoryPrice
Self1K
$0.03
30 credits · 1 image
2K
$0.05
50 credits · 1 image
4K
$0.08
80 credits · 1 image
StableLow
$0.022
22 credits · 1 image
Medium
$0.043
43 credits · 1 image
High
$0.169
169 credits · 1 image
High 4K
$0.954
954 credits · 1 image

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

  1. 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
  2. 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
  3. 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
docs/api/gpt-image-2

API reference

Drop-in code and the full parameter table.

curl -X POST https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "a cute red panda eating bamboo, photorealistic",
    "size": "1:1",
    "resolution": "2k"
  }'

Parameter validation failed

Rejected synchronously with the failing field named. Check enum values, ranges, and URL fields — nothing is charged.

Authentication or balance issue

401 means a missing or invalid Bearer key; 402 means the reserve exceeds your balance. Manage keys and credits in the console.

Content or material rejected

Reference material and outputs pass automated moderation. Rejected tasks fail with a clear error and a full refund.

Task failed or timed out

A task that reaches a failed state is never charged — the reserve refunds automatically. Keep the task id and retry when ready.

Frequently asked questions

Common questions about this model.

GPT Image 2 is OpenAI's text-to-image and image-editing model. reAPI exposes it through one async endpoint with credit-based pricing, so you skip the upstream billing surface entirely while still calling the same underlying model. Two channels are available, priced and feature-scoped independently — pick the one that fits each request.

start building

Ready to ship?

Try it in the playground or grab an API key to integrate now.