Tutorial
GPT Image 2.6 API Tutorial: Flare vs Sunburst, GIF and SVG Output
Pick the right model ID, set the parameters that matter, and ship GIF and SVG output without wasting calls
이 페이지에서
Flare or Sunburst: Pick Your Model ID First
Start with the model ID. GPT Image 2.6 ships as four IDs, and the choice comes down to speed versus edit consistency — not price. Flare and Sunburst share identical parameters, usage patterns, and pricing. The difference is temperament.
-
gpt-image-2.6-flare/text-to-image— fastest path from prompt to pixels. Default choice for prompt iteration, A/B drafts, and batch jobs. -
gpt-image-2.6-flare/image-to-image— same speed, with source images attached. -
gpt-image-2.6-sunburst/text-to-image— heavier detail model. Reach for it when the first frame matters more than the tenth draft. -
gpt-image-2.6-sunburst/image-to-image— the one to use for multi-round edits where characters, products, or layouts must stay consistent across passes.
A simple rule: if you are still deciding what the image should look like, use Flare. Once you are refining a look across several edits at medium quality or above, switch to Sunburst. Because parameters and pricing are identical, moving between them is a one-line change in your request body — no schema rewrite.
{
"model": "gpt-image-2.6-flare/text-to-image",
"prompt": "a neon-lit ramen stall in the rain, cinematic"
}
Swap the model string and you are on Sunburst. That is the whole migration.
Text-to-Image Parameters That Change the Output
Most parameters are independent axes, not a single dial. The three that matter most are quality, complexity, and resolution.
quality
low, medium, high, xhigh, max. This drives price and detail. Default sensibly: low or medium during iteration, high and above when the frame is final.
complexity
low, medium, high — a planning-level control, independent of quality. Default is high. It does not substitute for quality.
resolution and aspect_ratio
resolution is 1K, 2K, or 4K (default 1K). aspect_ratio accepts auto or any of 15 explicit ratios. Together they shape the canvas, not the rendering effort.
output_format and output_compression
output_format is png (default), jpeg, webp, gif, or svg. output_compression runs 0–100 and applies only to jpeg and webp. Setting it on PNG does nothing — do not ship dead parameters.
background
auto, opaque, or transparent. transparent requires png or webp; don't pair it with jpeg, gif or svg.
A minimal, deliberate set:
{
"model": "gpt-image-2.6-flare/text-to-image",
"prompt": "isometric coffee roastery, soft morning light",
"quality": "medium",
"resolution": "2K",
"aspect_ratio": "16:9",
"output_format": "png",
"background": "opaque"
}
Every parameter you omit takes a sane default. Every parameter you set should earn its place.
Image-to-Image: Source Images, mask_url and markup_url
The image-to-image IDs take 1–16 source images in jpeg, png, or webp, passed as image_urls. That is the input contract — no more, no fewer.
On top of that you get exactly one editing hint: mask_url or markup_url, never both.
mask_url
An RGBA PNG at the same dimensions as the first source image. Transparent pixels mark the region to change. Use it when you know where to edit pixel-precisely.
markup_url
A transparent PNG where you draw annotations circling the area to edit. The annotation guides the model and does not appear in the result. Use it when you want to describe a region loosely instead of cutting a precise mask.
Two rules to keep in mind:
-
The two fields are mutually exclusive. Sending both is a validation error.
-
Masking is a hint, not a lock. Areas outside the mask can still shift slightly. Do not promise pixel-perfect preservation downstream.
{
"model": "gpt-image-2.6-sunburst/image-to-image",
"image_urls": ["https://example.com/product.png"],
"mask_url": "https://example.com/product-mask.png",
"prompt": "replace the background with matte concrete",
"quality": "high"
}
Output is limited to png, jpeg, or webp — no gif or svg on this path.
Configuring GIF Output: frame_size, frame_count, frame_duration_ms
GIF is a different beast: it takes its own parameters and has hard limits enforced at submit time.
frame_size
Width-by-height in pixels, e.g. 512x512. Each side must be a multiple of 16. Default is 512x512. It also defines the GIF's aspect ratio — so do not send aspect_ratio separately; leave it unset or set it to auto. The human-readable 1:1 style is not accepted here; use WIDTHxHEIGHT.
frame_count
From 2 to 16 frames. Default is 9. At 768x768, the cap drops to 12 frames.
frame_duration_ms
Minimum 20, default 200. Values are rounded to 10 ms automatically.
The hard ceilings
-
Each side of the whole stitched frame sheet ≤ 3840 (the sheet, not a single frame).
-
Total pixels ≤ 8,294,400.
-
Aspect ratio ≤ 3:1.
Exceed any of these and the request is rejected at the submit stage — no image, no charge. Validate client-side before sending: check the multiple-of-16 rule, the frame-count range, and the sheet's side, total-pixel and ratio caps. For reference, 16 frames at 512x512 stitch into a 4×4 sheet of 2048×2048 (about 4.19 million pixels), well inside the limits; 768x768 tops out at 12 frames.
GIF is billed by quality only: low $0.070, medium $0.124, high $0.150, xhigh $0.266, max $0.598. The example below costs $0.124.
{
"model": "gpt-image-2.6-flare/text-to-image",
"prompt": "pixel-art fox walking through snow, seamless loop",
"output_format": "gif",
"frame_size": "512x512",
"frame_count": 12,
"frame_duration_ms": 120,
"quality": "medium"
}
Note: output_format: "gif" is text-to-image only.
Requesting SVG Output and What It Costs
SVG output is text-to-image only. Set output_format to svg on a text-to-image ID and nothing else changes in the request shape.
{
"model": "gpt-image-2.6-sunburst/text-to-image",
"prompt": "minimal line icon of a paper plane, single color",
"output_format": "svg",
"quality": "medium",
"resolution": "1K"
}
The cost model
SVG is billed as the same quality-tier PNG price plus a flat $0.030. It is a surcharge on the tier, not a separate price table: quality and resolution set the base, and the $0.030 is the same on every tier.
So the example above (medium 1K) costs $0.041 + $0.030 = $0.071. At the extremes, low 1K SVG is $0.053 and max 4K SVG is $0.666. The full table is on the pricing page.
The practical implication: use low or medium for icon and logo drafts, and reserve high and above for final vector assets where the detail has to survive scaling.
Cost Planning: Per-Image Pricing and Refunded Rejections
Pricing rules to internalize before you build a budget:
- Standard image output is billed per image by
qualityandresolution. There is no per-token accounting to reason about — pick the tier, get the price:
| quality | 1K | 2K | 4K |
|---|---|---|---|
| low | $0.023 | $0.042 | $0.075 |
| medium | $0.041 | $0.075 | $0.133 |
| high | $0.049 | $0.090 | $0.160 |
| xhigh | $0.087 | $0.160 | $0.283 |
| max | $0.195 | $0.360 | $0.636 |
-
image-to-imagecharges the same table plus $0.012 for each source image you attach. Attaching 16 images adds $0.192. -
GIF is billed by
qualityalone, regardless ofresolution: low $0.070, medium $0.124, high $0.150, xhigh $0.266, max $0.598. -
SVG is the same-tier PNG price plus $0.030.
-
Rejected submissions — invalid parameters, GIF dimension overruns — are fully refunded. You pay for successful renders, not attempts.
That last point changes how you should think about validation. Client-side checks cost you latency and nothing else; a malformed request costs the same as a round trip. Build the validator and skip the guessing.
When comparing against the older generation, note that GPT Image 2.5 standard lines are billed by resolution only (1K $0.025, 2K $0.040, 4K $0.060) rather than the quality-and-resolution grid used here.
A Pre-Flight Checklist Before You Ship
Run this list against every request path before your first production call.
-
Model ID: Flare for iteration and batch; Sunburst for consistent multi-round edits at
mediumor above. -
Format and path:
gifandsvgonly ontext-to-image. Image-to-image outputspng,jpeg, orwebp— nothing else. -
Compression:
output_compressiononly withjpegorwebp. Strip it from PNG requests. -
Transparency:
background: "transparent"requirespngorwebp— never withgif,svgorjpeg. -
GIF geometry:
frame_sizesides are multiples of 16 and written asWIDTHxHEIGHT;frame_countis 2–16 (12 max at768x768);frame_duration_ms≥ 20, rounded to 10 ms automatically. Noaspect_ratioalongside GIF. -
GIF ceilings: the stitched frame sheet stays ≤ 3840 per side, ≤ 8,294,400 total pixels, ratio ≤ 3:1. These reject at submit.
-
Masks:
mask_urlandmarkup_urlare mutually exclusive.mask_urlis an RGBA PNG matching the first source image. -
Source images: 1–16 files in
image_urls,jpeg/png/webp. -
Budget: GIF priced by
qualityonly ($0.070–$0.598); SVG adds $0.030; image-to-image adds $0.012 per reference image; rejects are refunded.
The fastest way to verify a single path is to open the model page for Flare text-to-image and run one call with defaults. Ship the checklist as a unit test, and the launch is quiet.
관련 글
모든 아티클 보기 →-
Tutorial
GPT Image 2.6 in Practice: Pixel GIFs, SVG Logos and Masked Edits
Copy-paste workflows for frame_size, frame_count, SVG output and mask_url — with the parameter traps that cause rejected jobs
10 min read -
Tutorial
Recraft Creative Upscale: Landscape Examples
Inspect cabin, lake and watercolor examples, identify redrawn detail, and distinguish previews from full-size results.
8 -
Tutorial
OpenAI Invalid API Key: Authentication Checks
Separate OpenAI 401, 403, and 429 errors. Check runtime variables, account context, and credentials with a read-only request.
3