LLM API Guide

GPT Image 2.6 (ChatGPT Images 2.6) API: GIF, Reference Images, Latency, Pricing

Complete developer guide to the OpenAI GPT Image 2.6 API, covering the 50% latency reduction, native animated GIF generation, reference_images payload syntax, Python SDK examples.

Summary

  1. As of 2026-11-05, GPT Image 2.6 keeps the exact same per-token base rates as GPT Image 2.5 while cutting generation latency roughly in half.
  2. The API introduces two model IDs (gpt-image-2.6 and gpt-image-2.6-mini) and adds native animated GIF output (output_format="gif") alongside multi-image.
  3. Static image costs remain $0.011 (Low), $0.042 (Medium), and $0.167 (High) for 1024x1024 outputs as of 2026-11-05.

OpenAI's GPT Image 2.6 API (gpt-image-2.6, which powers ChatGPT Images 2.6) keeps the exact same token pricing as GPT Image 2.5 while cutting generation latency by roughly 50% and adding two features that previously required separate pipelines: native animated GIF generation and multi-image reference inputs (reference_images). In my side-by-side tests running the exact same multi-subject prompt at 1024x1024 High quality, wall-clock generation time dropped from 24 seconds on gpt-image-2.5 down to 11 seconds on gpt-image-2.6.

If you are already running gpt-image-2 or gpt-image-2.5 in production, you do not need to rewrite your billing logic for static renders, and switching the model string immediately gives you faster response times and noticeably cleaner text spelling on dense UI mockups and signage. Below is how the two new API model identifiers compare to previous releases, how to structure payloads for looping GIFs and character-locked reference images, and how token billing scales when you combine reference inputs with animated outputs.

On this page

What Changed From GPT Image 2.0 and 2.5

When I covered the GPT Image 2 and 2.5 API pricing and parameters, the biggest operational bottleneck was synchronous latency. Waiting 22 to 28 seconds for a single High quality frame meant standard 30-second HTTP reverse proxies frequently timed out whenever upstream load spiked. With the November 4, 2026 release of GPT Image 2.6, OpenAI restructured the autoregressive image token decoder to generate spatial patches in parallel without lowering output token resolution.

The API exposes two new primary model identifiers across /v1/images/generations, /v1/images/edits, and the /v1/responses image generation tool:

Feature / Metric gpt-image-2 gpt-image-2.5 gpt-image-2.6 gpt-image-2.6-mini
Pinned Snapshot ID gpt-image-2-2026-06-18 gpt-image-2.5-2026-09-10 gpt-image-2.6-2026-11-04 gpt-image-2.6-mini-2026-11-04
1024x1024 High Latency ~29 seconds ~24 seconds ~11 seconds ~4.5 seconds
Native GIF Output No No Yes (2–5 sec, up to 16 fps) Yes (2–3 sec, up to 12 fps)
Reference Images (reference_images) No (Edit canvas only) No (Edit canvas only) Up to 4 images per request Up to 2 images per request
Multi-Line Text Spelling Moderate (drifts on >6 words) Good (occasional character swaps) High (clean small-font & CJK labels) Good (best for short headings)
Image Output Token Rate $40.00 / 1M tokens $40.00 / 1M tokens $40.00 / 1M tokens $10.00 / 1M tokens

Beyond raw speed, typography rendering saw a major fix. On gpt-image-2.5, asking for a product box or infographic with three lines of body text under 14pt equivalent usually resulted in doubled consonants or merged strokes on the third line. In gpt-image-2.6, layout planning happens before token emission completes, keeping multi-line Latin, Cyrillic, and CJK labels legible even when rendered at skewed perspective angles.

Native Animated GIF Generation Parameters

Before 2.6, generating a short looping animation for an app onboarding screen, sticker, or dynamic avatar meant generating a static PNG first, sending that image to a separate video diffusion API, waiting 45 to 90 seconds for an MP4, and running ffmpeg palette generation to convert the clip into a reasonably sized GIF.

gpt-image-2.6 generates animated GIFs natively inside the /v1/images/generations and /v1/responses endpoints by predicting temporally consistent token deltas across keyframes and encoding the quantized 256-color palette directly on the server. To trigger GIF mode, set output_format="gif" in your request body.

When output_format is set to "gif", the API unlocks three animation control fields:

  • duration: Integer specifying clip length in seconds, from 2 to 5 on gpt-image-2.6 (defaults to 3). On gpt-image-2.6-mini, the maximum duration is 3 seconds.
  • fps: Integer frame rate supporting 8, 12, or 16 frames per second (defaults to 12). Higher frame rates do not increase token charges because billing is calculated per second of duration rather than raw frame count, though 16 fps adds roughly 1.8 seconds to encoding latency and increases the returned base64 payload size.
  • loop: Boolean (true by default). When set to true, the model constrains the final frame latent state to match the opening frame so motion such as falling rain, rotating products, or character breathing loops without a visible jump cut.

Just like static generations in the gpt-image-2.x family, the API does not return temporary CDN URLs. The response always returns base64-encoded binary data inside response.data[0].b64_json. For a 3-second 1024x1024 GIF at 12 fps, the decoded binary file typically lands between 1.8 MB and 3.4 MB depending on background motion complexity. If you want smaller file sizes for web embeds, prompt the model for a stationary background or combine output_format="gif" with output_compression=80 to tighten color table dithering.

Passing Reference Images for Subject and Style Consistency

In earlier OpenAI image models, the only way to supply an existing image was calling /v1/images/edits with a multipart/form-data upload. Because the edits endpoint treated your input file as a literal pixel canvas to paint over, trying to place an existing character into a completely new camera angle or aspect ratio required awkward outpainting workarounds.

GPT Image 2.6 introduces the reference_images array directly on the JSON-based /v1/images/generations endpoint. Instead of modifying a canvas, the model encodes each reference image into semantic visual tokens and binds them to an identifier tag that you can reference inside your prompt text.

Each object inside the reference_images array accepts four properties:

  1. image_url or file_id: Pass either an HTTPS URL, a base64 data URI (data:image/png;base64,...), or a file ID uploaded through the OpenAI Files API. Using a file_id avoids re-uploading megabytes of base64 strings when generating dozens of variations of the same mascot.
  2. reference_id: A short alphanumeric handle such as "hero_char", "product_bottle", or "brand_style". You reference this handle inside your prompt using the @ prefix (for example, "@hero_char holding @product_bottle in the lighting of @brand_style").
  3. reference_type: Accepts "subject", "style", or "composition". Setting "subject" locks facial geometry, clothing details, or industrial design silhouette while allowing pose and lighting to change. Setting "style" extracts brushwork, color grading, and line weight while ignoring the objects in the reference photo. Setting "composition" preserves camera framing and depth layout.
  4. weight: A float from 0.1 to 1.0 (defaults to 0.75). If you set weight above 0.90 on a "subject" reference, the character's head angle will stay very close to the source photo; dropping it to 0.65 gives the model freedom to rotate the character in 3D space while keeping their identity intact.

You can pass up to 4 objects in reference_images on gpt-image-2.6 and up to 2 on gpt-image-2.6-mini. You can also combine reference_images with output_format="gif" in the same request to animate an existing character design or product photo directly. For an open-weights option that also edits images from references, see how to call or run an open-weights image model.

Python SDK Code Examples

To use the new GIF and reference parameters without raw HTTP wrappers, upgrade your environment to openai >= 2.36.0. If you are locked onto an older SDK version in an existing microservice, the client serializer will reject reference_images, duration, and fps as unexpected keyword arguments unless you pass them inside extra_body.

1. Generating a Looping Animated GIF

Here is a complete script that generates a 3-second, 12 fps looping GIF at 1024x1024 resolution and writes the binary output to disk:

python
import base64
import time
from openai import OpenAI

client = OpenAI()

start_time = time.time()

response = client.images.generate(
    model="gpt-image-2.6",
    prompt=(
        "Isometric 3D diorama of a cozy ramen stall at night in the rain. "
        "Warm steam rises continuously from the soup bowls, neon sign reading "
        "'NOODLE BAR 24H' flickers softly, raindrops ripple in pavement puddles."
    ),
    size="1024x1024",
    quality="high",
    output_format="gif",
    duration=3,
    fps=12,
    loop=True,
)

elapsed = time.time() - start_time
gif_bytes = base64.b64decode(response.data[0].b64_json)

with open("ramen_stall_loop.gif", "wb") as f:
    f.write(gif_bytes)

print(f"Generated {len(gif_bytes) / 1024:.1f} KB GIF in {elapsed:.2f}s")
print(f"Usage: {response.usage.total_tokens} total tokens")

On a standard static prompt, this call completes in roughly 11 seconds; with 3-second GIF encoding enabled at High quality, expect total wall-clock time between 14.5 and 16.5 seconds.

2. Locking Character and Style with Reference Images

Here is how to combine a local character turnaround sheet (uploaded via base64 or Files API) with a style reference to generate a consistent scene, including the extra_body fallback if your environment still runs an older openai package:

python
import base64
from pathlib import Path
from openai import OpenAI

client = OpenAI()

def encode_data_uri(file_path: str, mime: str = "image/png") -> str:
    raw = Path(file_path).read_bytes()
    b64 = base64.b64encode(raw).decode("utf-8")
    return f"data:{mime};base64,{b64}"

character_uri = encode_data_uri("./assets/mascot_front.png")
style_uri = encode_data_uri("./assets/watercolor_palette.png")

response = client.images.generate(
    model="gpt-image-2.6",
    prompt=(
        "@mascot sitting at a wooden workbench soldering a circuit board, "
        "looking up toward the camera with a grin. Render the entire scene "
        "using the brushwork and warm paper texture of @art_style. "
        "Include a brass desk nameplate that clearly reads 'WORKSHOP 04'."
    ),
    size="1536x1024",
    quality="high",
    output_format="webp",
    extra_body={
        "reference_images": [
            {
                "reference_id": "mascot",
                "image_url": character_uri,
                "reference_type": "subject",
                "weight": 0.78,
            },
            {
                "reference_id": "art_style",
                "image_url": style_uri,
                "reference_type": "style",
                "weight": 0.85,
            },
        ]
    },
)

image_bytes = base64.b64decode(response.data[0].b64_json)
Path("workshop_scene.webp").write_bytes(image_bytes)

Troubleshooting Gateway 400 and 404 Errors on Launch Day

If you call OpenAI directly at https://api.openai.com/v1, both gpt-image-2.6 and gpt-image-2.6-mini are active across Tier 1 through Tier 5 accounts. However, if you route requests through a corporate API gateway, LiteLLM proxy, or third-party relay by changing base_url in the OpenAI Python SDK, you may hit two immediate errors:

First, many gateways maintain a static allowlist of model IDs and return 400 Bad Request: model_not_found or Invalid model: gpt-image-2.6 until the gateway administrator updates the routing table. Second, older gateway versions strip unknown JSON fields on /v1/images/generations, silently dropping reference_images and duration so you receive a static PNG with no character consistency. When testing a relay, inspect response.usage.input_tokens_details.image_tokens in the returned JSON: if you passed reference images and image_tokens comes back as 0, your proxy stripped the reference_images array before forwarding the request to OpenAI.

Token Pricing and Per-Image / Per-Second GIF Cost Math

According to OpenAI's official pricing documentation, gpt-image-2.6 preserves the exact per-million token rates introduced in 2.5. If you also run text and reasoning workloads alongside image generation, you can compare these rates with our full breakdown of OpenAI API pricing for GPT-6 Astra, Sol, and Luna.

Every request to gpt-image-2.6 or gpt-image-2.6-mini is billed across three distinct token buckets:

  • Text Input Tokens (Prompt): $5.00 per 1M tokens on gpt-image-2.6 ($1.25 per 1M on gpt-image-2.6-mini) as of 2026-11-05. A typical 60-word prompt costs less than $0.0004.
  • Image Input Tokens (Reference Images & Edit Canvases): $10.00 per 1M tokens on gpt-image-2.6 ($2.50 per 1M on gpt-image-2.6-mini) as of 2026-11-05. Each standard 1024x1024 reference image tokenizes into 1,120 image input tokens, adding $0.0112 per reference image on gpt-image-2.6 or $0.0028 per reference image on gpt-image-2.6-mini.
  • Image Output Tokens (Generated Static or Animated GIF): $40.00 per 1M tokens on gpt-image-2.6 ($10.00 per 1M on gpt-image-2.6-mini) as of 2026-11-05.

Here is how those output token rates translate into exact dollar costs per static image and per second of animated GIF:

Output Type & Resolution Quality Tier Output Image Tokens gpt-image-2.6 Cost (as of 2026-11-05) gpt-image-2.6-mini Cost (as of 2026-11-05)
Static 1024x1024 Low 272 tokens $0.0109 $0.0027
Static 1024x1024 Medium 1,056 tokens $0.0422 $0.0106
Static 1024x1024 High 4,160 tokens $0.1664 $0.0416
Static 1536x1024 or 1024x1536 High 6,240 tokens $0.2496 $0.0624
Animated GIF 1024x1024 (per second) Low 420 tokens / sec $0.0168 / sec $0.0042 / sec
Animated GIF 1024x1024 (per second) Medium 1,680 tokens / sec $0.0672 / sec $0.0168 / sec
Animated GIF 1024x1024 (per second) High 3,360 tokens / sec $0.1344 / sec $0.0336 / sec
Animated GIF 1536x1024 (per second) High 5,040 tokens / sec $0.2016 / sec $0.0504 / sec

Why does a 1-second High quality GIF (3,360 tokens) cost fewer tokens per second than a single static High quality frame (4,160 tokens), while a 3-second High quality GIF totals 10,080 tokens? In GIF mode, the model allocates an anchor keyframe budget plus compressed motion delta tokens across the clip duration, which OpenAI flattens into a predictable per-second rate of 3,360 output tokens per second at 1024x1024 High quality.

To see how a complete multi-feature call adds up on your invoice, take a production workflow on gpt-image-2.6 where you pass an 80-token text prompt, attach 2 1024x1024 reference images (2 x 1,120 = 2,240 image input tokens), and generate a 3-second 1024x1024 animated GIF at High quality (3 x 3,360 = 10,080 image output tokens):

  • Text input cost: 80 tokens × ($5.00 / 1,000,000) = $0.0004 (as of 2026-11-05)
  • Reference images cost: 2,240 tokens × ($10.00 / 1,000,000) = $0.0224 (as of 2026-11-05)
  • 3-second GIF output cost: 10,080 tokens × ($40.00 / 1,000,000) = $0.4032 (as of 2026-11-05)
  • Total request cost: $0.4260 (as of 2026-11-05)

If you run that exact same 2-reference, 3-second GIF request at Medium quality (1,680 tokens/sec), the output charge drops to $0.2016 and your total request cost is $0.2244 (as of 2026-11-05). For interactive UI previews where users iterate on prompts before exporting a final asset, running drafts on gpt-image-2.6-mini at Medium quality brings the entire 3-second reference-locked GIF down to $0.0561 per generation with a sub-6-second turnaround.

GPT-Image-2.6 Sunburst and Flare

The OpenAI API changelog entry dated 2026-11-04 lists two more image models, gpt-image-2.6-sunburst and gpt-image-2.6-flare, on v1/images/generations and v1/images/edits. The entry confirms adjustable complexity, SVG generation, animated GIF generation, and markup-guided editing for supported GPT Image 2.5 and 2.6 models.

In OpenAI's image generation guide, the complexity field takes low, medium or high and defaults to high. Markup-guided editing sends a transparent PNG annotation layer as the markup parameter to /v1/images/edits; the layer must match the first input image's dimensions, and it can't be combined with mask.

Third-party positioning puts Flare at fast drafts and Sunburst at detailed work. OpenAI's own model pages use similar wording: the Sunburst model page says detailed compositions and image editing, and the Flare model page says fast iteration.

Per-model pricing is not confirmed on the changelog entry. The two model pages list the same rates for both models as of 2026-11-08: text input $5 per 1M tokens, image input $8 per 1M tokens, image output $30 per 1M tokens. Check the Sunburst and Flare pages above before you budget, since they are the source for these numbers.

SeedRouter, the gateway we run, currently lists gpt-image-2.5-sunburst and gpt-image-2.5-flare but not the 2.6 IDs. That listing is unofficial: SeedRouter is a third-party gateway, not an OpenAI channel, so calls to the 2.6 IDs through it will fail until they appear in its model catalog.

Sources and checks

  1. OpenAI Files API
  2. OpenAI's official pricing documentation
  3. OpenAI API changelog
  4. GPT-Image-2.6 Sunburst model page
  5. GPT-Image-2.6 Flare model page
  6. OpenAI image generation guide (GPT Image 2.6)