GPT Image 2 API: Which Model ID to Use, from $0.01 per Image

If you are calling GPT Image 2 from code, the short version is this: use gpt-image-2 for most work, at a flat $0.025, $0.03 or $0.05 per image for 1K, 2K or 4K; use gpt-image-2-all when you need low or high quality, or the synchronous response shape of the OpenAI SDK; use gpt-image-2-lite at $0.01 per image for drafts. Plan for about a minute per 2K image, poll for up to ten minutes rather than three, and read the real width and height off every result. The rest of this post backs each of those numbers.

Disclosure up front: the numbers below come from apimodels.app, which is the API I work on. apimodels.app is a multi-model API gateway: one API key and one OpenAI-compatible endpoint for image, video, audio and language models. All three GPT Image 2 model ids above run on it. Latency and failure figures are measured on our production traffic over the last 7 days (sample size not disclosed), rounded to whole seconds and whole percentages.

Three model ids, one model

All three ids call OpenAI's GPT Image 2 through the same endpoint, POST /v1/images/generations. They differ in contract and price, not in the model behind them.

  • gpt-image-2 is the async default. You send aspect_ratio and resolution (1K, 2K or 4K), get a task id back, and poll it or receive a webhook. Quality is fixed at medium: a quality value you pass is ignored, so the price of each tier never moves.
  • gpt-image-2-all exposes the quality matrix (low, medium, high, and auto, which bills as medium). It also accepts an OpenAI-style WxH size, which switches it to a synchronous response that the official OpenAI SDK reads as-is.
  • gpt-image-2-lite is one tier at $0.01 per image. Output is about 1.5 MP at your aspect ratio, the response is synchronous, and quality is ignored. There is no 2K or 4K on lite.

All three accept reference images for edits and multi-image fusion, as public URLs (image_url, image_urls) or a local file in image_base64; gpt-image-2 and gpt-image-2-all take up to 16 references per request. One pointer: if you need high quality, GPT Image 2.5 is usually the better pick, since its high tier is $0.03 at 1K and $0.04 at 2K against $0.07 and $0.10 on gpt-image-2-all.

What a request looks like

The example below follows the parameters in our docs. It is syntax-checked but was not run for this post; set APIMODELS_API_KEY first.

import os, time, requests

URL = "https://api.apimodels.app/v1/images/generations"
HEADERS = {"Authorization": f"Bearer {os.environ['APIMODELS_API_KEY']}"}

job = requests.post(URL, headers=HEADERS, timeout=30, json={
    "model": "gpt-image-2",
    "prompt": "Three hand-poured candles on a slate shelf, warm side light, "
              "plain wall on the right for a price tag",
    "aspect_ratio": "16:9",
    "resolution": "2K",            # the tier decides the price
}).json()
if job["code"] != 200:             # 400, 402 ...: no task was created
    raise RuntimeError(job["msg"])
task_id = job["data"]["taskId"]

deadline = time.time() + 600       # 2K p90 is about 135 s, see below
while time.time() < deadline:
    data = requests.get(URL, headers=HEADERS, timeout=30,
                        params={"task_id": task_id}).json()["data"]
    if data["state"] == "completed":
        imgs = data.get("images") or [{"url": u} for u in data["resultUrls"]]
        for img in imgs:
            print(img["url"], img.get("width"), img.get("height"))
        break
    if data["state"] == "failed":
        raise RuntimeError(f"{data['failCode']} retryable={data['retryable']}: "
                           f"{data['failMsg']}")
    time.sleep(5)
else:
    print("Still running. Look it up later by task id:", task_id)

Two notes on that loop. A 180-second polling deadline, common in examples, abandons a noticeable share of 2K and 4K jobs that would have finished. And giving up cancels nothing: the task keeps running and is billed if it completes, so resubmitting at that point pays for the same image twice. Look the task up later instead. In production, add callback_url to the create request and the finished task is POSTed to your endpoint in the same shape as the poll response.

How long it takes

End-to-end time from submit to finished image, successful requests only, including queueing and any automatic rerouting:

Model id and tierp50 (s)p90 (s)
gpt-image-2, 1K3683
gpt-image-2, 2K65135
gpt-image-2, 4K65173
gpt-image-2-all, 1K4664
gpt-image-2-all, 2K73184
gpt-image-2-all, 4K (smaller sample)77195
gpt-image-2-lite3152

What to do with those numbers:

  • On gpt-image-2, 2K and 4K take about the same time at the median. The difference is in the tail, where 4K runs about 40 seconds longer at p90. Dropping from 4K to 2K mostly speeds up your slowest requests, not the typical one.
  • Reference images add time. On gpt-image-2 at 2K the median goes from 64 seconds for text-to-image to 73 seconds with references; on gpt-image-2-all at 1K, from 30 to 47 seconds.
  • Low quality is the fast draft. On gpt-image-2-all at 1K, low runs 34 / 48 seconds (p50 / p90) against 48 / 65 for medium, at $0.01 instead of $0.025.
  • Lite is the quickest of the three, so it is the one to put behind a button that a person is watching.

How often it fails, and what to retry

Over the same 7 days, about 6% of gpt-image-2 requests were refused by content moderation (about 5% on gpt-image-2-all and 6% on lite), and fewer than 1% failed for any other reason on each of the three ids.

That second number is low because every resolution tier of all three ids, for every documented aspect ratio, has more than one upstream route. When a route answers busy, rate-limited or timed out, the request moves to the next route without the caller doing anything. On gpt-image-2, about 89% of requests that hit such a route error still came back with an image, and most of the rest were then refused by moderation rather than lost to an outage. Failed tasks are not billed: the poll response for a failed task shows credits: 0, and the reserved amount returns to your balance.

Every failed task carries a standard failCode and a retryable flag. Retry only when retryable is true, which covers UPSTREAM_BUSY, UPSTREAM_FAILED and TIMEOUT, at most twice and a few seconds apart. Do not retry CONTENT_MODERATION, INVALID_INPUT or INSUFFICIENT_BALANCE; change the prompt, the parameters or the balance instead. To reconcile a batch, GET /v1/records/{task_id} returns each task's final state and the amount actually charged.

Did you get the size you paid for?

Price follows the tier, so check what came back. Completed tasks now carry an images list with url, width and height for every image, in poll responses and callbacks alike.

Since results started carrying those fields, every gpt-image-2 image we delivered landed in the tier that was requested. Two things to know when you read them:

  • The pixel size inside a tier is not fixed. The aspect ratio is honored, but the pixels land on the model's size grid. A 2K 1:1 image is 2048x2048, while 2K 3:4 images have come back as 1760x2352, 1776x2368 and 1536x2048. Read the dimensions instead of hard-coding them.
  • 1K means about 1 MP or a little more. A 1K square arrives as 1024x1024 or 1254x1254.

If your layout needs an exact WxH, resize after delivery, and compare each file's real size with the ratio and tier you asked for; that check catches problems from any provider.

Prices, as of October 27, 2026

Fixed price per image, in US dollars:

Model id and quality1K2K4K
gpt-image-2 (always medium)0.0250.030.05
gpt-image-2-all, low0.010.0250.05
gpt-image-2-all, medium or auto0.0250.030.05
gpt-image-2-all, high0.070.100.23
gpt-image-2-lite (about 1.5 MP)0.01n/an/a

Two details the table hides. At 4K, low and medium cost the same on gpt-image-2-all, so asking for low at 4K saves nothing. And pass resolution explicitly instead of letting a pixel size pick the tier, so the tier you are billed for is never a guess.

OpenAI bills GPT Image 2 by output tokens. At its standard (non-batch) rates, a 1024x1024 image works out to roughly $0.053 at medium and $0.211 at high quality; the same cells are $0.025 and $0.07 here. Every parameter is on the GPT Image 2 API reference, and the quality matrix and synchronous mode are on the gpt-image-2-all API reference.

A worked cost estimate

Say you are refreshing 300 product listings: three layout drafts per product, one 2K hero image per product, and 10 large 4K banners:

Drafts   300 x 3 x $0.01  (gpt-image-2-lite)   = $9.00
Heroes   300 x 1 x $0.03  (gpt-image-2, 2K)    = $9.00
Banners   10 x 1 x $0.05  (gpt-image-2, 4K)    = $0.50
Total                                            $18.50

If the banners need high quality, run them on gpt-image-2-all at $0.23 and that line becomes $2.30. Refusals and failures cost nothing, so the realistic way to overspend is resubmitting jobs your client stopped waiting for.

When not to use it

  • You need mask-based inpainting. gpt-image-2-all rejects a mask with a 400, and the other two ids have no mask parameter. Edits are steered by the prompt ("change only the label to green, keep everything else unchanged"), which suits most product edits but is not pixel-exact.
  • You need pixel-exact output dimensions without resizing. The ratio is guaranteed here; the exact pixel count is not.
  • You need a direct relationship with OpenAI, for compliance paperwork, data-processing terms or committed spend. Use OpenAI's API directly.
  • You need an image back in a few seconds. Even lite has a median of about half a minute.

If none of those apply, the quickest test is one 1K request on gpt-image-2 with the loop above, followed by GET /v1/records/{task_id} to see exactly what it cost. Keys and balance live in the apimodels.app console.

Drafted with AI assistance; prices and numbers checked against our API docs and records on Oct 25, 2026.

评论

此博客中的热门博文

Seedance 2.0 Fast API: 480p and 720p Video from $0.071 per Second

Wan 3.0 Video API: 30-Second Clips from $0.045 per Second