Annonce: Offre de lancement limitée à 20 % de réduction sur GPT Image 2.6 Flare et Sunburst, essayez dès maintenant
HiAPI
Cet article n'est pas encore disponible dans votre langue ; nous affichons l'original.
Blog

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

Nov 6, 2026 8 min read
奶油色纸质层叠构成的抽象横幅,多层薄纸错落后退,边缘为石墨色,其中一片为陶土色,作为教程文章封面图。
Sur cette page

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 quality and resolution. 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-image charges the same table plus $0.012 for each source image you attach. Attaching 16 images adds $0.192.

  • GIF is billed by quality alone, regardless of resolution: 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 medium or above.

  • Format and path: gif and svg only on text-to-image. Image-to-image outputs png, jpeg, or webp — nothing else.

  • Compression: output_compression only with jpeg or webp. Strip it from PNG requests.

  • Transparency: background: "transparent" requires png or webp — never with gif, svg or jpeg.

  • GIF geometry: frame_size sides are multiples of 16 and written as WIDTHxHEIGHT; frame_count is 2–16 (12 max at 768x768); frame_duration_ms ≥ 20, rounded to 10 ms automatically. No aspect_ratio alongside 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_url and markup_url are mutually exclusive. mask_url is an RGBA PNG matching the first source image.

  • Source images: 1–16 files in image_urls, jpeg / png / webp.

  • Budget: GIF priced by quality only ($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.

Articles similaires

Voir tous les articles →

Commencez avec des artefacts IA persistants

Obtenez votre clé API et appelez des modèles d'image, de vidéo et d'audio via une API unique basée sur les tasks.

Lire la documentation de l'API