GPT Image API Cost Explained

Last reviewed: June 15, 2026

Quick Answer

GPT Image 2 cost is token-based, not a single flat charge per image. Estimate text input tokens, image input tokens for edits or reference images, and image output tokens determined by the requested quality and size. When image generation runs through the Responses API, also include the main model's token usage. Use OpenAI's current pricing page and image calculator before scaling.

Current GPT Image Models

gpt-image-2 is OpenAI's current latest GPT Image model as reviewed on June 15, 2026. Previous image generation models include gpt-image-1.5 and the earlier gpt-image-1. Historical model prices, quality tiers and behavior described for DALL·E 2 or DALL·E 3 do not apply directly to gpt-image-2.

How GPT Image 2 Billing Works

GPT Image 2 uses token-based billing across three input/output dimensions:

  • Text input tokens — tokens consumed by the text prompt and any text-only context
  • Image input tokens — tokens consumed by any input images (edits, reference images, masks)
  • Image output tokens — tokens billed for the generated image output, driven by quality and size settings

These three dimensions are summed to produce the total billed token count for each request, multiplied by their respective per-token rates. GPT Image 2 does not charge a flat fee per output image.

Current GPT Image 2 Token Rates

The following rates were reviewed on June 15, 2026. These rates may change; always check OpenAI's live pricing page before production use.

Token typeRate per 1M tokens
Text input$5.00
Cached text input$1.25
Image input$8.00
Cached image input$2.00
Image output$30.00

There is no separate text output rate. Megapixels are useful for planning output dimensions, but the billed unit is image output tokens, not pixels.

Image API vs Responses API Cost

Image API

The Image API uses POST /v1/images/generations and POST /v1/images/edits directly, specifying gpt-image-2 as the model. This approach is suited for single-step text-to-image, image editing and explicit model selection.

Cost components for Image API requests:

  • Text input tokens
  • Image input tokens (edits and reference images)
  • Image output tokens

Responses API

The Responses API uses the image_generation tool within a multi-step or conversational workflow. Responses API image-generation requests include the main model's token usage in addition to image-generation costs.

Cost components for Responses API requests with image generation:

  • Main model text input and output tokens
  • Image text input tokens (prompt passed to the image-generation tool)
  • Image input tokens (any reference images in the tool call)
  • Image output tokens
  • Partial image output tokens (if streaming partial images)

Do not assume Responses API is always more expensive than Image API; the difference depends on the main model's input, context size and how the image-generation tool is used.

Text Input, Image Input and Image Output Tokens

GPT Image 2 cost is additive across token types. Use this formula structure:

estimated_image_request_cost =
  text_input_cost
+ image_input_cost
+ image_output_cost
+ main_model_cost_if_using_responses_api
+ partial_image_output_cost

Where:

text_input_cost =
  uncached_text_input_tokens × $5.00 / 1,000,000
+ cached_text_input_tokens    × $1.25 / 1,000,000

image_input_cost =
  uncached_image_input_tokens × $8.00 / 1,000,000
+ cached_image_input_tokens   × $2.00 / 1,000,000

image_output_cost =
  image_output_tokens × $30.00 / 1,000,000

Always divide by 1,000,000 when converting per-million rates. Do not substitute output file byte size directly for billed image output tokens.

GPT Image 2 Output Cost Examples

These examples estimate image output cost only. Text input and image input tokens are additional.

Quality1024×10241024×15361536×1024
Low$0.006$0.005$0.005
Medium$0.053$0.041$0.041
High$0.211$0.165$0.165

These are image output cost estimates from OpenAI's official calculator. The total request cost also includes text input tokens and, for edit/reference requests, image input tokens. gpt-image-2 supports additional sizes beyond those shown. Within the same quality tier, larger non-square dimensions may sometimes use fewer output tokens; use the official calculator rather than estimating from megapixels alone.

Quality and Flexible Size

GPT Image 2 quality settings:

  • low — suitable for draft previews and rapid iteration
  • medium — balanced quality for most production uses
  • high — highest output quality, highest token cost
  • auto — model selects quality based on context

Size constraints for gpt-image-2 include:

  • Neither dimension may exceed 3840 pixels
  • Both dimensions must be multiples of 16
  • Aspect ratio must not exceed 3:1
  • Total pixel count must fall within OpenAI's permitted range
  • auto size is available

Size and quality influence image output tokens. Megapixels are useful for planning, but they are not a universal direct billing unit.

Generate vs Edit Cost

Text-to-image generation

A basic generate request costs text input tokens plus image output tokens. There is no fixed base fee per image.

Image edit / reference-image workflow

Edit requests and reference-image workflows include an additional image input token cost. gpt-image-2 processes image inputs at high fidelity automatically. Edit requests containing reference images therefore use image input tokens in addition to text input and image output tokens.

Do not assume edit requests have a fixed separate edit fee. Do not attempt to reduce cost by specifying input_fidelity=low — this parameter should be omitted; the model automatically handles input images at high fidelity.

Reference Image Input Cost

Any request that sends one or more images to gpt-image-2 — whether for editing, variation or reference — consumes image input tokens. The number of image input tokens depends on the image dimensions and encoding overhead, not just pixel count.

Minimize unnecessary image input tokens by:

  • Sending only the reference images actually needed for the task
  • Avoiding duplicate or redundant image submissions across requests
  • Confirming that the task genuinely requires image input before including images

Multiple Images and n

The Image API n parameter generates multiple images in a single request. When requesting multiple images, include every generated output in the cost estimate. Do not apply a one-image estimate to the entire request.

n=2 at medium/1024×1024:
  image_output_cost = 2 × $0.053 = $0.106
  + text_input_cost (additional)
  + image_input_cost if any (additional)

Do not assume one request always costs the same regardless of n.

Partial Image Streaming Cost

When partial image streaming is enabled through partial_images, each partial image requested adds 100 image output tokens to the billed total.

partial_image_cost =
  partial_image_count × 100 × $30.00 / 1,000,000

With current rates: 1 partial image ≈ $0.003

Partial image cost is an additional charge on top of the final image output tokens. At current rates, 100 image output tokens equal approximately $0.003 per partial image. This rate may change.

Output Format and Compression

gpt-image-2 supports PNG (default), JPEG and WebP output formats, including JPEG/WebP compression options.

File format and compression affect transfer size and latency. Do not assume a smaller file automatically means fewer billed image output tokens. Billed output tokens are determined by the model's internal image representation, not the compressed file size.

Failed, Timed-Out and Moderation-Blocked Requests

Do not assume a failed, timed-out or moderation-blocked request was billed or free. Record the request ID, response status and timestamp, then inspect the organization Usage and Costs records before retrying.

To investigate a potentially failed request:

  • Check the HTTP response status code and error body
  • Look up the request ID in the organization Usage Dashboard
  • Cross-reference with the Costs endpoint or Cost export
  • Confirm the request reached the API before troubleshooting retries

Avoid an unbounded retry loop that generates unnecessary usage. Cap retries and validate that each retry is warranted before sending it.

Worked Cost Examples

Example 1: Image API — basic generate

Model:      gpt-image-2
Action:     generate
Quality:    medium
Size:       1024×1024
Images (n): 1
Text input: ~100 tokens ≈ $0.0005
Image input: none
Image output: $0.053 (from calculator)
Total estimate: > $0.053 (text input additional)

Example 2: Image API — edit with reference image

Model:       gpt-image-2
Action:      edit
Quality:     high
Size:        1536×1024
Images (n):  1
Text input:  ~150 tokens ≈ $0.00075
Image input: encoded reference image
Image output: $0.165 (from calculator)
Total estimate: > $0.165 (image input tokens additional)

Example 3: Responses API with image generation tool

Main model: gpt-4o (example)
Image text input: ~200 tokens ≈ $0.001
Image input: 1 reference image (billed as image input tokens)
Image output: high/1024×1536 = $0.165
Partial images: 2 × 100 tokens = 200 tokens ≈ $0.006
Main model total: text + output tokens × applicable rate

Total = main model cost + image text input + image input + image output + partial image cost

What to Log

Record the following for each GPT Image request to support cost reconciliation:

  • Request ID and timestamp (UTC)
  • API type — Image API or Responses API
  • Requested model (gpt-image-2, gpt-image-1.5, etc.)
  • Main model, if using Responses API
  • Action — generate, edit or reference
  • Prompt version or hash
  • Number of input images and their dimensions
  • Requested n (number of images)
  • Requested size and quality
  • Partial image count, if streaming
  • Output format selected
  • Success or failure status with error code if applicable
  • Retry count
  • Local estimated cost before the call
  • Organization Usage and Costs record for reconciliation

Note: standard model responses do not include a monetary usage.cost field. Cost must be reconstructed from token counts and applicable rates.

Cost Reduction Checklist

  • Use low quality for drafts and early iterations; reserve high for final outputs
  • Specify the exact size needed — avoid defaulting to oversized outputs
  • Set n to the minimum number of images actually required per request
  • Include only the reference images genuinely needed for an edit or variation
  • Avoid unbounded retry loops; cap retries and validate before each attempt
  • Save and reuse prompts that produce acceptable outputs to avoid redundant generations
  • Use small prepaid tests to calibrate estimated cost against real Costs data before scaling
  • For Responses API calls, record the main model's token usage separately from the image tool cost
  • Enable partial images only when a live preview is needed — otherwise disable streaming
  • Verify gpt-image-2 capability before sending unsupported requests (e.g., transparent background)

Official Sources Reviewed

The information on this page is based on OpenAI's official documentation reviewed as of June 15, 2026. Pricing and model capabilities may change; always verify current behavior in the API reference and pricing page.

  • OpenAI API Docs: Image Generation
  • OpenAI API Docs: Image Generation Tools
  • OpenAI API Docs: GPT Image 2 model reference
  • OpenAI API Docs: GPT Image 1.5 model reference
  • OpenAI API Docs: Pricing

Related Guides

AI Summary

GPT Image 2 uses token-based billing across text input ($5.00/M tokens), image input ($8.00/M tokens) and image output ($30.00/M tokens) with cached variants. Size and quality drive output tokens; megapixels are a planning aid, not the billing unit. The Image API covers direct generation and editing; the Responses API adds main model token usage on top. Partial images add approximately $0.003 per image at current rates. GPT Image 2 does not support transparent backgrounds, and failed requests require investigation through Usage and Costs records before assuming they were billed or free. Use the official calculator and openai-api-usage reconciliation practices to keep estimates aligned with actual spend. AICostPlanner is an independent educational cost-planning site and is not affiliated with OpenAI.

Frequently Asked Questions

How much does GPT Image 2 cost?

GPT Image 2 cost is the sum of text input tokens, image input tokens and image output tokens, each billed at its own per-million rate. At reviewed rates: text input $5.00/M, image input $8.00/M, cached text input $1.25/M, cached image input $2.00/M, image output $30.00/M. These rates were reviewed on June 15, 2026 and may change.

Is GPT Image 2 charged per image or per token?

Per token, not per image. The cost formula covers text input tokens, image input tokens (for edits and reference images) and image output tokens. A request with n=4 images costs four times the image output portion of the formula compared to n=1.

Does image size affect GPT Image 2 cost?

Yes. Size and quality together determine the number of billed image output tokens. Larger dimensions and higher quality produce more output tokens. Within the same quality tier, non-square sizes may sometimes use fewer output tokens than square sizes of similar pixel area. Use the official calculator rather than estimating from megapixels alone.

Is editing cheaper than generating a new image?

Not automatically. Edit requests add image input token cost on top of text input and image output tokens. There is no fixed separate edit fee. Only generating without any input images avoids the image input token component.

Does the Responses API add extra cost?

Yes — Responses API image generation includes the main model's text input and output token cost in addition to the image-generation token costs. Compare the total against an equivalent Image API call to determine which approach is more cost-effective for a given workflow.

Do partial images cost extra?

Each partial image requested through partial_images adds 100 image output tokens, which at current rates equals approximately $0.003. This is an additional charge on top of the final image output tokens and is not included in the final image cost.

Does compression reduce GPT Image token cost?

No. File format and compression affect transfer size and latency but not the billed image output token count. Billed tokens reflect the model's internal representation, not the compressed file delivered to the client.

Are failed GPT Image requests billed?

Do not assume. Check the organization Usage Dashboard and Costs endpoint to determine whether a request generated billable tokens. Record request ID, response status and timestamp for every call, then reconcile against organization records before concluding that a failed request was or was not billed.

Estimate before you scale

Use a small prepaid test to measure real GPT Image API cost before committing a larger budget.