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
- Everyday and batch generation; fast
- 6 quality tiers: low to max
- Editing and combining images; higher fidelity
- 6 quality tiers: low to max
- Fine for existing projects
- 4 quality tiers; no xhigh or max
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.
openai/gpt-image-2.5-flareEveryday and batch generation; fastopenai/gpt-image-2.5-sunburstEditing and combining images; higher fidelityopenai/gpt-image-2No xhigh or max tiersQuality (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):
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:
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.
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.
- Width and height both divisible by 16
- Neither side exceeds 3840
- Between 1:3 and 3:1
- At least 655,360 pixels in total
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
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.
The gateway picks an available provider between Azure and OpenAI automatically.
Requests go only to that provider; if it is unavailable, they will not fall back to another provider.
X-OfoxAI-Provider-Type: openaiWorks on both text to image and editing; values: azure_foundry, openai"extra_body": { "provider": { "type": "openai" } }Text to image only; editing is a multipart upload and accepts the header onlyFull details: Provider routing.
Common errors
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 1Note 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:
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.
- OpenAI image generation guide
- OpenAI image generation guide · Limitations
- OpenAI Images API reference
- OpenAI model page: gpt-image-2.5-flare
- OpenAI model page: gpt-image-2.5-sunburst
- OpenAI model page: gpt-image-2
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.