APIMODELSAPIMODELS
API Documentation

apimodels.app

GPT Image 2.6 API (Flare / Sunburst)

OpenAI GPT Image 2.6 in two tiers: gpt-image-2.6-flare (default) and gpt-image-2.6-sunburst (highest fidelity, more time per image). Both take the same parameters. New in 2.6: animated GIF, SVG vector output, edits guided by a markup image, masks, up to 10 images per call and reasoning effort low, medium or high. Plain images are priced per image by resolution and quality, from $0.01; animated GIF, requests with a mask, markup image or transparent background, and edits that keep the source size are billed per token at 10% below OpenAI's official rates (image output $27 per 1M tokens, OpenAI $30); SVG is a flat $0.0315 per image. Point the OpenAI SDK at our base_url and it works as-is.

Authentication

Authorization: Bearer YOUR_API_KEY

Pricing

Plain images are priced per image by resolution and quality, whatever the token count: any PNG, JPEG or WebP at a set size — an exact size, aspect_ratio with resolution, or a text-to-image request with no size, which defaults to 1024x768 and counts as 1K — is charged from the table below, for text-to-image and for edits that pass a size or resolution. Flare and Sunburst cost the same at 1K and 2K; each has its own 4K column.

Per image1K2K4K Flare4K Sunburst
low$0.01$0.03$0.03$0.03
medium$0.02$0.035$0.045$0.085
high$0.03$0.045$0.08$0.16
xhigh$0.07$0.08$0.17$0.28
max$0.08$0.15$0.30$0.47

Size tiers: 1K is up to 1.7 megapixels (for example 1024x1024, 1360x768 or 1536x1024), 2K up to 4.6 megapixels, and anything larger is 4K. Without a quality parameter the image renders at medium; quality auto is charged at the high price. n images cost n times the price. 1K at every quality except xhigh ($0.07 here, $0.05 on 2.5), 2K at xhigh and max, and 4K at medium and above cost the same as on GPT Image 2.5; 2.5 charges $0.02 / $0.03 / $0.04 at 2K low / medium / high and $0.02 at 4K low. xhigh and max are for plain PNG, JPEG and WebP only — GIF, masks, markup images and transparent backgrounds do not take them (the request returns 400). SVG is a flat $0.0315 per image, whatever the quality.

Requests billed per token

These requests are not on the table above. They are billed by the tokens the request actually used, at 10% below OpenAI's official rates: animated GIF; requests with a mask, a markup image or a transparent background; and edits that keep the source image's size (no size, or size auto). Text and image are priced separately, with separate rates for input, cached input and output, and each request total is rounded up to $0.0001.

Per 1M tokensInputCached inputOutput
Image$7.20$1.80$27.00
Text$4.50$1.125$9.00

Flare and Sunburst share these rates. For comparison, OpenAI's official rates are image $8 input, $2 cached and $30 output, and text $5 input, $1.25 cached and $10 output — every rate above is 10% below its OpenAI counterpart. For these requests, quality, size, GIF frames, reference / mask / markup images and prompt length all change the token count.

Account discounts apply on top of every price above. An upper bound is held from your balance when the request is accepted and settled when the image is ready, with the rest released — credits in the task result is exactly what that request cost. Failed requests are not charged.

Token breakdown

Completed png / jpeg / webp text-to-image and edit requests return usage in the OpenAI Images shape (input_tokens, input_tokens_details with text_tokens / image_tokens, output_tokens, output_tokens_details, total_tokens). On the task query and in callbacks it is data.usage, next to credits; in the OpenAI-compatible sync responses of /v1/images/generations and /v1/images/edits it sits at the top level next to created and data, and in the streaming *.completed event.

usage.cost has three fields (currency is always USD): amount is the price of the request before your account discount — for a plain image at a set size, the per-image price × the number of images, whatever the token count; for an edit that keeps the source image's size, tokens × our per-token rates, i.e. text input × $4.50 + image input × $7.20 + image output × $27 + text output × $9 per 1M tokens, rounded up to $0.0001 — the same as tokens × OpenAI's official rates × 0.9, so you can check it against OpenAI's price list. Plain images still report their token counts in usage, for information only. discount is your account's price multiplier (1 = no discount, 0.9 = 10% off); charged is what was actually deducted for the request, the same number as credits. For example, the edit in the curl example above (Sunburst, size 1024x1024, no quality, so medium) is one 1K medium image at $0.02: amount $0.02; on a 10%-off account charged is $0.018. Rely on charged when reconciling — on accounts with custom pricing it may not equal amount × discount.

No usage is returned for GIF, markup / mask / transparent-background requests, SVG (a flat $0.0315 per image) or failed tasks.

Option 1: OpenAI SDK (sync)

POST/v1/images/generations·POST/v1/images/edits

An OpenAI-style WxH size makes the call synchronous: the response carries the image (b64_json + url), matching images.generate() / images.edit(). Both dimensions must be multiples of 16 (1024x1024, 1536x1024 and 1024x1536 all work).

# Text-to-image, OpenAI Images API shape — a WxH size makes the call synchronous
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.6-flare",
    "prompt": "a ceramic coffee cup on a linen tablecloth, morning window light",
    "size": "1536x1024",
    "quality": "medium"
  }'
# → { "created": ..., "data": [{ "b64_json": "...", "url": "https://r2.apimodels.app/..." }],
#     "usage": { "input_tokens": ..., "output_tokens": ..., "total_tokens": ...,
#                "cost": { "currency": "USD", "amount": ..., "discount": ..., "charged": ... } } }   (token breakdown, see Pricing)

# Edit — multipart, OpenAI images.edit() shape
curl -X POST https://api.apimodels.app/v1/images/edits \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=gpt-image-2.6-sunburst" \
  -F "image=@product.png" \
  -F "prompt=change only the label to green, keep everything else exactly the same" \
  -F "size=1024x1024"
# → { "created": ..., "data": [{ ... }],
#     "usage": { "input_tokens": 1090, "input_tokens_details": { "text_tokens": 58, "image_tokens": 1032 },
#                "output_tokens": 462, "output_tokens_details": { "text_tokens": 0, "image_tokens": 462 },
#                "total_tokens": 1552,
#                "cost": { "currency": "USD", "amount": 0.02, "discount": 0.9, "charged": 0.018 } } }

Option 2: native async (every 2.6 parameter)

Without a WxH size the request follows the platform async contract: create returns a taskId, poll until completed and read resultUrls (one URL per image when you ask for several), or pass callback_url for a webhook. GIF, markup images, masks and num_images all go through this path.

# SVG: text-to-image only, n = 1, flat $0.0315 (quality has no effect on SVG)
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.6-flare",
    "prompt": "a flat two-color icon of a coffee cup with steam, the word OPEN below it",
    "output_format": "svg"
  }'

# Animated GIF: 12 frames, 120 ms each
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.6-flare",
    "prompt": "a paper boat bobbing on small waves, loopable",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "output_format": "gif",
    "frame_count": 12,
    "frame_duration_ms": 120
  }'
# → { "code": 200, "data": { "taskId": "..." } }

# Edit guided by a markup image (circles / arrows / notes on a transparent PNG)
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.6-sunburst",
    "prompt": "apply the changes marked on the image, keep everything else",
    "image_urls": ["https://example.com/room.png"],
    "markup_image_url": "https://example.com/room-markup.png",
    "reasoning_effort": "high"
  }'

curl "https://api.apimodels.app/v1/images/generations?task_id=TASK_ID" -H "Authorization: Bearer YOUR_API_KEY"
# → { "code": 200, "data": { "taskId": "...", "state": "completed", "resultUrls": ["https://r2.apimodels.app/..."],
#     "credits": ... } }   (markup-image requests are billed per token and return no usage block)
# usage.cost: amount = price before your account discount (per-image price for plain images at a set size; tokens × our per-token rates otherwise),
#             discount = your account multiplier, charged = what was actually deducted (always equals credits)
# usage is returned for png / jpeg / webp results only — not for GIF, markup / mask / transparent-background requests, SVG or failed tasks

Parameters

FieldRequiredTypeDescription
modelyesstringgpt-image-2.6-flare / gpt-image-2.6-sunburst (gpt-image-2.6 = flare)
promptyesstringRequired, up to 32,000 characters
image / image_url / image_urls / imagesnostring | string[]Reference images, up to 16; any reference makes it an edit
mask_url / masknostringEdit only: white = change, black = keep; cannot be combined with markup_image_url or used with gif output (returns 400)
markup_image_url / markup_imagenostringEdit only: a transparent PNG with only circles, arrows or notes, the same size as the first reference
aspect_ratio + resolutionnostringRatio (up to 3:1) plus 1K / 2K / 4K; the server derives an exact size in multiples of 16. For edits, resolution alone follows the first reference's ratio
sizenostringWxH (makes the call sync) or auto
image_sizenostring | objectPreset square_hd / square / portrait_4_3 / portrait_16_9 / landscape_4_3 / landscape_16_9 / auto, or {"width","height"}
qualitynostringlow / medium / high / xhigh / max / auto, default medium; auto is charged at the high price. xhigh and max add detail and time, and apply to plain PNG / JPEG / WebP only (not with GIF, a mask, a markup image or a transparent background)
reasoning_effortnostringlow / medium / high — higher adds detail and time; omitted = model default (high); xhigh and max run as high; any other value returns 400
output_formatnostringpng / jpeg / webp / gif / svg. If omitted, opaque images are delivered as JPEG by platform default. svg is text-to-image only with n = 1, at a flat $0.0315 (see Notes)
output_compressionnonumber0–100, jpeg / webp only
frame_countnonumbergif only: 2–16, default 9; the frame size is reduced to fit the frame count (see the GIF frame sizes table)
frame_duration_msnonumbergif only: milliseconds per frame, 20–2000, default 200
backgroundnostringauto / transparent / opaque. For gif output, a solid green-screen background is keyed out to transparent automatically; pass opaque to keep it
num_images / nnonumber1–10 (svg: 1 only)
callback_urlnostringWebhook for the async result

Sizes

Exact sizes must have both sides in multiples of 16, a long edge of at most 3840, a ratio of at most 3:1 and 655,360 to 8,294,400 pixels in total (a GIF frame may be smaller than 655,360 as long as frame_count × frame pixels is at least 655,360, e.g. 4 frames at 512x512). Anything else returns a 400 with the reason — the size is never changed silently. aspect_ratio + resolution examples:

Ratio1K2K4K
1:11024x10242048x20482880x2880
16:91360x7682736x15363840x2160
9:16768x13601536x27362160x3840
4:31152x8642368x17763312x2480
3:21248x8322496x16643504x2336
21:91568x6723136x13443840x1648

With no size at all, text-to-image uses the model default landscape_4_3 and edits follow the input image (auto). aspect_ratio auto or size auto lets the model pick.

Notes and limits

  • GIF: all frames are laid out on one sheet. The frame count is rounded up to a power of two and fills a grid, and the sheet must stay within 3840 px on its longest edge and 8,294,400 pixels in total — the same budget as a single image; the per-frame limit for each frame count is in the GIF frame sizes table below. If you pass only aspect_ratio / resolution, or no size, apimodels.app shrinks each frame to the largest size that fits — 6 frames at 1:1 1K come back at 960x960, 12 frames at 720x720; an exact frame size is sent as-is first, and if the sheet cannot hold it, apimodels.app shrinks the frames to a size that fits, keeping the aspect ratio, and generates again. Measured on 5 November 2026 (at current prices): 6 frames at 832x832 low about $0.0278, 6 frames at 976x672 low about $0.0397, 9 frames at 960x960 low about $0.0750 (that sheet was laid out 3×3, 2880x2880, right at the pixel cap) and 12 frames at 720x720 low about $0.0451.
  • Green-screen GIFs come back transparent: a common way to get a transparent sticker is to ask for a solid green background (e.g. #00FF00) in the prompt, but the model does not always follow it — sometimes it returns a transparent background on its own, sometimes a full green frame. After generation apimodels.app checks the border of every frame: if it is a solid green screen (including the darker green shadow under a character), the green is keyed out to transparency and the result is still a GIF with the same frame count, frame duration and loop. GIFs that are already transparent, or whose background is not a solid green screen, are delivered as they are. A GIF pixel is either fully transparent or fully opaque, so there are no soft film-style edges; edges are restored to the subject's own colour without a green fringe, though translucent details such as water drops can keep a trace of green. To keep the green, pass background: "opaque". Keying is free.
  • SVG: set output_format to svg for text-to-image only (no reference images) with n = 1. It is a flat $0.0315 per image regardless of quality — quality has no effect on SVG — and it does not support streaming or output_compression. The canvas follows your aspect ratio at up to about 1024x1024 pixels; larger sizes are scaled down to that (vectors scale without loss), and no size or auto uses 1024x768. The result is a static vector file with no scripts, external resources or embedded raster, suited to icons, logos and flat illustrations rather than photographic scenes.
  • Markup image or mask, not both. On the previous generation (2.5) our tests showed masks acting as hints rather than hard boundaries; 2.6 has not been measured yet — for a strict local edit, name the region in the prompt as well, e.g. "change only the bottle label, keep everything else unchanged".
  • Measured latency (5 November 2026, 16:9): plain 1K text-to-image about 20s at low quality and about 27s at high; a 1K low edit with one reference 22–58s; 2K / 4K, including high quality, 13–25s. Measured on 7 November 2026: SVG (1024x1024) about 40s; GIF with 4–16 frames 10–24s. For sync calls set client timeouts to at least 300s, since individual requests can run longer; for batch jobs, use the async path (taskId + polling or a callback).
  • Not every request succeeds: moderation refusals and upstream errors happen, and failures are not charged. Result files are deleted after 30 days.
  • Upload size: apimodels.app accepts about 4.5MB per request body; for large or many references use https://api.apimodels.app/v1 (same key, 100MB per request).
  • Plain-image prices match GPT Image 2.5 at 1K and at 4K medium and high; 2K is $0.03 / $0.035 / $0.045 here ($0.02 / $0.03 / $0.04 on 2.5) and 4K low $0.03 ($0.02 on 2.5). On 2.6, GIF, mask and markup-image requests are billed per token.

GIF frame sizes

The frame count is rounded up to a power of two and fills a grid; the sheet must stay within 3840 px on its longest edge and 8,294,400 pixels in total. The per-frame limits below follow from those two rules; the examples are multiples of 16. There is also a floor: frame_count × frame pixels must be at least 655,360 (4 frames at 512x512 work, 4 at 256x256 do not). GIF output cannot take a mask.

FramesGridPer-frame limitExamples
22×1 / 1×2the doubled side ≤1920, the other ≤3840, ≤4,147,200 px1920x2160, 1920x1088
3–42×2both sides ≤1920, ≤2,073,600 px1440x1440, 1920x1072
5–84×2 / 2×4short ≤960, long ≤1920, ≤1,036,800 px960x960, 1344x768 (1360x768 is just over)
9–164×4both ≤960, ≤518,400 px720x720, 944x528

Try it in the Flare / Sunburst playground

FAQ

How is GPT Image 2.6 billed?

Plain images are priced per image by resolution and quality, whatever the token count. At low / medium / high / xhigh / max: 1K $0.01 / $0.02 / $0.03 / $0.07 / $0.08 and 2K $0.03 / $0.035 / $0.045 / $0.08 / $0.15 on both tiers; 4K $0.03 / $0.045 / $0.08 / $0.17 / $0.30 on Flare and $0.03 / $0.085 / $0.16 / $0.28 / $0.47 on Sunburst. That applies to any PNG, JPEG or WebP at a set size — an exact size (1K up to 1.7 megapixels, 2K up to 4.6, 4K above), aspect_ratio with resolution, or text-to-image with no size, which defaults to 1024x768 and counts as 1K — for text-to-image and for edits that pass a size or resolution. Quality defaults to medium, auto is charged at the high price and n images cost n times the price; xhigh and max are for plain PNG, JPEG and WebP only, not with GIF, a mask, a markup image or a transparent background. Animated GIF, requests with a mask, a markup image or a transparent background, and edits that keep the source image's size are billed per token at 10% below OpenAI's official rates: image output $27 per 1M tokens (OpenAI: $30), image input $7.20 (cached $1.80; OpenAI: $8 and $2), text input $4.50 (cached $1.125; OpenAI: $5 and $1.25) and text output $9 (OpenAI: $10), each request rounded up to $0.0001. SVG is a flat $0.0315 per image, whatever the quality. Account discounts apply on top. An upper bound is held when you submit and the rest is released when the image is ready; failed requests are not charged.

What can GPT Image 2.6 do that 2.5 cannot?

Animated GIF output (2–16 frames), edits guided by a markup image (circles, arrows and notes on a transparent PNG), masks where white marks the area to change, up to 10 images per call, reasoning effort from low to max, exact pixel sizes up to 3840 on the long edge, and SVG vector output from a text prompt (one per request, flat $0.0315; quality has no effect on SVG).

What is the difference between gpt-image-2.6-flare and gpt-image-2.6-sunburst?

Same parameters, same token price list. Flare is the default tier for everyday volume; Sunburst is OpenAI's precision tier, spending longer per image for finer detail and edits held tightly to the instruction. In our 5 November 2026 tests a 1K low text-to-image took about 20 seconds (about 27 at high quality) and a 1K low edit with one reference 22–58 seconds; 2K and 4K, including high quality, took 13–25 seconds.