GPT Image 2.5
GPT Image 2.5 — OpenAI's image generation and editing model, with precision edits and two tiers. Call Flare or Sunburst on reAPI's shared image endpoint.
OpenAI's image generation and editing model. GPT Image 2.5 renders more natural lighting and richer texture, preserves the subjects of reference photos more reliably, edits only the element you name, and holds that consistency across a long chain of edits. Two ids ship: Flare for everyday work and Sunburst when edit precision matters most. See pricing on the model page.
The two models
| Model id | Positioning | Speed |
|---|---|---|
gpt-image-2.5-flare | The default choice for most applications | Very fast |
gpt-image-2.5-sunburst | Most capable; tighter control across edits | Medium |
Both accept text and image input, return images, read the same parameters, and meter on the same token rate card. The number of tokens an image consumes differs between them, so equal rates do not mean equal cost per image.
Quick example
curl https://reapi.ai/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-flare",
"prompt": "An editorial poster for a ceramic kettle, soft window light",
"size": "1536x1024",
"quality": "high"
}'import requests
resp = requests.post(
"https://reapi.ai/api/v1/images/generations",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "gpt-image-2.5-flare",
"prompt": "An editorial poster for a ceramic kettle, soft window light",
"size": "1536x1024",
"quality": "high",
},
)
task_id = resp.json()["id"]const res = await fetch('https://reapi.ai/api/v1/images/generations', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'gpt-image-2.5-flare',
prompt: 'An editorial poster for a ceramic kettle, soft window light',
size: '1536x1024',
quality: 'high',
}),
});
const { id } = await res.json();body := strings.NewReader(`{
"model": "gpt-image-2.5-flare",
"prompt": "An editorial poster for a ceramic kettle, soft window light",
"size": "1536x1024",
"quality": "high"
}`)
req, _ := http.NewRequest("POST", "https://reapi.ai/api/v1/images/generations", body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)Endpoint
POST https://reapi.ai/api/v1/images/generationsHeaders:
| Header | Value |
|---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | application/json |
The call returns a task id immediately. Poll
GET https://reapi.ai/api/v1/tasks/:id until status is completed or
failed.
Parameters
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
model | string | yes | — | gpt-image-2.5-flare or gpt-image-2.5-sunburst; append -official for the official channel |
prompt | string | yes | — | Up to 32,000 characters |
image_urls | string[] | no | — | Up to 16 public image URLs; switches the request to editing |
mask_url | string | no | — | Public URL whose transparent area marks the region to regenerate |
size | string | no | auto | auto, 1024x1024, 1536x1024, 1024x1536, or a custom WIDTHxHEIGHT |
quality | enum | no | auto | auto, low, medium, high, xhigh, max |
background | enum | no | auto | auto, opaque, transparent |
output_format | enum | no | png | png, jpeg, webp |
output_compression | integer | no | 100 | 0-100. Applies to jpeg and webp only |
n | integer | no | 1 | 1-10 images per request, official channel ids only. Each delivered image is billed. The standard ids deliver one image per request |
moderation | enum | no | auto | auto or low (less restrictive filtering). Official channel ids only; generated images still pass the provider's safety check at either level. The website playground always sends auto |
Size rules
Beyond the three standard sizes, a custom WIDTHxHEIGHT is accepted when all
of the following hold:
- Both edges are divisible by 16.
- The aspect ratio is between 1:3 and 3:1.
- Neither edge exceeds 3840 pixels.
- Total pixel count is between 655,360 and 8,294,400.
Resolutions above 2560x1440 are marked experimental by the model creator.
Quality tiers
xhigh and max are new in this generation; earlier GPT Image models stop at
high. Higher tiers take longer to render. On the standard channel they do
not change what you pay, because the rate is flat per delivered image. On the
official channel each step costs more, but not by a uniform multiple: measured
at 1024x1024, one render consumes 196, 439, 1,756, 3,122 and 7,024 output
tokens across the five steps, so medium to high roughly quadruples while
high to xhigh does not quite double. Use low for drafts and compare tiers
before settling on one for production output.
Transparent backgrounds
background: "transparent" returns a real alpha channel and requires
output_format of png or webp. JPEG carries no alpha channel and cannot
hold a transparent background regardless of the setting.
Modes
There is no mode parameter. Which fields you send is the mode:
| Mode | Fields |
|---|---|
| Text to image | prompt |
| Reference edit | prompt + image_urls |
| Masked inpainting | prompt + image_urls + mask_url |
Media inputs
Every media input is a public HTTP(S) URL. Base64 payloads and data: URIs
are rejected on every reAPI endpoint, on every model. Upload your source
somewhere reachable and pass the link.
Channels
Both tiers are available on two channels. The parameters are identical except
moderation, which only the official ids accept, and n: the standard ids
deliver one image per request. The billing model also differs.
| Channel | Model ids | Billing |
|---|---|---|
| Standard | gpt-image-2.5-flare, gpt-image-2.5-sunburst | Flat per delivered image |
| Official | gpt-image-2.5-flare-official, gpt-image-2.5-sunburst-official | Metered per token |
Pricing dimensions
Standard is flat per request, and each request delivers one image. The
rate does not change with quality, size, or the number of reference images
you send.
Official is metered against the model creator's published token rates. The charge moves with:
- Quality — the dominant term, and it does not scale by a fixed multiple.
A 1024x1024 render consumes 196 output tokens at
low, 439 atmedium, 1,756 athigh, 3,122 atxhighand 7,024 atmax. - Size — more pixels means more output tokens.
- Reference images — each input image contributes input tokens.
n— every delivered image is billed.
The reservation taken at submit time is an estimate; the final charge uses the token counts the upstream actually reports.
What one image costs
Current rates for both channels are on the model page — it always carries the live price, so this section describes how each channel bills rather than quoting numbers that can go stale.
Standard — a flat price per delivered image, and the two models are priced
separately. low and max cost the same, 1024x1024 and 3840x2160 cost the
same, and a request carrying 16 reference images costs the same as one
carrying none.
Official — metered, so quality moves the bill. The rows below were
measured on gpt-image-2.5-flare for one 1024x1024 image with no reference
images. gpt-image-2.5-sunburst reads the same rate card, but as noted above
it does not necessarily consume the same number of tokens for the same
request, so treat these as the Flare figures rather than as both:
quality | Image output tokens |
|---|---|
low | 196 |
medium | 439 |
high | 1,756 |
xhigh | 3,122 |
max | 7,024 |
Your prompt adds text input tokens and every reference image adds image input
tokens, both on top of the rows above. A larger frame raises the output token
count, a smaller one lowers it, and n multiplies the whole thing.
Which channel is cheaper depends on quality and size: the metered bill climbs
steeply with quality (the output tokens above grow about 36× from low to
max), while the Standard price stays flat. Compare the two on the model page
for the size and quality you actually use.
Bill formula
Standard:
credits = ceil(price_per_image_usd × 1000)Official:
credits = ceil(metered_usd × n × 1000)1 credit = $0.001 USD, and $1 buys 1,000 credits. Credits never expire.
Failed generations are refunded automatically, so you are only charged for
images you receive.
Output schema
{
"id": "task_...",
"status": "completed",
"output": {
"image_urls": ["https://..."]
},
"usage": {
"credits": 0
}
}Generated links expire. Mirror them to your own storage if you need them long term.
Errors
| Code | Meaning |
|---|---|
INVALID_REQUEST | A parameter is missing, malformed, or out of range |
INSUFFICIENT_CREDITS | Balance is below the reserve for this request |
CONTENT_POLICY_VIOLATION | The prompt or an input image was rejected by content review |
UPSTREAM_ERROR | The generation failed upstream; the reserve is refunded |
RATE_LIMITED | Too many requests; retry with backoff |
The full catalog lives at /docs/api/errors.
Tips
- Spell out layout, materials and lighting. This model rewards long, specific briefs and holds the requested direction as instructions get more detailed.
- For an edit, name what must NOT change as well as what must. Preservation is the model's strong suit and stating it makes the result more predictable.
- Pick Sunburst when a long chain of edits has to stay coherent; pick Flare when throughput matters more than the last few percent of edit precision.
jpegencodes faster thanpng. Use it when latency matters and you do not need transparency.
Related
- GPT Image 2 — the shipping previous generation
- Images API overview
- Task polling