Skip to main content
POST
The Playground provides three named examples: raster PNG with complexity, SVG, and a two-frame GIF. Enter Bearer sk-xxx under Authorization, choose an example, edit the prompt, and send the request.
data[0].b64_json has no data: prefix, and SVG and GIF responses are also base64-encoded. The browser Playground may be unable to display a long base64 response even when the request succeeded. Use the Python example below to decode and save the result locally.

Model selection

GPT Image 2.6 was released on 2026-11-04. It retains /v1/images/generations and /v1/images/edits, and adds complexity control, SVG output, animated GIF output, and markup-guided editing. See the model pricing directory for current token rates. Actual cost depends on size, quality, output format, and token usage. SVG also incurs authoring-model charges, so its cost is not comparable to a standard PNG.

New capabilities

Complexity control

Controls planning before rendering, independently of the quality setting.

SVG vector output

Returns editable paths, shapes, and colors for icons, illustrations, and UI assets.

Animated GIF output

Produces a complete GIF in one request with frame count and frame duration controls.

Markup-guided edits

Uses a transparent annotation layer to identify the edit region while the prompt describes the change.

complexity: control planning

complexity controls how much the model plans before rendering. It is intended for dense text, complex layouts, and relationships between objects. quality controls rendering quality instead; the two settings serve different purposes. Complexity has no separate fee. Higher levels can increase latency and introduce unwanted changes. Compare results for your task instead of assuming that a higher level is always better.
The upstream error response in our test also listed none, xhigh, and max, and the current route accepted them. OpenAI’s public guide documents low / medium / high; production requests should use those official levels rather than relying on additional values as a long-term compatibility guarantee.

SVG: generate editable vector files

Set output_format: "svg". The current upstream also requires the nested svg.model field to select the text model that authors the vector code:
Vector rocket icon with red fins, a blue window, and a white body

A real SVG generated through APIYI's passthrough route: editable path and circle elements

Cost and limitations

  • The image model creates a reference image, then a text model authors the SVG. usage covers the reference image and svg_usage covers the authoring model; both contribute to cost.
  • svg_usage.reasoning_tokens is already included in svg_usage.output_tokens. Do not add it again.
  • SVG is available only through /v1/images/generations with n=1. The edit endpoint does not support SVG output or SVG as a raster input.
  • Streaming, partial images, output_compression, and prompt_rewriter are unsupported.
  • The result is static vector XML without scripts, external resources, or embedded raster images. Decode and save it as .svg, not as a PNG.

GIF: generate looping animations

Set output_format: "gif" and describe the subject, motion, and loop in the prompt. This low-cost example should produce 2 frames at 100ms each, for a total duration of 0.2 seconds:
Two-frame looping animation of a yellow circle moving right and returning to its starting position

A real GIF generated through APIYI's passthrough route: 2 frames and 0.2 seconds

GIF is generation-only and does not support streaming, partial images, custom output_compression, or prompt_rewriter. Do not use frame_count or frame_duration_ms with PNG, JPEG, WebP, or SVG.

Verify the actual frame count

Do not rely only on HTTP 200 or the response’s output_format. If a route drops the frame fields, it can still return a default 9-frame, 1.8-second GIF. Inspect the actual file with ffprobe:
For this example, expect nb_read_frames=2 and duration=0.200000.

Markup-guided edits

GPT Image 2.6 also supports markup-guided edits through the markup field on /v1/images/edits:
  1. Keep the original image as the first input.
  2. Create a transparent PNG at the same dimensions and add circles, arrows, or sketches around the region to change.
  3. Upload that annotation layer as markup, then describe the change and the details to preserve in prompt.
  4. Markup applies to the first input image and cannot be combined with mask or prompt_rewriter.
For ordinary editing, multi-image fusion, and masks, see the Image Edit API. Markup forwarding must be verified separately on the target route; this page does not present it as a tested interactive example.

Client-side decoding

All output formats use data[0].b64_json; only the file extension changes:
SVG decodes to UTF-8 XML, while GIF and raster formats decode to binary files. Production code should also check the HTTP status, error field, and actual file signature rather than trusting the extension alone.

Route compatibility and troubleshooting

New 2.6 fields require native JSON passthrough. Compatibility can vary across upstream routes, and these public examples do not guarantee identical behavior in every group. Verify them in the group your account actually uses.

Authorizations

Authorization
string
header
required

API Key obtained from the APIYI Console

Body

application/json
model
enum<string>
default:gpt-image-2.6-sunburst
required

Flare is optimized for fast iteration; Sunburst is intended for detailed visual work

Available options:
gpt-image-2.6-flare,
gpt-image-2.6-sunburst
prompt
string
required

Prompt text in English or Chinese. For GIF, describe the subject, motion, and loop

Maximum string length: 32000
Example:

"A minimal flat vector icon of a rocket, three solid colors, no text"

complexity
enum<string>
default:high

Planning complexity before rendering, independent of quality. Official levels are low / medium / high, with high as the default when omitted. No separate fee

Available options:
low,
medium,
high
size
string
default:auto

Output size as a preset or a valid WIDTHxHEIGHT string. The GIF example uses 512x512; frame count, frame size, and the total pixel budget must all fit

Example:

"1024x1024"

quality
enum<string>
default:auto

Rendering quality, independent of complexity. For SVG, controls the reference image quality

Available options:
auto,
low,
medium,
high,
xhigh,
max
output_format
enum<string>
default:png

Output format. SVG and GIF are generation-only and do not support edits, streaming, partial images, or output_compression

Available options:
png,
jpeg,
webp,
svg,
gif
output_compression
integer

Compression level for jpeg / webp only; do not use with SVG or GIF

Required range: 0 <= x <= 100
Example:

85

background
enum<string>
default:auto

Background mode. transparent requires a compatible output format; JPEG does not support transparency

Available options:
auto,
opaque,
transparent
moderation
enum<string>
default:auto

Moderation strength

Available options:
auto,
low
n
enum<integer>
default:1

Number of results. The examples and SVG output use 1

Available options:
1
svg
object

SVG-specific configuration. The current upstream requires svg.model when output_format=svg

frame_count
integer
default:9

GIF frame count. Official documented range: 2–64; default: 9. Only valid when output_format=gif

Required range: 2 <= x <= 64
Example:

2

frame_duration_ms
integer
default:200

Duration of each GIF frame in milliseconds, 20–2000, rounded to 10ms; default 200. Only valid when output_format=gif

Required range: 20 <= x <= 2000
Example:

100

Response

Generation succeeded; returns base64-encoded PNG, JPEG, WebP, SVG, or GIF

created
integer

Unix timestamp

background
string

Effective background mode

Example:

"opaque"

data
object[]

Generated results

output_format
string
Example:

"gif"

quality
string
Example:

"low"

size
string
Example:

"512x512"

usage
object

Token usage for the image model

svg_usage
object

Authoring-model usage returned for SVG output. reasoning_tokens is already included in output_tokens and must not be added again