GPT Image 2.6 Discount Group API
Generate and edit images, create GIFs and SVGs, and retrieve asynchronous results.
Use a Discount Group API key with gpt-image-2.6. Set version to flare (default) or sunburst. Open the playground. The playground includes examples for a capybara comic, boxed collectible, looping cat GIF, and coffee sticker. Fill and edit an example freely. Generate submits the billable task.
Integrate with a coding assistant
Read https://app.apipool.dev/docs/discount/gpt-image-2-6.
Integrate this API into my project for image generation, editing, asynchronous task queries, and downloads.
Use the existing stack and read the API key from an environment variable. Explain where to set it and how to use the integration.Switch from the Official Group
Submission, query, and download endpoints are shared. Use a Discount Group key and model=gpt-image-2.6 with a version. Use resolution=1k and n=1. For GIF, omit frame fields and use size=auto or omit it. The Official Group models offer 1K–4K, multiple static outputs, and configurable GIF frames, with token billing. Official SVG requires svg.model=gpt-5.4-mini and adds text-token charges.
Choose a model or version
Flare suits quick drafts. Sunburst suits detailed compositions, text in images, and reference edits. Both have the same price and parameter limits. Switch using version.
Generate your first image
Create a Discount Group key in API Keys and check your wallet balance. Substitute your key for YOUR_API_KEY and keep the Bearer prefix. Store your key on the server or in an environment variable. The curl examples work in macOS, Linux, or Windows Git Bash.
The example uses Flare. To use Sunburst, keep model=gpt-image-2.6 and set version=sunburst. resolution is 1k and n is 1.
curl "https://app.apipool.dev/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.6",
"version": "flare",
"prompt": "A capybara in a shirt sips tea at an office desk with red error dialogs behind it. Comic art. Put NO BIG DEAL at the top and TEA FIRST at the bottom.",
"size": "1:1",
"resolution": "1k",
"quality": "low",
"output_format": "png",
"n": 1
}'HTTP 202 means the task was accepted. Save the complete id.
{
"id": "imgtask_01...",
"object": "image_generation.task",
"status": "submitted",
"model": "gpt-image-2.6"
}Query and download
Replace TASK_ID with that ID and use the original key.
curl "https://app.apipool.dev/v1/tasks/TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"| Status | What to do |
|---|---|
submitted, submission_unknown, processing, or meter_pending | Wait a few seconds and check the same ID again. |
completed | Download each data[].url. |
failed | Read error before trying again. |
A completed response has this shape.
{
"id": "imgtask_01...",
"status": "completed",
"data": [{ "url": "https://objects.example/result.png?..." }]
}Open the returned URL directly. Downloads do not require an API key. Save files before expires_at. Within result_expires_at, query the original task for a fresh URL. Keep the ID even if your wait times out. Another submission creates a separate billable task. See asynchronous image tasks.
Edit your own image
Replace ./source.png with the path to your file, keeping the @ prefix. curl sets the multipart Content-Type.
curl "https://app.apipool.dev/v1/images/edits" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=gpt-image-2.6" \
-F "version=sunburst" \
-F "image=@./source.png" \
-F "prompt=Turn the subject into a boxed collectible figure with recognizable facial features and appearance. Use clear blister packaging with a miniature laptop, iced coffee, and folding chair. Label the box OFFICE EDITION and show the entire package in a realistic toy photo." \
-F "size=1:1" \
-F "resolution=1k" \
-F "quality=high" \
-F "output_format=png" \
-F "n=1"Poll and download the result using the same steps. Repeat the image field to send up to 16 PNG, JPEG, or WebP files, up to 10 MB per file and 48 MB combined. Describe what to keep or change. Alternatively, provide up to 16 directly accessible URLs in image_urls in a JSON generation request. Use files for images that require login or are available only on your machine.
Make a GIF
curl "https://app.apipool.dev/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.6",
"version": "flare",
"prompt": "A round ginger cat with crooked glasses types furiously with alternating paws. Its head bobs and a white cartoon puff rises from the keyboard. Use a fixed front view, cream background, and bold comic outlines. Make the movement loop seamlessly. No text.",
"output_format": "gif",
"size": "auto",
"resolution": "1k",
"quality": "low",
"n": 1
}'GIF accepts one text-only result. Omit size or use auto. Describe the motion, framing, and loop in the prompt. Frame count and timing are chosen by the model. Omit frame_count, frame_duration_ms, and references. Query the task and download the GIF from data after completion.
Make an SVG
curl "https://app.apipool.dev/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.6",
"version": "flare",
"prompt": "A flat vector sticker of a sleepy battery with one red bar, connected to a large iced coffee by a charging cable. Label the battery 1%. Use thick dark-brown outlines, cream and mint fills, and rounded shapes. No gradients, textures, or shadows.",
"output_format": "svg",
"complexity": "low",
"size": "1:1",
"resolution": "1k",
"quality": "low",
"n": 1
}'SVG accepts one text-only result. The entire svg object can be omitted. If you supply it, set a nonempty svg.model, such as gpt-4.1-mini. Optional svg.reasoning.effort values are none, minimal, low, medium, high, xhigh, and max, depending on the text model. SVG has no separate text-token charge. Query the task and download the SVG from data.
Parameters
| Parameter | Accepted values |
|---|---|
model | Required. gpt-image-2.6. |
prompt | Required nonempty string, up to 32,000 characters. |
version | flare (default) or sunburst. |
resolution | 1k only. Default 1k. |
n | Integer 1 only. Default 1. |
size | auto, 1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, or 21:9. GIF uses auto or omission. |
quality | auto, low, medium, high, xhigh, or max. |
complexity | Optional low, medium, or high. |
output_format | png (default), jpeg, webp, gif, or svg. |
image_urls | Up to 16 accessible references in a JSON request for PNG, JPEG, or WebP. |
image | Repeatable multipart references for PNG, JPEG, or WebP. |
size takes a ratio. For text-to-image, auto defaults to a square. Edits use the reference ratio and can change exact dimensions. 1k is the resolution tier. quality=auto lets the model choose quality. Higher quality can take longer. 2K, 4K, multiple outputs, masks, markup editing, and GIF frame settings are unavailable.
Pricing
Flare and Sunburst cost US$0.009031 per delivered file, including the group discount and microdollar rounding. PNG, JPEG, WebP, GIF, and SVG use the same rate. Quality, complexity, and references add no charge. Failed tasks with no delivered file are free. See the model page for the active price.
Troubleshooting
- HTTP 202 without an image. Poll
/v1/tasks/{id}with the returned ID. - HTTP 400. Check the exact model ID, output format, ratio, image count, and GIF or SVG requirements.
- HTTP 401. Check the enabled key, the correct group, and the
Bearerprefix. - HTTP 404. Check the full ID and use the key that created the task at
https://app.apipool.dev. - Insufficient balance. Add funds and check any task ID already returned before submitting again.
- Timeout during submission. Check recent tasks or contact support before repeating the request.
- HTTP 429, 5xx, or timeout while polling. Follow
Retry-Afterif present and query the same ID. - Reference download failure. Use a public image URL or upload the file.
- Expired download URL. Query within the result retention period for a fresh link.
Use the asynchronous Images API. An SDK call returning a task ID requires a follow-up query before images are available. Chat Completions and Responses do not accept these models.