LLM API Guide

GPT Image 2 (ChatGPT Images 2.0) API: Pricing, Parameters & What It Replaced

Complete guide to OpenAI GPT Image 2 (gpt-image-2 and gpt-image-2.5) API pricing, token billing rules, Python SDK code examples for generation and edits.

Summary

  1. Use model string gpt-image-2 (pinned to gpt-image-2-2026-04-21) or gpt-image-2.5; do not use chatgpt-image-latest.
  2. Standard generation costs $0.011 to $0.250 per image by resolution and quality as of 2026-11-01, billed at $5/1M text and $10/1M image input tokens.
  3. Cached input discounts ($2.50/1M tokens as of 2026-11-01) only apply when calling image generation via the Responses API tool, never on /v1/images/edits.
  4. Native transparent backgrounds (background="transparent") were removed from gpt-image-2 on October 1, 2026 and now require switching to gpt-image-2.5.

In the OpenAI API, the model marketed in the consumer web app as ChatGPT Images 2.0 is called gpt-image-2, which currently aliases to the snapshot gpt-image-2-2026-04-21. OpenAI also serves the updated gpt-image-2.5 series (gpt-image-2.5, alongside billing variants gpt-image-2.5-flare and gpt-image-2.5-sunburst) under the same token rate card. Standard text-to-image generations cost between $0.011 and $0.250 per image across low, medium, and high quality tiers, calculated from an underlying rate of $5.00 per 1M text input tokens, $10.00 per 1M image input tokens, and $40.00 per 1M image output tokens.

If you are migrating an existing image pipeline, gpt-image-2 officially replaces gpt-image-1, gpt-image-1.5, and legacy dall-e-3 workflows. However, you cannot rely on OpenAI's dynamic alias chatgpt-image-latest to make that jump. That alias still resolves to the deprecated gpt-image-1.5 family that the ChatGPT web interface has already phased out. You need to hardcode gpt-image-2 or gpt-image-2.5 in your requests and strip out legacy DALL-E parameters before your code will run cleanly.

On this page

GPT Image 2 API Pricing vs. GPT-Image-1, DALL-E 3, and Qwen Image

OpenAI bills gpt-image-2 through token consumption rather than a flat per-call fee, though fixed output resolutions translate into predictable per-image charges on /v1/images/generations. When I compare my monthly image generation bills across providers—especially against Alibaba Cloud's visual models covered in my Qwen API pricing breakdown—the biggest cost differences come down to how each API charges for reference images and parameter compatibility.

Model Identifier Standard 1024x1024 Cost (Low / Med / High) Rectangular 1024x1536 or 1536x1024 Cost Input Image Billing (Edits & References) Output Delivery Parameter Native Transparency (background="transparent") Cached Input Support
gpt-image-2 (gpt-image-2-2026-04-21) $0.011 / $0.042 / $0.167 $0.016 / $0.063 / $0.250 $10.00 / 1M image tokens (non-linear resizing; input_fidelity rejected) Always base64 via output_format (png, jpeg, webp) Discontinued Oct 1, 2026 (throws HTTP 400 invalid_value) /v1/responses tool only; 0% cache hit on /v1/images/edits
gpt-image-2.5 $0.011 / $0.042 / $0.167 (mapped across 5 quality tiers) $0.016 / $0.063 / $0.250 $10.00 / 1M image tokens Always base64 via output_format Supported /v1/responses tool only
gpt-image-1 / gpt-image-1.5 (chatgpt-image-latest) $0.011 / $0.042 / $0.167 $0.016 / $0.063 / $0.250 $10.00 / 1M tokens (512px short-side tile math; input_fidelity="high" adds 4K–6K tokens) Always base64 via output_format Supported Listed on rate card, 0% hit on /v1/images/edits
dall-e-3 (Legacy) N/A ($0.040 Standard / $0.080 HD) $0.080 Standard / $0.120 HD (1024x1792) Text-to-image only (no /v1/images/edits support) response_format (url or b64_json) Not supported None
qwen-image (qwen-image-plus / wanx2.1) $0.018 – $0.035 flat per image $0.018 – $0.035 flat per image Flat per-image output fee Signed temporary URL or base64 Via dedicated background removal endpoint N/A (flat per-image billing)

Beyond the standard 1024x1024, 1024x1536, and 1536x1024 dimensions, gpt-image-2 also accepts wider aspect ratios such as 1920x1376 and 1440x480.

Two Undocumented Billing Traps on /v1/images/edits

If you only run text-to-image calls on /v1/images/generations, your bill will match the table above to the cent. The moment you move to /v1/images/edits for inpainting or multi-image character consistency, two undocumented billing behaviors change your unit economics.

First, gpt-image-2 no longer uses the gpt-image-1 tile formula (which scaled the shortest side to 512px and stepped up in 512px increments). Worse, input image token counts on gpt-image-2 do not even scale monotonically with pixel area. When I tested /v1/images/edits generating 1440x480 outputs at quality="low", feeding a 511x512 input image billed 1024 input tokens, whereas doubling the width to 1024x512 cut the charge in half to 512 input tokens. A 1024x1024 square billed 1024 tokens, and a 4096x2048 upload billed 1458 tokens. On another edit call, the input image consumed 1521 tokens while the generated output took only 54 tokens, and changing quality or output size left the total charge untouched. You also cannot pass input_fidelity="low" to cap input costs anymore: while gpt-image-1.5 accepted input_fidelity (and silently forced it to high, tacking on 4,000 to 6,000 tokens), gpt-image-2 rejects input_fidelity outright because high-fidelity input encoding is permanently enabled.

Second, the $2.50 per 1M cached image input token rate on the OpenAI API pricing page (as of 2026-11-01) does not work on /v1/images/edits. I ran a sequential comic-generation job that sent the exact same byte-for-byte character reference files in image[] across dozens of requests, only changing the scene prompt. After consuming 75,200 input tokens on gpt-image-2, my usage dashboard showed zero cache-read tokens. Cached input pricing for gpt-image-2 and gpt-image-2.5 is wired exclusively to the image_generation tool inside the /v1/responses endpoint. Even there, switching to /v1/responses rarely saves money: you have to pay for the host language model's context window on every turn (which adds up fast, as I detailed in my OpenAI GPT-6 API pricing guide), and the /v1/responses JSON payload omits cached image token counts from its usage block, leaving you blind until your invoice updates.

What GPT Image 2 Replaced and Why /v1/images/edits Throws a dall-e-2 Error

When OpenAI introduced the gpt-image architecture, it consolidated generation, inpainting, and multi-image composition into two endpoints (/v1/images/generations and /v1/images/edits) and left /v1/images/variations strictly for dall-e-2.

Because /v1/images/edits still shares its route with legacy dall-e-2 validation logic, a malformed request does not always tell you which parameter failed. Instead, if you send a legacy DALL-E parameter like response_format="b64_json" or format your multipart form upload incorrectly, the endpoint falls back to its legacy validator and returns HTTP 400:

json
{
  "error": {
    "message": "Invalid value: 'gpt-image-2'. Value must be 'dall-e-2'.",
    "type": "invalid_request_error",
    "param": "model",
    "code": "invalid_value"
  }
}

Seeing Value must be 'dall-e-2' convinces many developers that gpt-image-2 only supports text-to-image. In reality, /v1/images/edits accepts gpt-image-2 and gpt-image-2.5 as long as you do three things: pass input files using the array field image[] in raw multipart requests (or a file list in the modern SDK), remove response_format, and control the output file type with output_format (png, jpeg, or webp) and output_compression (0 to 100 for JPEG/WebP).

Python SDK Code Examples: Text-to-Image, Inpainting, and Multi-Image Reference

Make sure your openai Python package is current before calling gpt-image-2. If you route requests through a custom gateway or proxy, configure your client using the steps in my OpenAI Python SDK base_url guide.

1. Text-to-Image Generation (/v1/images/generations)

Unlike dall-e-3, gpt-image-2 never returns a temporary download URL. It always populates b64_json in the response object:

python
import base64
from openai import OpenAI

client = OpenAI()

response = client.images.generate(
    model="gpt-image-2",
    prompt="Isometric cutaway of a modern subterranean server room, warm tungsten lighting, crisp architectural labels",
    size="1536x1024",
    quality="medium",
    output_format="webp",
    output_compression=85,
    moderation="low",
    n=1,
)

image_bytes = base64.b64decode(response.data[0].b64_json)
with open("server_room.webp", "wb") as f:
    f.write(image_bytes)

2. Multi-Image Reference and Inpainting (/v1/images/edits)

To combine multiple reference images—for example, placing a character from one file into the lighting environment of a second file—pass a list of open binary file handles to image. If you want to restrict edits to a specific region (inpainting), attach an RGBA PNG mask of the same dimensions as the first image where transparent pixels (alpha=0) mark the area to regenerate:

python
import base64
from openai import OpenAI

client = OpenAI()

with open("character_sheet.png", "rb") as ref_char, \
     open("studio_backdrop.png", "rb") as ref_bg, \
     open("edit_mask.png", "rb") as mask_file:

    edit_response = client.images.edit(
        model="gpt-image-2",
        image=[ref_char, ref_bg],
        mask=mask_file,
        prompt="Place the character from the first image behind the desk in the second image, matching the neon rim lighting",
        size="1024x1024",
        quality="high",
        output_format="png",
    )

edited_bytes = base64.b64decode(edit_response.data[0].b64_json)
with open("composited_scene.png", "wb") as f:
    f.write(edited_bytes)

If you execute this call from curl instead of the Python SDK, pass -F "model=gpt-image-2" and repeat -F "image[]=@character_sheet.png" -F "image[]=@studio_backdrop.png". Leaving the brackets off image[] in a multi-file form upload triggers the Value must be 'dall-e-2' error.

Breaking Parameter Changes and Production Errors

Even with valid syntax, four server-side behaviors regularly break gpt-image-2 integrations in production.

background="transparent" Throws HTTP 400 on gpt-image-2

During the summer preview window, gpt-image-2 accepted background="transparent". However, because transparency is baked into the diffusion conditioning rather than applied as a post-generation alpha cutout, turning on background="transparent" noticeably altered the rendering style—pulling smooth 3D cartoon prompts toward photographic skin textures and changing edge lighting.

On October 1, 2026, OpenAI turned off the transparency preview on gpt-image-2. Passing background="transparent" with model="gpt-image-2" now fails immediately:

json
{
  "error": {
    "message": "Transparent background is not supported for this model.",
    "type": "image_generation_user_error",
    "param": "background",
    "code": "invalid_value"
  }
}

If your pipeline requires transparent PNG or WebP assets, change the model identifier to gpt-image-2.5, where native alpha generation remains active and handles partial transparency cleanly without requiring a price increase.

Output-Stage Moderation Refusals Despite moderation="low"

Setting moderation="low" relaxes prompt filtering, but gpt-image-2 still runs an aggressive post-generation visual classifier on rendered images before returning them. When I requested six variations (n=6, size="1920x1376", quality="low", background="opaque", moderation="low") of a completely benign lifestyle prompt—such as a woman getting ready for a party—the ChatGPT web UI rendered the scene every time, whereas the API rejected all six images with HTTP 400:

json
{
  "error": {
    "message": "Your request was rejected by the safety system. ... safety_violations=[sexual].",
    "type": "image_generation_user_error",
    "code": "moderation_blocked",
    "moderation_details": {
      "moderation_stage": "output",
      "categories": ["sexual"]
    }
  }
}

Because moderation_stage: "output" triggers after the image pixels are synthesized, removing words from your prompt rarely helps. Instead, adding explicit wardrobe context to the prompt (for example, specifying "wearing modern summer clothes, looking happy") prevents the model from rendering skin silhouettes that trip the output classifier.

Shared 4,000 RPM Rate Limits (gpt-image-2-codex) and HTTP 200 Error Bodies

If you call gpt-image-2 through Codex-linked tokens, multi-key organization pools, or reverse proxies, rate limits do not behave like standard per-key text model quotas. All keys under an organization share a single gpt-image bucket capped at 4,000 input images per minute, and failed calls count against that quota. Worse, when streaming or using certain gateway adapters, the API can return an HTTP 200 OK status header with the rate limit failure buried inside the response body, or return HTTP 502 through pooled proxies that share the upstream organization org-BOvpEHVcDPTe8h4lZnwMO5Ly:

text
Rate limit reached for gpt-image-2-codex (for limit gpt-image) in organization org-BOvpEHVcDPTe8h4lZnwMO5Ly on input-images per min: Limit 4000, Used 4000, Requested 1. Please try again in 15ms.

To stop burning quota during a spike, drop concurrent image workers down to single-flight requests, check the response body for embedded error objects even on HTTP 200, and honor Retry-After headers with capped exponential backoff.

Gateway and Client Compatibility (Cherry Studio, New API, and SeedRouter)

Third-party clients and self-hosted gateways have lagged behind the gpt-image-2 and gpt-image-2.5 parameter schema:

  • Cherry Studio (HTTP 422 on edits): Text-to-image generation works inside Cherry Studio chat threads once you raise the request timeout, but uploading an image in a chat window to edit it fails with provider API error (status 422). You have to configure a separate provider entry and invoke gpt-image-2 through Cherry Studio's dedicated Painting mode so it calls /v1/images/edits with the proper multipart fields.
  • New API (rc.40 – rc.47) hardcoded billing entries: New API compiles gpt-image-2, gpt-image-2.5-flare, and gpt-image-2.5-sunburst directly into setting/billing_setting/builtin_billing.go. Clicking Delete in the Model Pricing UI only fires GET /api/option/model_pricing?model=gpt-image-2 (200 OK) without rendering a confirmation modal. To strip an unwanted built-in entry so your custom relay rules take over, send a PATCH /api/option/model_pricing request with {"changes": [{"model_name": "gpt-image-2", "expected_version": 1, "pricing": {}}]}.

If you are tired of debugging outdated reverse proxies that reject gpt-image-2.5 parameters or share exhausted 4000 RPM organization pools, we maintain direct, unpooled gpt-image-2 and gpt-image-2.5 routes on SeedRouter that pass native size, quality, and image[] arrays straight through at official token rates. And when you need to switch Base URLs, swap API keys, or diagnose 401, 403, 404, and 429 gateway errors across OpenAI Codex and Claude Code without hand-editing config files, grab our free open-source LLM API Config GUI for Windows and macOS.

Sources and checks

  1. OpenAI API pricing page