OpenAI's latest image model in two tiers: gpt-image-2.5-flare (default, about half the latency of GPT Image 2) and gpt-image-2.5-sunburst (highest fidelity). Point the OpenAI SDK, Codex, or Cursor at our base_url and it works as-is: text-to-image, reference-image editing, mask, native transparent PNG, billed per image at 1K/2K/4K, synchronous responses with no polling.
All requests carry the API key in the header:
Authorization: Bearer YOUR_API_KEY| Resolution | low | medium | high | xhigh | max |
|---|---|---|---|---|---|
| 1K | $0.008 | $0.025 | $0.045 | $0.08 | $0.18 |
| 2K | $0.012 | $0.028 | $0.09 | $0.16 | $0.35 |
| 4K | $0.020 | $0.045 | $0.15 | $0.26 | $0.58 |
quality accepts low, medium, high, xhigh and max, and **each tier is priced differently** — you pay for the detail you ask for: a layout check at 1K low is $0.008, and you only reach for max when the image is going to print. gpt-image-2.5-flare is the default tier (about half the latency of GPT Image 2 — social, e-commerce, high volume) and both renders and bills at **medium** unless you pass quality; gpt-image-2.5-sunburst targets premium commercial visuals and defaults to **high**, so pass quality explicitly if you do not want to be billed at the high rate. At the same quality tier the two models cost the same: you are choosing speed, not price. The resolution tier follows the longest edge of the image you actually get back, not the parameter you sent — with size auto or omitted the output decides, so pass an explicit size if you need a fixed tier. Reference images, mask and transparent background cost nothing extra; failed requests are not charged. gpt-image-2.5 is an alias of flare.
| Field | Required | Type | Description |
|---|---|---|---|
| Tier | Typical sizes | Tier rule | |
| 1K | 1024x1024 / 1536x1024 / 1024x1536 | long edge ≤ 1536 | |
| 2K | 2048x2048 / 2048x1152 / 1152x2048 | long edge 1537-2048 | |
| 4K | 3840x2160 / 2160x3840 | long edge > 2048 |
Sizes are delivered exactly as requested (1024², 2048², 3840x2160 measured, no snapping). Alternatively omit size and pass aspect_ratio + resolution (1K/2K/4K) and the server derives the size.
/api/v1/images/generations·POST/api/v1/images/editsPassing an OpenAI-style WxH size triggers sync mode: the response carries the image inline (b64_json + url), matching the official images.generate() / images.edit() contract. Waiting and timeout rules are the same as GPT Image 2 All (280s cap, keep-alive after 95s; a failure after the 95s mark is carried in the body as an error field).
# Text-to-image — OpenAI Images API shape, SYNC response (no task polling)
curl -X POST https://api.apimodels.app/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-flare",
"prompt": "a ceramic teapot, product shot, studio light",
"size": "1024x1024",
"background": "transparent",
"output_format": "png",
"n": 1
}'
# → { "created": ..., "data": [{ "b64_json": "...", "url": "https://r2.apimodels.app/..." }] }
# Image edit — multipart, OpenAI images.edit() shape (mask is optional, must be a PNG the same size as image)
curl -X POST https://api.apimodels.app/v1/images/edits \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=gpt-image-2.5-sunburst" \
-F "image=@product.png" \
-F "mask=@mask.png" \
-F "prompt=change the red label to a green label, keep everything else exactly the same" \
-F "size=2048x2048"Without a WxH size (or when you need callback_url) the request follows the platform async contract: create returns a taskId; poll until completed, or receive a webhook callback.
# Native async contract — pass aspect_ratio + resolution tier instead of size.
curl -X POST https://api.apimodels.app/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-flare",
"prompt": "a lighthouse on a cliff at dusk",
"aspect_ratio": "9:16",
"resolution": "2K",
"callback_url": "https://your-domain.com/webhook"
}'
# → { "code": 200, "data": { "taskId": "..." } }
curl "https://api.apimodels.app/v1/images/generations?task_id=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"| Field | Required | Type | Description |
|---|---|---|---|
| Field | Type | Description | |
| model | string | gpt-image-2.5-flare / gpt-image-2.5-sunburst (gpt-image-2.5 = flare) | |
| prompt | string | Prompt (required). For local edits, name the object to change in the prompt and say the rest must stay unchanged. | |
| size | string | WxH — triggers sync mode; see the size table | |
| aspect_ratio + resolution | string | Async alternative to size: ratio + 1K/2K/4K tier | |
| image / image_base64 / image_url | string | Reference image → auto-routes to the edit endpoint | |
| image_urls / images | string[] | Multiple reference images, up to 16 | |
| mask / mask_url / mask_base64 | string | A PNG the same size as the image (accepted at 1K / 2K / 4K); transparent pixels mark the area you want repainted. ⚠️ In our tests 2.5 treats the mask as a hint, not a hard boundary: "paint the editable area blue" also repainted the background in the keep region, while "turn the red circle blue, keep everything else" stayed local even without a mask. The prompt drives the edit scope; do not rely on the mask to confine it precisely. | |
| background | string | transparent / opaque / auto. transparent returns a real alpha PNG at 1K / 2K / 4K alike (52-67% transparent pixels measured on product shots). | |
| output_format | string | png / jpeg / webp (optional). Use png for transparency; if omitted, opaque images are delivered as JPEG q95 and alpha images stay PNG. | |
| quality | string | low / medium / high / auto. auto or omitted = the model default (flare medium, sunburst high), billed at that cell. high at 2K takes about 100s. | |
| response_format | string | b64_json (default) or url | |
| stream | boolean | Sync mode only: return an SSE stream instead | |
| n | number | Number of images (billed × n) |
Try it in the Playground
Flare is the default tier: full 2.5 quality at about half the latency of GPT Image 2, and it renders at medium quality unless you ask otherwise. Sunburst is the highest-fidelity tier for premium commercial visuals and renders at high quality by default. Both accept the same parameters and share one price grid (1K / 2K / 4K × low / medium / high); the only pricing difference is which cell the default lands on.
Yes, at 1K, 2K and 4K. background=transparent returns a real PNG with an alpha channel (we measured 52-67% transparent pixels on product shots). A mask is accepted on /v1/images/edits, but in our tests it acts as a hint rather than a hard boundary: name the object to change in the prompt and the edit stays local; a mask alone does not confine the change.
Priced on two axes, resolution and quality, fifteen cells in all: 1K $0.008 / $0.025 / $0.045 / $0.08 / $0.18, 2K $0.012 / $0.028 / $0.09 / $0.16 / $0.35, 4K $0.02 / $0.045 / $0.15 / $0.26 / $0.58 (low to max). You pay for the detail you ask for. The tier follows the longest edge of the image you actually get back, not the parameter you sent. quality=auto (or omitted) renders at the model default — medium for Flare, high for Sunburst — at the same price. Reference images, mask and transparent background cost nothing extra; failed requests are not charged.
It depends on the tier. OpenAI bills 2.5 per output token ($30 per 1M image tokens), so higher quality costs more — the same 4K image is about $0.011 at low and about $0.40 at max. We bill on the same two axes, so every cell compares directly: 4K max about $0.40 at OpenAI versus $0.58 here, 2K high about $0.107 versus $0.09, 1K low about $0.006 versus $0.008. No organization verification, one key for all models, and direct access from mainland China.