Skip to main content

GPT-Image-2.6 API in Python: Flare vs Sunburst, Complexity, SVG and GIF Output

What's new in OpenAI's November image models, with a working Python request for each feature.

Updated 7 min readMarkdown
GPT-Image-2.6 API in Python: Flare vs Sunburst, Complexity, SVG and GIF Output

OpenAI released Images 2.6 on 4 November 2026, and the API side came with two new models: gpt-image-2.6-flare for fast iteration and gpt-image-2.6-sunburst for detailed visual work. Along with the models, the Image API picked up four features worth knowing about: a complexity setting, SVG output, animated GIF output and markup-guided edits.

This post walks through each one in Python, with the limits OpenAI documents for each. Every parameter below comes from OpenAI's image generation guide and the model pages for Flare and Sunburst, checked on 16 November 2026.

Flare vs Sunburst at a glance

gpt-image-2.6-flare gpt-image-2.6-sunburst
OpenAI's description "Image generation and editing for fast iteration" "Image generation and editing for detailed visual work"
Text input (per 1M tokens) $5.00 $5.00
Image input (per 1M tokens) $8.00 $8.00
Image output (per 1M tokens) $30.00 $30.00
Endpoints Generations, edits, Responses Generations, edits, Responses
quality low, medium, high, xhigh, max, auto same
complexity low, medium, high (default high) same

The per-token prices on both model pages are identical, so the cost of a request depends on how many image tokens it produces, which changes with size and quality. In its launch post, OpenAI says Flare can generate an image "in as little as six seconds" when quality is set to low, while Sunburst brings "higher-quality image generation and even greater image consistency across edits" at medium or high quality.

A simple way to use them together: draft with Flare, then render the version you keep with Sunburst.

Setup

pip install -U openai
export OPENAI_API_KEY="your-key"

All the examples below decode the base64 result and write it to disk, the same way OpenAI's own examples do.

If your installed SDK doesn't recognise a new field such as complexity or frame_count yet, update the package. Until then, you can send new fields through extra_body={"complexity": "low"}.

1. Fast drafts with Flare and low complexity

complexity controls how much the model plans before it renders. OpenAI's guide says lower complexity suits focused work, while higher complexity helps with "dense text, complex layouts, and relationships between objects." It also warns that higher complexity "can increase latency and introduce unwanted changes," and that changing it has no separate fee.

import base64
from pathlib import Path

from openai import OpenAI

client = OpenAI()

result = client.images.generate(
    model="gpt-image-2.6-flare",
    prompt="A flat illustration of a small tea stall at sunrise, warm colours, simple shapes",
    quality="low",
    complexity="low",
    output_format="jpeg",
)

Path("draft.jpg").write_bytes(base64.b64decode(result.data[0].b64_json))

Two settings here are about speed. quality="low" is what OpenAI suggests for quick drafts, and the guide notes that JPEG is faster than PNG if latency matters. The default output format is PNG, and WebP is also available.

2. Final renders with Sunburst

For the image you'll actually ship, switch the model and raise quality. If you leave out complexity, both models use high, which suits posters and layouts with text.

result = client.images.generate(
    model="gpt-image-2.6-sunburst",
    prompt=(
        "A poster for a tea stall called Monsoon Chai. "
        "Headline text: 'OPEN EVERY MORNING'. Clean layout, two accent colours."
    ),
    quality="high",
)

Path("poster.png").write_bytes(base64.b64decode(result.data[0].b64_json))

3. SVG output for logos and icons

Set output_format="svg" on the generations endpoint. OpenAI positions SVG for "icons and illustrations" that need editable paths, shapes and colours.

result = client.images.generate(
    model="gpt-image-2.6-sunburst",
    prompt="A minimal two-colour logo for Monsoon Chai: a tea cup with a rain drop, flat shapes",
    output_format="svg",
    n=1,
    quality="medium",
)

svg_bytes = base64.b64decode(result.data[0].b64_json)
Path("logo.svg").write_bytes(svg_bytes)  # UTF-8 XML

The limits are worth reading before you build on this:

  • n must be 1.
  • No streaming, no partial images and no output_compression.
  • The edits endpoint doesn't support SVG output, and an SVG can't be used as an input image for edits.
  • The API first makes a reference image and builds the SVG from it. quality controls that reference image.
  • The SVG contains static vector content only: no scripts, external resources or embedded raster images.

4. Animated GIFs

Set output_format="gif" on either the generations or the edits endpoint, and describe the motion and the loop in the prompt.

result = client.images.generate(
    model="gpt-image-2.6-flare",
    prompt=(
        "Steam rising from a clay cup of tea on a wooden counter. "
        "Seamless loop: the last frame returns to the first."
    ),
    output_format="gif",
    frame_count=9,
    frame_duration_ms=200,
    size="512x512",
)

Path("steam.gif").write_bytes(base64.b64decode(result.data[0].b64_json))

The GIF fields, from the guide:

Field Values Default
frame_count 2 to 16 frames 9
frame_duration_ms 20 to 2000 ms per frame, rounded to 10 ms 200
size auto, or WIDTHxHEIGHT in multiples of 16 auto

A few things that aren't obvious from the table:

  • size is the size of each frame, not the whole animation.
  • Loop length is frame_count × frame_duration_ms, so the defaults give a 1.8-second loop.
  • If a request goes over the model's size limits or pixel budget, reduce frame_count, the frame size or n. Using size="auto" lets the API pick a frame size that fits.
  • Like SVG, GIF output has no streaming, partial images or custom output_compression.
  • To animate from still reference images, send them to client.images.edit with output_format="gif".

5. Markup-guided edits

Markup lets you draw on a transparent layer (a circle, an arrow, a box) and tell the model what to change there. Pass that layer as markup on the edits endpoint.

with open("menu-board.png", "rb") as image, open("markup.png", "rb") as markup:
    result = client.images.edit(
        model="gpt-image-2.6-flare",
        image=("menu-board.png", image, "image/png"),
        markup=("markup.png", markup, "image/png"),
        quality="medium",
        complexity="low",
        prompt=(
            "Change the price inside the red box to 30. "
            "Keep the rest of the board unchanged. Remove the red box."
        ),
    )

Path("menu-board-edited.png").write_bytes(base64.b64decode(result.data[0].b64_json))

The rules for the markup file:

  • It must be a PNG with transparent pixels. Don't flatten it onto the original photo.
  • It applies to the first input image.
  • Don't combine markup with mask.
  • The annotation file can be up to 50 MB.
  • Markup edits cost the same token rates as other edits, with no extra fee.

complexity="low" fits here because OpenAI's guide names focused edits, "such as changing a background or a sign," as the case for lower complexity.

Which settings for which job

Job Model quality complexity
Quick concept drafts Flare low low
Small fixes to an existing image Flare medium low
Posters, layouts, dense text Sunburst high default (high)
Logos and icons as vectors Either, output_format="svg" medium or higher default
Short loops for social or UI Flare first, then Sunburst for the final medium default

These are starting points, not benchmarks. OpenAI's own advice is to compare complexity levels for your task, since higher isn't always better.

A note on cost

Image output on both models is billed at $30 per million tokens. complexity has no separate fee, and markup edits cost the same as other edits. If you stream partial images, OpenAI's guide says each partial image adds 100 image output tokens. For estimates, OpenAI's image generation guide includes a cost calculator.

If you're comparing these models with other image tools, Toolbit keeps an image generation category (I work on Toolbit).

This article was written with AI assistance and reviewed by the author. The code follows OpenAI's documented parameters as of 16 November 2026; check the guide if a request fails, since these APIs change quickly.

About the author

  • I work on Toolbit (toolbit.ai) and write practical guides on AI models, APIs and developer tools: what changed, what it costs and how to use it.

No comments yet. Be the first to comment.