Documentation

Your familiar SDK. A clear path from API key to first response.

Images

Choose a guide or find an API method. Copy examples to your project; this page does not execute requests.

Images

Generate, edit and vary images with your Quanteex project key.

Choose an image model

Use gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2.6-flare or gpt-image-2.6-sunburst with your project API key. The same IDs work on /v1/images/generations, /v1/images/edits and /v1/images/variations.

Price per completed image

USD per completed image, including edits and variations. The 2.6 table applies to both Flare and Sunburst. Without quality, 1K uses the base price and 2K/4K use the max price. GPT Image 2.5 remains $0.036 Standard or $0.024 with active TRUSTED and has no separate Reseller rate. The API reserves the price × n, charges for completed images, and releases unused funds. Token usage does not add a charge.

2.6 size / qualityStandardTRUSTEDReseller
1K · omitted / low$0.010$0.0075$0.005
1K · auto / medium$0.0125$0.0095$0.0065
1K · high$0.015$0.0115$0.0075
1K · max$0.020$0.015$0.010
2K · low$0.020$0.015$0.010
2K · max$0.040$0.030$0.020
4K · low$0.030$0.0225$0.015
4K · max$0.060$0.045$0.030

Reference and mask support

In authenticated GET /v1/models, check the reference limit for your chosen operation and size, along with max_n, json_edits and supported_parameters. A parameter listed for an endpoint may not apply to every size. An active Partner plan uses the Reseller column.

CapabilityGPT Image 2.5GPT Image 2.6
References per edit1Depends on size
JSON referenceYesYes; PNG/WebP verified
Multipart uploadYes2.5 and 2.6 4K only
PNG maskYes; matching dimensionsUnavailable
Completed-image SSEYesYes

Available sizes and quantities

GPT Image 2.6 generation supports only the sizes below. Use strings such as 2048x2048. The aliases 2k and 4k select 2048x1152 and 3840x2160 respectively. Omit size or use auto or 1k for automatic 1K framing; this does not guarantee square output. GPT Image 2.5 supports only auto/1k. Keep the public model ID unchanged.

SizeExact sizes (width × height)
1K1280x1280 (1:1), 1536x1024 (3:2), 1024x1536 (2:3)
2K2048x1152 (16:9), 2048x2048 (1:1), 1920x1280 (3:2), 1280x1920 (2:3), 2048x1536 (4:3), 1536x2048 (3:4)
4K3840x2160 (16:9), 2160x3840 (9:16), 2880x2880 (1:1), 3456x2304 (3:2), 2304x3456 (2:3)

Supported options

Pass model and prompt; prompt can be omitted for variations. size and n default to auto and 1. stream: true returns final-image SSE. For 2.6, response_format: b64_json is accepted on generation and 4K edits/variations; otherwise omit it. The table shows exactly which quality values can be sent. 'Omit' means leave the field out, not quality: default.

Modequalityn
Generation · 1K auto / 1kOmit quality; auto, low, medium, high, max1
Generation · 1K Exact sizes (width × height)Omit quality; low, max1
Generation · 2K / 4KOmit quality; low, max1
Edits and variations · 1K auto / 1kOmit quality1
Edits and variations · 3840x2160 / 4kOmit quality; max1

Output formats

PNG is the normal output. On 2.6 generation and 4K edits/variations you may set output_format: png. The only other qualified output combinations are below. They carry the same 1K low price for each completed image. Do not send URL responses, GIF, SVG, xhigh, complexity, markup, moderation, input_fidelity, safety_identifier, user or partial_images. Omit unlisted background and compression values.

ModelRequired parameters
2.6 Flare · WebPsize: auto / 1k; n: 1; quality: low; output_format: webp; background: transparent; output_compression: 80
2.6 Sunburst · JPEGsize: auto / 1k; n: 2; quality: low; output_format: jpeg; output_compression: 80

Generate from a prompt

Send JSON to images/generations. A normal response contains the completed image in data[0].b64_json. Decode the base64 bytes to save the image. The reference includes cURL, Python and JavaScript examples.

Generation examples

Edit an existing image

GPT Image 2.5 accepts one reference per edit or variation. For GPT Image 2.6, check authenticated GET /v1/models for the limit at your chosen size. In JSON, send an images array of {image_url: "data:image/png;base64,..."} objects (PNG/WebP verified). Multipart image or image[] is available on 2.5 and on 2.6 at 3840x2160/4k. Use n: 1. An optional PNG mask is only available on 2.5; match the reference dimensions. File IDs are unavailable.

Edits, input formats and masks

Create a variation

Images in Playground

Generate from text with no attachment, or attach reference images for an edit. In image mode, new references keep their original bytes and dimensions without resizing or compression. Use Edit on a generated result to attach it as a reference for the next request; earlier images are not included automatically. Playground checks the reference limit when you attach files and before you send. Image settings follow the selected model; PNG mask controls appear only for a supported 2.5 edit. Text output/context settings and web search are hidden in image mode.

Stream the result

Use stream: true and read SSE through image_generation.completed or image_edit.completed. The final event carries b64_json directly. Edits and variations currently deliver a final image event without progressive previews. partial_images is unavailable on the current profile.

Streaming example

Upload limits and errors

The direct API allows 50,000,000 bytes per file and 100,000,000 bytes per request, including encoding and multipart overhead. Playground allows 8 MiB per file, 40 million pixels and 24,000,000 bytes per request. A 400 can mean an unsupported combination. After a timeout, check the request status before retrying.

Search documentation