Skip to main content
All image APIs are synchronous: there is no task ID, so if the client disconnects the result is lost while the request is still billed. Set a generous timeout (600 seconds recommended). See Image API Best Practices.

Overview

gpt-image-2.6-all is APIYI’s GPT image generation model on the ChatGPT web reverse route, built on Images 2.6. Unlike the older -all route, which only accepted a size hint inside the prompt, this route actually honors size, n, background and output_format, and can return GIF, SVG and multi-image edits — a better fit for production code that needs to pin dimensions, formats and image counts. The two things this route does best: GIF and native ChatGPT quality at 1536 and below (with fingerprint). SVG does come back as a true vector, but quality is unstable on the current reverse implementation — not trustworthy, not recommended for production; see SVG below. 2K/4K is a super-resolution tier for large-canvas compatibility — bigger, not necessarily more detailed; for quality, stay around 1.5K. It uses the standard OpenAI Images API endpoints: POST /v1/images/generations for text-to-image and POST /v1/images/edits for editing.
  • Price: $0.025 per image, billed per call; 2K/4K costs the same
  • Speed: about 10–46 s (1K 10–22 s, 2K 12–24 s, 4K 15–42 s; tail latency can reach 3 minutes)
  • Quality: long edge 512–1536 is native — the most controllable ChatGPT web quality and fingerprint; 2K/4K is super-resolution, which solves large-canvas size, not necessarily more detail than 1.5K
  • Formats: PNG / JPEG / GIF / SVG, transparent background and 24-hour URLs; GIF is native to this route and not available on 2.5-all — SVG can be returned too, but quality is unstable on the current route (see below)
  • Chinese: native Chinese prompts; strong text rendering for posters, signage and infographics
Model pricing follows the official price list and may change. The price here is for reference only; the Model Pricing tab in the top navigation is authoritative: Model Pricing.

GIF loops

Native output_format=gif; frame count and duration are exact, dimensions are upstream-decided.

SVG vectors

output_format=svg returns a true vector and viewBox follows size, but quality is unstable on this reverse route — not recommended for production.

Native ChatGPT quality

Up to 1536 keeps the ChatGPT web look and fingerprint — the most controllable quality tier.

2K/4K large-canvas compatibility

Super-resolution with exact common sizes; bigger does not mean more detailed.
How to read 2K/4K: use it for posters, print and large screens that need a bigger canvas. It is not a sharper 1.5K and is not promised to carry more detail. For stable quality, stay at or below 1536 (around 1.5K).

Quickstart

Text to image (curl)

The default is b64_json (raw base64, no data: prefix). Pass "response_format": "url" for a signed link that expires in about 24 hours; download and re-host it promptly.

Image editing (Python, multipart)

Capabilities

Sizes

Native range (≤1536, ChatGPT web native)

  • No 16/64 alignment required. 1537, 1600x900 and 1920x1080 are rejected on the native route.
  • size=auto is decided upstream. We have seen 1312x1199, 1402x1122 and 1448x1086; no fixed value is promised.
  • On the native route, the response size equals the actual output size.

Super-resolution range (2K / 4K, large-canvas compatibility)

2K/4K uses super-resolution to enlarge the long edge to 2048/4096 for larger canvases. Bigger does not mean more detailed — it is not native pixels, and it is not promised to be sharper than the 1536 native tier. Measured results:
2K/4K b64 responses echo size; url responses may omit it. A size mismatch returns 502 size_not_deliverable instead of silently changing dimensions. Use the response size and the actual image dimensions.

Choosing a size

  • Best ChatGPT-native feel / stable quality: keep size at or below 1536; around 1.5K is ideal. This is the most controllable tier, with the ChatGPT fingerprint.
  • 2K large-canvas compatibility: use 2048x2048, 2048x1152, 2048x1536; common sizes are exact, but do not expect more detail than 1.5K.
  • 4K landscape: use 3840x2160; usually exact, 502 on mismatch — retry or use a supported size.
  • Large squares: request 2880x2880 directly; 4096x4096 / 3840x3840 / 3200x3200 return 502.
  • 4K transparency: may return 200 exact or 502; keep transparency at or below 2K.
  • 4:1 banners: not supported; 4096x1024 returns 400.

Formats

  • Transparent background: background=transparent + PNG. At 2K the result is RGBA with about 40% fully transparent pixels. 4K transparent output does not follow size; no dimensions are promised.
  • URL: response_format=url works in the Default group; no Image2_OSS group is needed. The link is a 24-hour signed URL.
  • No WebP: the error is output_format 'webp' is not supported; use png, jpeg, gif or svg.

GIF

  • output_format=gif is mandatory. If you only ask for a loop in the prompt and omit the format, the compatibility layer expects PNG and the request fails with 502 image 1 is gif, png was asked for.
  • frame_count / frame_duration_ms are honored exactly: 8 frames / 150 ms, 4 frames / 300 ms and 6 frames / 120 ms all matched the request.
  • size does not determine the output size: 1K results have included 384x512, 507x506 and 619x623; 2K returned 327x585; 4K returned 621x621. Only frame count and duration are promised.
  • To get a fixed GIF size, resize or crop on the client after generation.

SVG

On the current reverse-engineered route, SVG output is not trustworthy and is not recommended for production. SVG comes straight from the image model without a writer model (svg.model is accepted but ignored), and measured quality falls short. For production SVG, use official-relay gpt-image-2.6-sunburst / gpt-image-2.6-flare with the write-code path — see the test notes.
  • True vector: the response is <svg> text, not a bitmap. 2048², 3840x2160, 4096², 6144² and 8192² all passed.
  • viewBox follows size: 2048x2048 gives viewBox="0 0 2048 2048"; 3840x2160 gives viewBox="0 0 3840 2160".
  • No svg object needed: output_format=svg is enough. Official routes or some SDKs add "svg": {"model": "..."}; 2.6-all accepts but ignores that field — it does not fail and does not change the result, so do not depend on it.
  • The output contains no <script> or embedded raster image.

Sample Results

These three images were generated with gpt-image-2.6-all and show its PNG, GIF, and SVG output formats. The simple shapes are format demonstrations only; they are not a guarantee of results for more complex artwork, animation, or vector design. PNG · Static image (1536 × 1024): a red square shape on a white canvas.
GPT-Image-2.6-All PNG sample: a red square shape on a white canvas
GIF · Animated image (887 × 887): a red ball on a white background; the file contains 2 frames at about 100 ms per frame.
GPT-Image-2.6-All GIF sample: an animated red ball on a white background
SVG · Vector image (viewBox 1024 × 1024): a red circle on a white canvas, drawn with SVG vector elements.
GPT-Image-2.6-All SVG sample: a red circle on a white canvas, rendered as vector elements

Image editing

  • Endpoint: POST /v1/images/edits, multipart/form-data.
  • Single image / mask / multiple references are accepted. A mask is treated as a reference; edits are not guaranteed to stay inside the mask, so describe what to change and what to keep.
  • An explicit size is exact, including 2K/4K (2048x2048 and 3840x2160 both verified).
  • Without size or with auto, the output is normalized to about 1.57 MP while preserving the input aspect ratio; the original pixel size is not guaranteed.
  • Two reference images work in practice. For more, compose them on the client or edit in steps.

n and responses

  • n supports 1–4 and is billed per image. At 2K, n=2 returned two 2048x2048 images, n=3 three (8160 output tokens) and n=4 four (10880); n=5+ returns 400 n must be an integer between 1 and 4. At $0.025 per image, n=3 is $0.075 and n=4 is $0.10; the final charge is whatever the bill shows.
  • The default is b64_json; response_format=url returns only url, never both.
  • Common response fields: created, data[], usage. b64 responses echo size; url responses may omit it — read the actual dimensions.
  • URLs are signed for 24 hours; regenerate after expiry.

Timeouts and concurrency

  • Set the client timeout to 600 seconds: 1K takes about 10–22 s, 2K 12–24 s, 4K 15–42 s, and tail latency can reach 3 minutes (1000x1000 measured 198 s). Loosen reverse proxies, serverless limits and queue consumers as well.
  • Concurrency: at 1K, 12×2, 16×1 and 8×1536 all passed without 429s. 2K/4K has not been load-tested; start with 4–8 concurrent requests and watch tail latency.
  • Billing is synchronous: the request is billed when sent; a client disconnect is not refunded and the result is not retained.

Limits

  • 2K/4K is super-resolution, for large-canvas compatibility. It is not native pixels and is not promised to carry more detail than the 1536 native tier; for stable quality, stay at or below 1536.
  • 2K/4K depends on a fallback route. Requests first hit the native route and are switched to the super-resolution route when the size is out of range. If the fallback is unavailable, the API may return 400 wide_fallback_required; retry or stay at or below 1536.
  • GIF size is not guaranteed. 1K, 2K and 4K can all return small images; only frame count and duration are promised.
  • WebP is not supported. Only PNG / JPEG / GIF / SVG.
  • 4:1 is not supported. 4096x1024 returns 400; the maximum aspect ratio is 3:1.
  • 4K transparency is unstable. It may return 200 exact or 502 when upstream returns a 4096 long edge; keep transparency at or below 2K.
  • quality only accepts auto / medium / high. low / hd return 400; medium / high return 2048x2048; no same-seed quality difference has been verified.
  • Editing with auto rescales. The output is about 1.57 MP, not the input size.
  • Content policy: upstream moderation returns 400 content_policy_violation; revise the prompt and retry.

Errors

Let an AI agent wire it up

Copy this prompt into Codex / Claude Code / Cursor

It first fetches the plain-text version of this page (append .md to any docs URL) and then writes code for your stack. The timeout, 2K/4K verification, GIF format and WebP limits are baked in.

9 requirements in total — use the button below to copy the full prompt.

FAQ

Is 2K/4K native resolution?

No. 2K/4K uses super-resolution to solve size / large-canvas compatibility, not native detail. Native quality is at 1536 and below, with the ChatGPT fingerprint. For stable quality, stay around 1.5K; use 2048–3840 for posters and print.

Why is size sometimes missing?

b64 responses echo size; url responses may omit it. A size mismatch returns 502 size_not_deliverable. Use the response size and the actual image dimensions (for example, the PNG IHDR) instead of the requested value.

Can it produce a 4K transparent image?

It may be exact, or it may return 502. At 2K, transparent output is stable (RGBA, about 40% fully transparent pixels). At 4K we have seen exact 3840x2160 as well as 502 when upstream returned a 4096 long edge. Do not assume it always works; keep transparent output at or below 2K.

Can I set the GIF dimensions?

No. size does not affect GIF output: 1K has produced 384x512, 507x506 and 619x623; 2K returned 327x585; 4K returned 621x621. Only frame count and duration are promised. Resize or crop on the client if you need fixed pixels.

Can I use SVG from this reverse route in production?

No. On the current reverse implementation SVG comes straight from the image model with no writer model, and measured quality is unstable. For vector output, use the official-relay 2.6 svg.model path. See the test notes.

Is WebP supported?

No. Only PNG / JPEG / GIF / SVG; output_format=webp returns 400.

Does quality matter?

Only auto / medium / high are accepted; low / hd return 400. medium / high return 2048x2048; no same-seed visual difference has been verified.

Why does 4096x4096 fail?

The upstream square cap is 2880; 4096x4096, 3840x3840 and 3200x3200 return 502 size_not_deliverable (upstream delivers 2880x2880). Request 2880x2880 directly if you need a large square.

What is the maximum n?

1–4. n=5 and above return 400 n must be an integer between 1 and 4; n=0 returns 400 n must be greater than 0. Billing is per image, so n=4 is four images.

Why does 4096x1024 fail?

The maximum aspect ratio is 3:1; 4096x1024 is 4:1 and is rejected during parameter validation. Use a ratio within 3:1 (for example, up to 4096x1536) or stitch two images.