# GPT Image 2.6 on TokLab

> GPT Image 2.6 API reference on TokLab. Flare and Sunburst on one async endpoint, with GIF and SVG output, complexity and markup edits.

Model ID: `gpt-image-2.6-sunburst-official`, `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare-official`, `gpt-image-2.6-flare`. [Playground and pricing](https://toklab.ai/models/gpt-image-2-6).
Use an API key from https://toklab.ai/apikeys as Authorization: Bearer $TOKLAB_API_KEY. Store the key on your server.

## Current pricing and worked estimates

Rates use the same source and one-minute refresh interval as the model page. All amounts are in USD.

GPT Image 2.6 prices are listed separately for each model ID. Per-image prices follow the selected quality; token-billed prices follow reported usage.

| Channel | Model IDs | Billed by | Current rate (USD) |
| --- | --- | --- | --- |
| Standard | `gpt-image-2.6-flare` | Per delivered image at the selected model and quality rate | $0.021 per delivered image |
| Standard | `gpt-image-2.6-sunburst` | Per delivered image at the selected model and quality rate | $0.021 per delivered image |
| Official | `gpt-image-2.6-flare-official` | Tokens each render reports (text input + image output) | $3.75 per 1M input tokens; $22.5 per 1M output tokens |
| Official | `gpt-image-2.6-sunburst-official` | Tokens each render reports (text input + image output) | $3.75 per 1M input tokens; $22.5 per 1M output tokens |

Token rates are the published first-tier rates; usage in a different tier may be charged differently.

### Cost of one 1024x1024 image by quality

Token counts are measured samples on the Official channel, with 18 input tokens for the prompt. Actual usage varies with the prompt, dimensions, references, and image count, so token-billed figures are estimates, not fixed prices. Per-image rates below follow each model's current quality pricing.

| Quality | Sample output tokens | Standard · GPT Image 2.6 Flare USD | Standard · GPT Image 2.6 Sunburst USD | Official · GPT Image 2.6 Flare USD | Official · GPT Image 2.6 Sunburst USD |
| --- | --- | --- | --- | --- | --- |
| low | 823 | $0.021 | $0.021 | $0.018585 | $0.018585 |
| medium | 1449 | $0.021 | $0.021 | $0.03267 | $0.03267 |
| high | 1756 | $0.021 | $0.021 | $0.0395775 | $0.0395775 |
| xhigh | 3122 | $0.021 | $0.021 | $0.0703125 | $0.0703125 |
| max | 7024 | $0.021 | $0.021 | $0.1581075 | $0.1581075 |
| auto | 903 | $0.021 | $0.021 | $0.020385 | $0.020385 |

Formula (Official): (input tokens × 3.75 + output tokens × 22.5) / 1,000,000 USD.
A request for n images is billed for the images delivered. Final charges are available in account usage history. Failed requests are not charged.

## API reference

GPT Image 2.6 comes as two models, Flare and Sunburst, and both take the same request body. On top of GPT Image 2.5's fields it adds `complexity`, `markup`, animated GIF output and SVG output. A request returns a task ID straight away; the files arrive on that task when rendering finishes. Generation, reference edits, masked edits and markup edits all go to one endpoint.

## Model IDs

| Model ID                          | Model                                           | Billing                 |
| --------------------------------- | ----------------------------------------------- | ----------------------- |
| `gpt-image-2.6-flare`             | Flare, built for fast iteration                 | Fixed price per image   |
| `gpt-image-2.6-sunburst`          | Sunburst, more detail and steadier across edits | Fixed price per image   |
| `gpt-image-2.6-flare-official`    | Flare                                           | Input and output tokens |
| `gpt-image-2.6-sunburst-official` | Sunburst                                        | Input and output tokens |

The request body is the same for all four. Current rates for each one are on the [GPT Image 2.6 page](https://toklab.ai/models/gpt-image-2-6#pricing).

## Quick example

```bash
curl https://api.toklab.ai/v1/images/generations \
  -H "Authorization: Bearer $TOKLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.6-flare",
    "prompt": "A ceramic espresso cup on a terrazzo counter, hard noon shadow",
    "size": "1024x1024",
    "quality": "low"
  }'
```

```python
import os
import requests

response = requests.post(
    "https://api.toklab.ai/v1/images/generations",
    headers={"Authorization": f"Bearer {os.environ['TOKLAB_API_KEY']}"},
    json={
        "model": "gpt-image-2.6-flare",
        "prompt": "A ceramic espresso cup on a terrazzo counter, hard noon shadow",
        "size": "1024x1024",
        "quality": "low",
    },
    timeout=60,
)
response.raise_for_status()
task_id = response.json()["id"]
```

```javascript
const response = await fetch('https://api.toklab.ai/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TOKLAB_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'gpt-image-2.6-flare',
    prompt: 'A ceramic espresso cup on a terrazzo counter, hard noon shadow',
    size: '1024x1024',
    quality: 'low',
  }),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const { id: taskId } = await response.json();
```

```go
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "os"
    "strings"
    "time"
)

func main() {
    body := strings.NewReader(`{
      "model": "gpt-image-2.6-flare",
      "prompt": "A ceramic espresso cup on a terrazzo counter, hard noon shadow",
      "size": "1024x1024",
      "quality": "low"
    }`)
    req, err := http.NewRequest("POST", "https://api.toklab.ai/v1/images/generations", body)
    if err != nil { panic(err) }
    req.Header.Set("Authorization", "Bearer " + os.Getenv("TOKLAB_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    client := &http.Client{Timeout: 60 * time.Second}
    res, err := client.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()
    if res.StatusCode != http.StatusOK { panic(res.Status) }
    var task struct { ID string `json:"id"` }
    if err := json.NewDecoder(res.Body).Decode(&task); err != nil { panic(err) }
    fmt.Println(task.ID)
}
```

## Endpoint

```text
POST https://api.toklab.ai/v1/images/generations
```

| Header        | Value                 |
| ------------- | --------------------- |
| Authorization | `Bearer YOUR_API_KEY` |
| Content-Type  | `application/json`    |

The body decides the operation: a prompt alone generates, a prompt with `images` edits, and `mask` or `markup` points the edit at one area. The response is a task, never file bytes. Call the endpoint from your server so the key stays out of the browser.

## Parameters

| Name                 | Type      | Required | Default        | Notes                                                                                        |
| -------------------- | --------- | -------- | -------------- | -------------------------------------------------------------------------------------------- |
| `model`              | string    | Yes      | —              | One of the four IDs above.                                                                   |
| `prompt`             | string    | Yes      | —              | Must contain non-whitespace text; at most 32,000 characters.                                 |
| `images`             | object\[] | No       | —              | 1 to 16 entries, each `{"image_url":"https://..."}`. Sending this makes the request an edit. |
| `mask`               | object    | No       | —              | `{"image_url":"https://..."}`. Needs `images`; cannot be sent with `markup`.                 |
| `markup`             | object    | No       | —              | `{"image_url":"https://..."}`. Needs `images`; cannot be sent with `mask`.                   |
| `size`               | string    | No       | `auto`         | `auto` or `WIDTHxHEIGHT` within the size rules below.                                        |
| `quality`            | enum      | No       | `auto`         | `auto`, `low`, `medium`, `high`, `xhigh`, `max`.                                             |
| `complexity`         | enum      | No       | `high`         | `low`, `medium`, `high`. How much the model plans before it renders.                         |
| `background`         | enum      | No       | `auto`         | `auto`, `opaque`, `transparent`.                                                             |
| `output_format`      | enum      | No       | `png`          | `png`, `jpeg`, `gif`, `svg`.                                                                 |
| `output_compression` | integer   | No       | `100` for JPEG | 0 to 100, JPEG only.                                                                         |
| `frame_count`        | integer   | No       | `9`            | 2 to 16, GIF only.                                                                           |
| `frame_duration_ms`  | integer   | No       | `200`          | At least 20, GIF only.                                                                       |
| `svg`                | object    | No       | —              | SVG only. `{"model": "...", "reasoning": {"effort": "..."}}`; see SVG below.                 |
| `n`                  | integer   | No       | `1`            | 1 to 10. SVG requires 1.                                                                     |
| `moderation`         | enum      | No       | `auto`         | `auto` or `low`.                                                                             |
| `safety_identifier`  | string    | No       | —              | A stable ID for your end user, at most 128 characters. Keep personal data out of it.         |
| `user`               | string    | No       | —              | Older end-user identifier. Prefer `safety_identifier`.                                       |

`null` counts as not sent. Fields not in this table are dropped before the request reaches the model, so a misspelt field is ignored rather than rejected. That includes `stream`, `partial_images`, `response_format` and `input_fidelity`.

### Size rules

For PNG, JPEG and SVG, a custom size passes only if all four of these hold:

* Width and height are both multiples of 16.
* Neither side is longer than 3840 pixels.
* Width divided by height is between 1:3 and 3:1.
* Width times height is between 655,360 and 8,294,400 pixels.

`1024x1024`, `1536x1024` and `1024x1536` are the usual picks; `3840x2160` passes and `4096x2304` fails on the edge limit. With `auto` the model picks the dimensions.

GIF sizes only need both sides to be multiples of 16, so `512x512` works. Every frame, and every image when `n` is above 1, draws on one pixel budget that OpenAI does not publish. Long or large GIFs can fail; keep frames small or use `auto`.

### Quality and complexity

`quality` sets rendering detail and, on the `-official` IDs, the output token count. `complexity` sets how much the model plans first. `low` suits a background swap or a sign change; `high` helps with dense text, busy layouts and objects that interact. Complexity has no separate charge, but a higher setting can take longer and change things you did not ask to change, so compare settings on your own task.

### Transparent backgrounds

`background: "transparent"` works with PNG, GIF and SVG. It is rejected with `output_format: "jpeg"`, and `output_compression` is rejected unless the format is JPEG.

## Animated GIF

```json
{
  "model": "gpt-image-2.6-flare",
  "prompt": "A paper boat bobbing on small waves, seamless loop, flat colours",
  "output_format": "gif",
  "size": "512x512",
  "quality": "low",
  "frame_count": 6,
  "frame_duration_ms": 150
}
```

Describe the motion and say the loop should be seamless. Frame durations are rounded to the nearest 10 ms. A GIF can start from reference images but cannot use a mask or compression. OpenAI's guide says edits do not return GIFs, so a GIF request with `images` can fail; a failed task is not charged.

OpenAI's image guide gives 2–64 frames and 20–2,000 ms per frame, while its Images API reference gives 2–16 frames and no maximum duration. In tests on November 5, 2026 the API rejected 17 frames and accepted 3,000 ms frames, so TokLab follows the reference.

## SVG

```json
{
  "model": "gpt-image-2.6-sunburst",
  "prompt": "A flat geometric paper-boat logo, two colours, clean editable paths",
  "output_format": "svg",
  "n": 1
}
```

SVG is for generation only: send `n: 1` and no `images`, `mask`, `markup` or `output_compression`. The model first renders a reference image, and `quality` applies to that image; a second model then writes the SVG. The result is static XML with vector shapes, delivered byte for byte. An SVG that contains scripts, external resources or embedded raster images is not delivered: the task fails and is not charged.

To choose the model that writes the SVG, add `"svg": {"model": "MODEL_ID"}`. A `svg` object needs a non-empty `model`. You can also set `svg.reasoning.effort` to `none`, `minimal`, `low`, `medium`, `high`, `xhigh` or `max`; which values work depends on that model. Leave `svg` out to use the default writer.

## Reference images, mask and markup

```json
{
  "model": "gpt-image-2.6-sunburst",
  "prompt": "Replace the circled sign with a blank wooden board",
  "images": [{"image_url": "https://example.com/street.png"}],
  "markup": {"image_url": "https://example.com/circle-overlay.png"},
  "complexity": "low"
}
```

| Operation      | Send                           |
| -------------- | ------------------------------ |
| Text to image  | `prompt`                       |
| Reference edit | `prompt` + `images`            |
| Masked edit    | `prompt` + `images` + `mask`   |
| Markup edit    | `prompt` + `images` + `markup` |

Inputs are URLs only. Base64, `data:` and `blob:` URLs, multipart uploads and OpenAI Files IDs are refused. The Playground uploads the files you pick and sends their URLs for you.

* Reference images: public HTTP(S) URLs to PNG, JPEG or WebP, each under 50 MB. An SVG is not accepted as input.
* Mask: a PNG under 50 MB with the same pixel dimensions as the first reference image. Transparent pixels mark the area to change.
* Markup: a PNG under 50 MB, drawn over the first reference image, with the same dimensions and some transparent pixels. Both it and the first image may hold at most 16,777,216 pixels. Draw a circle, an arrow or a scribble, then say in the prompt what should change there.

Media is fetched while the task runs. A URL that cannot be read fails the task, and a failed task is not charged.

## Billing

The plain IDs charge a fixed amount for each delivered image. The `-official` IDs charge for the tokens the render uses, so quality, size, reference images, prompt length and `n` all move the total. An SVG also includes the tokens of the model that wrote it, reported as `svg_usage` and charged at that model's own TokLab rate. Rates are on the [model page](https://toklab.ai/models/gpt-image-2-6#pricing) and come from the same ledger that bills your account.

The Playground estimate covers still images only. GIF and SVG have no estimate; the actual charge for each task is in your usage history.

## Response

Submitting returns the task:

```json
{
  "id": "task_...",
  "model": "gpt-image-2.6-flare",
  "status": "processing",
  "created_at": 1793836800
}
```

### Poll the task

```bash
curl https://api.toklab.ai/v1/tasks/YOUR_TASK_ID \
  -H "Authorization: Bearer $TOKLAB_API_KEY"
```

Check every few seconds until `status` becomes `completed` or `failed`. A poll that times out does not mean the render failed; ask about the same task ID again. Submitting a second request to see where the first one is just creates a second paid task.

### Completed task

```json
{
  "id": "task_...",
  "model": "gpt-image-2.6-sunburst",
  "status": "completed",
  "created_at": 1793836800,
  "finished_at": 1793836841,
  "output": {
    "created": 1793836838,
    "data": [{"url": "https://.../task_example/0.svg"}],
    "output_format": "svg",
    "usage": {"input_tokens": 24, "output_tokens": 903, "total_tokens": 927},
    "svg_usage": {
      "model": "...",
      "input_tokens": 2310,
      "output_tokens": 1480,
      "reasoning_tokens": 0,
      "total_tokens": 3790
    }
  }
}
```

| Field                                                                        | Meaning                                                                                                                                            |
| ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                                                                         | The task ID to query.                                                                                                                              |
| `status`                                                                     | `processing`, `completed` or `failed`.                                                                                                             |
| `created_at`, `finished_at`                                                  | Unix seconds. `finished_at` is empty or zero until the task ends.                                                                                  |
| `output.data[].url`                                                          | Hosted file URLs. Download them to keep the original format and, for a GIF, every frame. Copy them to your own storage if you need them long term. |
| `output.size`, `output.quality`, `output.background`, `output.output_format` | What was rendered, when the model reports it.                                                                                                      |
| `output.usage`                                                               | Image token usage, when reported.                                                                                                                  |
| `output.svg_usage`                                                           | SVG only: the writing model and its tokens, separate from `usage`.                                                                                 |
| `output.safety_identifier`                                                   | The value you sent, if any.                                                                                                                        |
| `error`                                                                      | Present on failed tasks.                                                                                                                           |

Delivery is asynchronous, so this is not a drop-in for the synchronous OpenAI Images SDK.

## Errors

A request refused before a task exists gets an HTTP error status and an `error` object. A task that fails later still answers the poll with HTTP 200, `status: "failed"` and an `error` object. Every model shares one error format; codes, statuses and when to retry are in the [error catalog](https://toklab.ai/docs/api/errors). If the submit call itself times out, check your task history before retrying, since the first request may already have been accepted.

## Related

* [GPT Image 2.6 Playground and pricing](https://toklab.ai/models/gpt-image-2-6)
* [GPT Image 2.5 API reference](https://toklab.ai/docs/gpt-image-2-5)
* [Task lifecycle](https://toklab.ai/docs/api/tasks)
* [OpenAPI schema](https://toklab.ai/docs/gpt-image-2-6.openapi.json)
* [This page as Markdown](https://toklab.ai/docs/gpt-image-2-6.md)

## More resources

- [GPT Image 2.6 pricing: same token rate, very different cost per image](https://toklab.ai/blog/gpt-image-2-6-pricing.md): GPT Image 2.6 costs the same per token as 2.5, but a low-quality image uses 4.2 times the tokens. Cost per image at five sizes, checked against our own bills. (HTML: https://toklab.ai/blog/gpt-image-2-6-pricing)
- [Best AI image editor in 2026: 4 models, 5 everyday edits, measured](https://toklab.ai/blog/best-ai-image-editor.md): Four AI image editors got the same five prompt edits: a recolor, a price change, a new background, new light and new clothes. What each changed, and the cost. (HTML: https://toklab.ai/blog/best-ai-image-editor)
- [The best AI image generators in 2026: 8 models, the same 4 prompts](https://toklab.ai/blog/best-ai-image-generator.md): Eight AI image generators got the same four prompts: a portrait, a group, a chalkboard sign and a product shot. What each drew, its price, where it is free. (HTML: https://toklab.ai/blog/best-ai-image-generator)
- [The 7 best AI video generators in 2026, tested on one rainy street](https://toklab.ai/blog/best-ai-video-generator.md): Seven AI video models, one prompt: a street musician in the rain. What each clip got right and wrong, its sound, render time and real cost, model by model. (HTML: https://toklab.ai/blog/best-ai-video-generator)
- [Best image to video AI in 2026: one photo through 5 models](https://toklab.ai/blog/best-image-to-video-ai.md): Five image to video AI models animated the same photo with the same prompt. Which kept the face, which did the action, which changed the frame, and the cost. (HTML: https://toklab.ai/blog/best-image-to-video-ai)
- [Cheapest Seedance 2.5 API: every platform priced per second](https://toklab.ai/blog/cheapest-seedance-2-5-api.md): Seedance 2.5 API prices per second at 480p, 720p, 1080p and 4K on 10 platforms, with reference-video rates and clip costs, checked November 4, 2026. (HTML: https://toklab.ai/blog/cheapest-seedance-2-5-api)
- [fal.ai alternatives: the same models, priced side by side](https://toklab.ai/blog/fal-ai-alternatives.md): Six fal.ai alternatives compared on the models fal also sells, using each platform's published rates checked November 4, 2026, plus four real Seedance bills. (HTML: https://toklab.ai/blog/fal-ai-alternatives)
- [kie.ai alternatives: 4 platforms compared on price and models](https://toklab.ai/blog/kie-ai-alternatives.md): The best kie.ai alternatives for Seedance 2.0, Veo 3.1, Nano Banana Pro and Midjourney, compared on price and billing, with a Seedance 2.0 bill we measured. (HTML: https://toklab.ai/blog/kie-ai-alternatives)
- [The best Midjourney alternatives in 2026, tested on Midjourney-style prompts](https://toklab.ai/blog/midjourney-alternatives.md): Four Midjourney alternatives got three Midjourney-style prompts: an oil painting, a fantasy landscape and a fashion shot. Results, free plans, prices and APIs. (HTML: https://toklab.ai/blog/midjourney-alternatives)
- [Replicate alternatives: 5 platforms compared on cost and fit](https://toklab.ai/blog/replicate-alternatives.md): The best Replicate alternatives for hosted models, your own containers and GPUs: fal.ai, Runware, TokLab, Atlas Cloud and reapi.ai, with prices checked. (HTML: https://toklab.ai/blog/replicate-alternatives)
- [Runware alternatives: when to stay and when to switch](https://toklab.ai/blog/runware-alternatives.md): Runware alternatives for closed image and video models, compared with Runware on open models and GPUs. Prices checked November 4, 2026, with a real bill. (HTML: https://toklab.ai/blog/runware-alternatives)
- [Sora alternatives after the shutdown: 4 models tested on a Sora-style shot](https://toklab.ai/blog/sora-alternatives.md): Sora is shut down. The best Sora alternatives for dialogue, sound and realistic motion, tested on a Sora-style shot, with what each model said and cost. (HTML: https://toklab.ai/blog/sora-alternatives)
- [WaveSpeed AI alternatives: how its prices compare with the model maker's](https://toklab.ai/blog/wavespeed-alternatives.md): WaveSpeed AI alternatives compared on Seedance 2.5, GPT Image 2.5, Nano Banana Pro and Kling 4.0, against each model maker's own price and its account limits. (HTML: https://toklab.ai/blog/wavespeed-alternatives)
- [GPT Image 2.5 API pricing: what one image costs at each quality](https://toklab.ai/blog/gpt-image-2-5-api-pricing.md): OpenAI bills GPT Image 2.5 by token. We measured the tokens a 1024×1024 image uses at each quality and priced them on OpenAI and on both TokLab routes. (HTML: https://toklab.ai/blog/gpt-image-2-5-api-pricing)
- [GPT Image 2.5 Flare vs Sunburst: what 23 renders told us](https://toklab.ai/blog/gpt-image-2-5-flare-vs-sunburst.md): Flare and Sunburst used the same tokens at every quality level we could compare, so they cost the same. Here is where they differed in speed and output. (HTML: https://toklab.ai/blog/gpt-image-2-5-flare-vs-sunburst)
- [OpenAPI request and response schemas](https://toklab.ai/docs/gpt-image-2-6.openapi.json)
- [API reference as Markdown](https://toklab.ai/docs/gpt-image-2-6.md)
- [Task lifecycle](https://toklab.ai/docs/api/tasks.md)
- [Error catalog and retry guidance](https://toklab.ai/docs/api/errors.md)
- [Account usage](https://toklab.ai/usage)
- [All model guides](https://toklab.ai/llms.txt)
- [Documentation index](https://toklab.ai/docs/llms.txt)
