GPT Image 2 / 2.5 / 2.6 Image Generation API

GPT Image 2.6 API Model Selection and Quickstart

1. Get an API Key

Open the Ace Data Cloud application list, enter an available application, and copy the API Key.

Get an Ace Data Cloud API Key

2. Send Your First Request

curl https://api.acedata.cloud/openai/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "Minimal editorial product illustration: one plain white ceramic coffee mug centered on a solid cobalt blue tabletop, pale cream background, soft shadow, clean geometric shapes, no text, no logo, portrait composition",
    "size": "1024x1536"
  }'

The image in a successful response is located at data[].url. Below is a 1024×1536 result obtained from an actual request through Ace Data Cloud on September 8, 2026 (task d56455e2-e7f7-4bcd-b935-475b0a1e0948, trace eb938601-8192-407f-b539-1e0554b697ec):

White mug generated by GPT Image 2

3. Common Parameters

Field Description
model gpt-image-2 (recommended default), gpt-image-2.5-flare (faster), or gpt-image-2.5-sunburst (higher fidelity and control); corresponding :official variants are available for all three, and gpt-image-2 also supports :reverse
prompt Image description, up to 32,000 characters
size auto or WIDTHxHEIGHT; width and height must be multiples of 16, the longer side must not exceed 3840, total pixels must be 655,360–8,294,400, and the aspect ratio must not exceed 3:1
n 1–10; only 1 is supported when response_format=b64_json
quality GPT Image models support auto, low, medium, and high; 2.5 / 2.6 Flare / Sunburst (including :official) additionally support xhigh and max. Official channels are billed based on actual Token usage
response_format url or b64_json
callback_url Optional; sends the result to this address when a long-running task completes

Common sizes:

Ratio 1K 2K 4K
1:1 1024x1024 2048x2048 2880x2880
4:3 1536x1024 2048x1536 3264x2448
3:4 1024x1536 1536x2048 2448x3264
16:9 1792x1024 2048x1152 3840x2160
9:16 1024x1792 1152x2048 2160x3840

size: "auto" selects the image dimensions based on the aspect ratio, pixels, and layout intent in the prompt; enter the dimensions directly when exact pixels are needed.

Models and Billing Methods

Model Use Cases and Billing Methods
gpt-image-2 Default reverse channel, billed at a fixed rate per successfully generated image
gpt-image-2:reverse Explicitly selects the reverse channel, billed at a fixed rate per successfully generated image
gpt-image-2:official Official API channel, with greater stability, billed based on actual Token usage
gpt-image-2.5-flare Focuses on generation speed, billed at a fixed rate per successfully generated image
gpt-image-2.6-flare Focuses on generation speed, billed at a fixed rate per successfully generated image
gpt-image-2.5-flare:reverse Explicit reverse alias, equivalent to gpt-image-2.5-flare, billed at a fixed rate per successfully generated image
gpt-image-2.6-flare:reverse Explicit reverse alias, equivalent to gpt-image-2.6-flare, billed at a fixed rate per successfully generated image
gpt-image-2.5-flare:official Official API channel, with greater stability and a focus on generation speed, billed based on actual Token usage
gpt-image-2.6-flare:official Official API channel, with greater stability and a focus on generation speed, billed based on actual Token usage
gpt-image-2.5-sunburst Focuses on high fidelity and fine control, billed at a fixed rate per successfully generated image
gpt-image-2.6-sunburst Focuses on high fidelity and fine control, billed at a fixed rate per successfully generated image
gpt-image-2.5-sunburst:reverse Explicit reverse alias, equivalent to gpt-image-2.5-sunburst, billed at a fixed rate per successfully generated image
gpt-image-2.6-sunburst:reverse Explicit reverse alias, equivalent to gpt-image-2.6-sunburst, billed at a fixed rate per successfully generated image
gpt-image-2.5-sunburst:official Official API channel, with greater stability and a focus on high fidelity and fine control, billed based on actual Token usage
gpt-image-2.6-sunburst:official Official API channel, with greater stability and a focus on high fidelity and fine control, billed based on actual Token usage

The prices shown on the page for the official API channel are estimates made before the request; the final charge is based on actual Token usage in the response and usage records.

4. Generate Multiple Images

curl https://api.acedata.cloud/openai/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A small fox reading under a glowing mushroom, watercolor illustration",
    "size": "1536x1024",
    "n": 2
  }'

gpt-image-2, gpt-image-2.5-flare, gpt-image-2.5-sunburst, and their :reverse aliases are billed per successfully generated image; gpt-image-2:official, gpt-image-2.5-flare:official, and gpt-image-2.5-sunburst:official are billed based on the actual text input and image output Tokens in the response. The prices shown on the page are estimates made before the request; the final charge is based on usage records.

5. Asynchronous Callback

After callback_url is added to the request body, the API first returns {"task_id": "..."} and POSTs the final result to that URL upon completion; synchronous requests still return created and data:

{
  "model": "gpt-image-2",
  "prompt": "A product poster with clear typography",
  "size": "1024x1024",
  "callback_url": "https://example.com/webhooks/images"
}

The callback receiver should use task_id for deduplication and verify the request origin and data format.

6. Troubleshooting

Status Check
400 model, prompt, size format, and the combination of n and response_format
401 Whether the API Key is complete and the header is Authorization: Bearer ...
429 Requests are too frequent; retry later
504 Synchronous generation timed out; use callback_url instead

Error responses include error.code, error.message, and trace_id. Provide the trace_id when reporting an issue; do not provide the API Key.

Refer to the OpenAI Images Generations API page for the complete fields and current enumerated values. For image editing, see GPT Image 2 / 2.5 / 2.6 Image Editing.

GPT Image 2.6

GPT Image 2.6 uses the same generation, editing, asynchronous task, and billing APIs as 2.5:

Model Billing
gpt-image-2.6-flare / gpt-image-2.6-flare:reverse 0.22 Credits/image
gpt-image-2.6-sunburst / gpt-image-2.6-sunburst:reverse 0.22 Credits/image
gpt-image-2.6-flare:official Same as 2.5 official, billed by actual Token usage
gpt-image-2.6-sunburst:official Same as 2.5 official, billed by actual Token usage

Quality options are auto, low, medium, high, xhigh, and max; size uses auto or WIDTHxHEIGHT that meets the above constraints. This API supports png, jpeg, and webp; GPT Image 2.6 also supports native animated gif, but does not currently support SVG. Editing supports JSON image URLs and multipart file uploads. :reverse is an explicit alias for the standard version of the same name. Use the full model name; do not pass gpt-image-2.6.

GPT Image 2.6 Animated GIFs

The standard, :reverse, and :official versions of GPT Image 2.6 Flare and Sunburst can all use output_format: "gif". Animation frames, loop information, and playback duration are preserved; frame_count specifies the number of frames, frame_duration_ms specifies the duration of each frame in milliseconds, the frame count must be an integer from 2–16, the duration of each frame must be an integer from 20–655350 milliseconds, and these parameters are only used for GIFs; encoding rounds to the nearest 10ms. When unspecified, the default is 9 frames at 200 milliseconds per frame; when the GIF size is omitted or set to auto, the 512x512 preset is used.

It is recommended to start with size: "512x512", frame_count: 9, and frame_duration_ms: 200. GIFs have separate size and frame count limits, so the static 4K specifications cannot be applied directly; some models adjust the actual output size. n specifies the number of GIF files returned, not the number of animation frames. The standard and :reverse versions are still billed by the number of successful files, while the official versions are billed by actual Token usage.

{
  "model": "gpt-image-2.6-flare",
  "prompt": "A small red ball moves left and right on a white background, seamless looping animation, no text.",
  "output_format": "gif",
  "size": "512x512",
  "quality": "medium",
  "frame_count": 9,
  "frame_duration_ms": 200,
  "n": 1,
  "async": true
}

GPT Image 2.6 4K Static Images

Flare, Sunburst, and their :reverse and :official variants can all use the 4K pixel presets described above, such as 3840x2160 and 2160x3840. Both generation and editing accept specific pixel dimensions through size; 4K is not a valid size value, and 4096x4096 also exceeds the current pixel limit. The above 4K specifications apply to static PNG/JPEG/WebP images; for GIFs, use their dedicated parameters.

GPT Image 2.6 Composition Complexity

complexity options are low, medium, and high; when omitted, the model default of high is used. It controls planning complexity independently of quality rendering quality; there is no additional per-request charge, and official versions are still billed by actual Token usage. Other models do not support this parameter.

GIFs do not support masks, annotated images, custom compression, prompt rewriting, or partial image streaming; incompatible combinations are rejected before generation. Size, frame count, and quantity are jointly subject to the model's pixel budget; 1024x1024 with 2 frames has been verified to work for standard Flare, but this conclusion cannot be extended to all 1K combinations or 4K GIFs.