Skip to Content
ModelsGPT ImageOverview

GPT Image family

OpenAI’s image generation models: gpt-image-2.5-flare, gpt-image-2.5-sunburst and gpt-image-2. All three are called through the OpenAI-compatible API.

Everything in these pages was measured against the live API, and every code sample was run verbatim. Last verified: 2026-09-30.

What do you want to do?

The request structure and response fields shared by these endpoints are in Images API.

Which model to use

gpt-image-2.5-flareText to image
  • Everyday and batch generation; fast
  • 6 quality tiers: low to max
Azure · OpenAI
gpt-image-2.5-sunburstEditing
  • Editing and combining images; higher fidelity
  • 6 quality tiers: low to max
Azure · OpenAI
gpt-image-2Previous gen
  • Fine for existing projects
  • 4 quality tiers; no xhigh or max
Azure · OpenAI

When moving from gpt-image-2 to 2.5, choose the quality tier again — see Quality and price below. Both providers serve text to image and editing, and the gateway routes requests automatically.

Model IDs (copy them exactly)
Text to imageopenai/gpt-image-2.5-flareEveryday and batch generation; fast
Editingopenai/gpt-image-2.5-sunburstEditing and combining images; higher fidelity
Previous genopenai/gpt-image-2No xhigh or max tiers

Quality (quality) and price

quality has the biggest effect on price. Higher tiers cost more and take longer.

OpenAI’s official reference prices (per image, output image only; prompt and reference images not included):

Tiergpt-image-2 · 1024×1024gpt-image-2 · 1024×1536 or 1536×1024
low$0.006$0.005
medium$0.053$0.041
high$0.211$0.165

OpenAI has not published a per-image price table for the two 2.5 models. It gives unit prices instead: $30 per million output image tokens, $8 per million reference image input tokens, and $5 per million text input tokens. OpenAI’s worked example: a 1024×1024 image at low produces 196 output tokens, about $0.00588. For other tiers and sizes, estimate with the official calculator .

These are OpenAI’s official figures; the actual charge follows usage in each response. OfoxAI’s live prices (including discounts) are on the model page .

Tiers supported by each model:

Tier2.5 (flare, sunburst)gpt-image-2
low / medium / highSupportedSupported
xhigh / maxSupportedNot supported; returns 400
auto or omittedModel decides — not the same as medium; set it explicitlySame

standard and hd (old DALL·E values) are not supported and return 400.

Latency and timeouts (timeout)

The API is synchronous: the response is returned only once the image has been generated. If the client disconnects early, the image is lost but the request is still billed.

Request sentGenerating — may take several minutesImage returned
60 / 120 s common defaults: the connection drops mid-generation, the image is lost and still billed
600 s recommended: waits until the image is returned

Set the client timeout to 600 seconds. Latency varies with the model, quality and size; high-quality, large-size and editing requests may take several minutes, and common default timeouts of 60 or 120 seconds are not sufficient.

Size (size)

size takes a custom WIDTHxHEIGHT, as long as all four rules below hold; breaking any one returns 400.

Multiples of 16
  • Width and height both divisible by 16
✗ 1000x1000
Longest edge ≤ 3840
  • Neither side exceeds 3840
✗ 4096x4096
Aspect ratio ≤ 3:1
  • Between 1:3 and 3:1
✗ 3200x1024
Pixels ≥ 655,360
  • At least 655,360 pixels in total
✗ 768x768 → ✓ 1024x768

Omitted or auto: the model picks the size. It is not guaranteed to be 1024×1024, or to match your reference image. In our tests both text to image and editing returned 1254×1254. Pass a size explicitly when you need a fixed one.

The documented maximum is 3840×2160; anything above 2560×1440 is marked experimental.

Technical specs

ItemSpec
ResponseSynchronous; the image is plain base64 in data[0].b64_json
Output sizeCustom width and height within four constraints; up to 3840×2160
Quality tiersSee Quality and price
Output formatpng (default), jpeg, webp
Images per request1–10, default 1
Reference images≤ 15 MB each, ≤ 50 MB per request — see Upload limits
TimeoutSet the client timeout to 600 seconds — see Latency and timeouts

Selecting a provider

Usually you don’t need to. Select one when you have content moderation requirements: providers apply different moderation thresholds; for example, gpt-image-2 is stricter on Azure and comparatively lenient on OpenAI.

Not selected (recommended)
Request→OfoxAI gateway→AzureOpenAI

The gateway picks an available provider between Azure and OpenAI automatically.

Provider selected
Requestopenai→OfoxAI gateway→AzureOpenAI

Requests go only to that provider; if it is unavailable, they will not fall back to another provider.

How to select a provider
HeaderX-OfoxAI-Provider-Type: openaiWorks on both text to image and editing; values: azure_foundry, openai
Request body"extra_body": { "provider": { "type": "openai" } }Text to image only; editing is a multipart upload and accepts the header only

Full details: Provider routing.

Common errors

ErrorCauseFix
moderation_blocked (Your request was rejected by the safety system)The prompt or reference image was blocked by the upstream safety systemChange the prompt or reference image and try again; retrying unchanged gives the same result. If you have moderation requirements, consider selecting a provider
Timeout, 504, 524, Request timed outThe client or an intermediate proxy (Nginx, Vercel, Cloudflare, etc.) times out before generation finishesSet the client and proxy timeouts to 600 seconds — see Latency and timeouts
404 model_not_foundModel ID misspelled or wrong case, e.g. GPT-Image-2Copy the model ID from this page, all lowercase
provider_type_unavailableThe provider you pinned manually doesn’t serve this modelRemove the provider parameter and let the gateway route it
unknown provider typeProvider name in the header is misspelledCheck the spelling
Invalid sizeSize breaks one of the four rulesSee Size
does not support quality 'xhigh'xhigh or max sent to gpt-image-2Use high, or switch to 2.5
Invalid value: 'standard'quality set to standard or hdUse low through max
Invalid image file or modeReference image or mask is in the wrong formatRe-export as a standard PNG or JPEG
Invalid file 'image[0]': unsupported mimetypeThe uploaded file is not an imageUpload a PNG, JPEG or WebP image
does not support the 'input_fidelity' parameterAn edit request included input_fidelityRemove it. The 2.5 models and gpt-image-2 always process reference images at high fidelity
Transparent background is not supported for JPEG output formatA transparent background was requested with jpeg outputUse png or webp
Unknown parameterParameter not supported by this familyRemove it
429 rate_limit_exceededOver 100 requests per minute (per team)Retry later. More keys do not raise the limit

Full error reference: Error Handling.

Exact error messages

The full messages we measured, so you can search for or compare against them:

Invalid size '1000x1000'. Width and height must both be divisible by 16. Invalid size '4096x4096'. The longest edge must be less than or equal to 3840. Invalid size '3200x1024'. The maximum supported aspect ratio is 3:1. Invalid size '768x768'. Requested resolution is below the current minimum pixel budget. The model 'gpt-image-2' does not support quality 'xhigh'. Invalid value: 'standard'. Supported values are: 'low', 'medium', 'high', and 'auto'. Invalid 'n': integer above maximum value. Expected a value <= 10, but got 11 instead. Unknown parameter: 'style'. The model 'gpt-image-2.5-sunburst' does not support the 'input_fidelity' parameter. Transparent background is not supported for JPEG output format Invalid file 'image[0]': unsupported mimetype ('text/plain; charset=utf-8'). Supported file formats are 'image/jpeg', 'image/png', and 'image/webp'. unknown provider type in X-OfoxAI-Provider-Type header Model 'GPT-Image-2' not found Invalid image file or mode for image 1

Note that the list of supported values in Invalid value: 'standard' is incomplete: the 2.5 models also accept xhigh and max. Go by the tier table on this page.

Parameters that have no effect

These parameters do not cause an error, but do nothing for this family. The request succeeds and is billed as usual:

ParameterWhy
mask (on text to image)Only works on the edit endpoint
response_formatOld DALL·E parameter; this family always returns base64 (b64_json). Calling OpenAI directly returns Unknown parameter: 'response_format'; through OfoxAI it is ignored
input_fidelity (on text to image)Belongs to gpt-image-1.5. Note: sent to the edit endpoint, it returns 400
input_imagesBelongs to the Qwen image family

No error does not mean it worked: style, for example, is rejected outright, while the ones above are silently ignored.

Official docs

OpenAI’s docs describe behavior when you call OpenAI directly. When you call through OfoxAI, the measured results in these pages take precedence. For example, pricing follows the usage in the response and the model pages.

FAQ

Does GPT Image 2.5 accept any size?

It accepts custom sizes as long as four rules hold: width and height divisible by 16, longest edge no more than 3840, aspect ratio between 1:3 and 3:1, and at least 655,360 total pixels. Breaking any rule returns 400. For example 768x768 has too few pixels and is rejected, while 1024x768 works.

What size do I get if I omit size?

The model decides. It is not necessarily 1024x1024 and does not necessarily match the reference image. In our tests both text to image and editing returned 1254x1254. Pass a size explicitly if you need a fixed one.

Does gpt-image-2 support xhigh and max quality?

No, both return 400. xhigh and max are only supported by gpt-image-2.5-flare and gpt-image-2.5-sunburst. gpt-image-2 accepts low, medium, high and auto.

Can GPT Image 2.5 quality be hd or standard?

No, those return 400. Valid values are low, medium, high, xhigh, max and auto. If omitted, the model picks a tier itself (low in our tests), so set it explicitly for consistent quality.

What timeout should I set for the gpt-image-2 / GPT Image 2.5 API?

Set the client timeout to 600 seconds. Latency varies with the model, quality and size; high-quality, large-size and editing requests may take several minutes.

How do I fix the GPT Image error moderation_blocked (Your request was rejected by the safety system)?

The prompt or reference image was blocked by the upstream safety system, typically for real people, copyrighted characters or sensitive content. Change the prompt or reference image and try again; retrying unchanged gives the same result. error.moderation_details in the response indicates whether the block happened at the input or output stage. Providers apply different moderation thresholds, so consider selecting a provider if you have moderation requirements.

How do I fix the GPT Image error Unknown parameter: response_format?

response_format is an old DALL·E parameter. GPT Image only returns base64 (data[0].b64_json) and does not provide image URLs. Remove response_format and use output_format to choose png, jpeg or webp. Through OfoxAI the parameter is ignored and does not cause an error.

What should I do about "Your organization must be verified" when calling gpt-image?

That is the organization verification OpenAI requires for direct access. Through OfoxAI you do not need to verify an organization yourself: an OfoxAI API key can call gpt-image-2.5-flare, gpt-image-2.5-sunburst and gpt-image-2.

What should I do when GPT Image requests time out or return 504 or 524?

The API is synchronous, and high-quality, large-size and editing requests may take several minutes. Set the client timeout to 600 seconds, and check the timeouts of intermediate proxies such as Nginx, Vercel or Cloudflare, whose defaults are often only 60 to 100 seconds.

How do I fix the GPT Image error does not support the input_fidelity parameter?

GPT Image 2.5 and gpt-image-2 always process reference images at high fidelity, so the edit endpoint does not accept input_fidelity. Remove it; the parameter only applies to gpt-image-1.5.

How do I fix the GPT Image error Invalid size?

The size breaks one of the four rules, and the message says which: divisible by 16 means width or height is not a multiple of 16; longest edge means the longest side is over 3840; aspect ratio means the ratio is beyond 3:1; minimum pixel budget means fewer than 655,360 pixels, e.g. 768x768. Use a size that meets all four, such as 1024x768, 1024x1024 or 1536x1024.

How much does one GPT Image image cost?

Billing is by token, and the quality tier matters most. Official OpenAI reference prices for a 1024x1024 image with gpt-image-2: about $0.006 at low, $0.053 at medium and $0.211 at high. For the two 2.5 models, output image tokens cost $30 per million, so 1024x1024 at low is about $0.006. What you are actually charged is the usage in the response; live OfoxAI prices are on the model pages.

Do I need to pin a provider when editing with GPT Image 2.5?

No. Both Azure and OpenAI serve the 2.5 edit endpoint, and the gateway routes requests automatically.

Last updated on