Skip to main content

Overview

GPT Image 2.6 Sunburst is an asynchronous API for text-to-image generation and reference-guided image editing. Each successful task returns one file.

Endpoints and authentication

Base URL:
Use Authorization: Bearer YOUR_API_KEY and Content-Type: application/json.

Quickstart

Generate a GIF:
For SVG, set output_format to svg. To edit a reference image using an annotated guide, submit this request body:

Parameters

string
default:"async"
Use async to poll for results or callback for webhook delivery.
string
Public HTTPS URL that receives the final task payload. Required when request_type is callback. See Webhooks.
object
required
GPT Image 2.6 Sunburst input parameters.

Poll for results

The create response returns data.taskId. Save it and use it to query the task:
When data.state is success, decode data.resultJson as JSON and read resultUrls:
Continue polling while state is processing or processing_r2. When state is failed, read failCode and failMsg when present. With request_type: "callback", use the supplied webhook URL to receive the terminal result. See Webhooks.

Billing

For PNG, JPEG, and WebP, use the base price for the requested mode, quality, and resolution. SVG adds $0.020 to the text-to-image base price. A GIF of 2–16 frames costs the same as a static image at the same quality and resolution. The image-to-image base price includes the first reference image. Each additional reference image costs $0.015, and a mask or markup adds $0.015 once. Complexity and frame duration do not affect the standard price. At medium and 1k, PNG and GIF text-to-image each cost $0.050, and SVG costs $0.070. An edit with three reference images and one markup costs $0.110. These are standard prices before discounts. See the full pricing table and credit conversion and rounding.

Latency and polling

Allow 3–5 seconds between status requests. For production workloads, use callback delivery.

MCP integration

The complete model schema declares the result format in mcp.result and attachment paths in mcp.attachments. Bind files to image_urls, mask_url, or markup_url and preserve the order of reference images. The API validates mode requirements and the choice of one edit guide.