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 |
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 |
input_fidelity | enum | no | — | high or low. Applies to edits; controls how much source detail survives |
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. Each delivered image is billed |
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 consume more tokens, take longer, and cost more. 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.
Pricing dimensions
Billing scales with the tokens an image consumes, which is driven by:
- Quality — each tier up the ladder costs materially more.
- Size — more pixels means more output tokens.
- Reference images — each input image contributes input tokens.
n— every delivered image is billed.
Current rates are on the model page.
Bill formula
credits = ceil(price_per_image_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.
- Reach for
input_fidelity: "high"when a face, logo or texture has to survive verbatim, andlowwhen you want more freedom from the source. - 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