APIMaster.ai

GPT Image 2.6 API — Flare and Sunburst

Parameters, limits and examples for GPT Image 2.6 generation, reference-image edits, masks, markup guidance, GIFs and asynchronous tasks.

GPT Image 2.6

Select gpt-image-2.6-flare or gpt-image-2.6-sunburst. These are independent model IDs with the same parameter format. See the marketplace for availability and account prices.

Endpoints and authentication

Send Authorization: Bearer YOUR_API_KEY on every request.

Operation Endpoint Body
Generate / edit with reference URLs POST https://apimaster.ai/v1/images/generations JSON; references in image_urls
Asynchronous generation / URL edit POST https://apimaster.ai/v1/images/generations/async Same JSON; returns a task ID
Edit uploaded files POST https://apimaster.ai/v1/images/edits multipart image or repeated image[]
Asynchronous uploaded edit POST https://apimaster.ai/v1/images/edits/async Same multipart
Fetch task GET https://apimaster.ai/v1/tasks/{task_id}?model=MODEL_ID An API key belonging to the submitting account

Synchronous calls wait for data[].url. Asynchronous calls return data[0].task_id; poll the task every 3–5 seconds. Allow up to 600 seconds for generation. A client timeout does not cancel a request. Send an Idempotency-Key on the first submission and use submission recovery if its response is lost.

curl --fail-with-body --max-time 600 'https://apimaster.ai/v1/images/generations/async' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: unique-image-request-001' \
  -d '{"model":"gpt-image-2.6-flare","prompt":"A watercolor orange cat on a windowsill","size":"1:1","resolution":"1k","quality":"medium","n":1}'

Parameters

Field Type / default Description
model string, required gpt-image-2.6-flare / gpt-image-2.6-sunburst
prompt string, required 1–32,000 characters; describe edits and reference order
n integer, 1 1–4 output images or GIFs; explicit zero, negatives, fractions and values above 4 are rejected
size string, optional auto, a supported ratio below, or exact WIDTHxHEIGHT; GIF rules differ
resolution string, 1k Lowercase 1k / 2k / 4k; exact pixels take precedence
quality string, auto low / medium / high / xhigh / max / auto
complexity string, high low / medium / high; planning strength, independent of rendering quality
output_format string, png png / jpeg / webp / gif / svg
output_compression integer, optional 0–100; JPEG / WebP only
background string, auto transparent / opaque / auto; transparency requires PNG / WebP / SVG
moderation string, low low / auto
image_urls string[], optional Up to 16 HTTP(S) image URLs or image Data URLs, in reference order
mask_url string, optional Alpha PNG URL or Data URL matching the first reference dimensions; transparent areas request edits
markup_url string, optional HTTPS PNG URL or data:image/png;base64,... overlay matching the first reference
markup string / object, optional Alternative to markup_url: URL string or {"image_url":"..."}; no file_id; do not supply both aliases
svg object, required for SVG {"model":"gpt-5.4-mini"}; optional reasoning.effort, see below
safety_identifier string, optional Stable anonymous application identifier, at most 128 characters
frame_count integer, 9 GIF only; 2–16
frame_duration_ms integer, 200 GIF only; at least 20 ms, rounded down to a multiple of 10 ms

Do not send stream, partial_images, input_fidelity, prompt_rewriter, or response_format; the svg object is only valid with SVG output. Results are image URLs; streaming partial images and Base64 response format are unsupported.

Static image sizes

Ratios: 1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, 2:1, 1:2, 21:9, 9:21, 3:1, 1:3.

Exact dimensions must be positive multiples of 16, each at most 3840. Total pixels must be 655,360–8,294,400 and the long-to-short edge ratio at most 3:1. Sizes beyond 2560×1440 are experimental. Exact pixels override resolution: 1024x1024 with resolution=4k still requests 1024×1024.

For edits, omitted size selects dimensions from the first reference ratio and resolution; explicit auto chooses automatically. Specify a ratio and resolution when you need a predictable canvas.

Reference edits, masks and markup

2.6 accepts image_urls directly in generations JSON:

{
  "model": "gpt-image-2.6-sunburst",
  "prompt": "Change only the background to pale green. Preserve the subject, text and layout.",
  "image_urls": ["https://your-image-host.example/reference.png"],
  "mask_url": "https://your-image-host.example/mask.png",
  "resolution": "1k",
  "quality": "medium",
  "complexity": "low",
  "output_format": "png",
  "n": 1
}

Omit the mask to edit the whole image. Masks do not guarantee unchanged pixels outside the edit region. Both mask and markup require reference images and are mutually exclusive.

For markup guidance, provide arrows, boxes or strokes on a transparent PNG using markup_url or markup. Both the first reference and overlay must be at most 16,777,216 pixels; the overlay must be at most 50 MB and match the first image dimensions. URLs must be accessible.

For local files, upload to edits and let the client generate the multipart boundary. Each uploaded file is limited to 10 MB. Repeat image[] for multiple references in order:

curl --fail-with-body --max-time 600 'https://apimaster.ai/v1/images/edits/async' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'model=gpt-image-2.6-flare' \
  -F 'prompt=Follow the markup to change the background to pale green. Preserve the subject.' \
  -F 'image[]=@reference.png;type=image/png' \
  -F 'markup=@overlay.png;type=image/png' \
  -F 'resolution=1k' -F 'quality=medium' -F 'complexity=low' -F 'n=1'

Replace markup with mask=@mask.png;type=image/png for masking; do not upload both.

Animated GIF

GIF supports text-to-image only, with no references, masks, markup, transparent background or compression. size is the per-frame pixel size; omitted / auto uses 512×512. Ratio names are invalid. Frame dimensions must be positive multiples of 16.

Frames form one sheet: 2–8 frames use 4×2, 9 use 3×3, 10–12 use 4×3, and 13–16 use 4×4. Rows and columns may swap. The sheet must have edges at most 3840, at most 8,294,400 pixels and aspect ratio at most 3:1. 512×512 supports 2–16 frames; 768×768 supports at most 12; 1024×1024 exceeds the limit even with 2 frames.

{
  "model": "gpt-image-2.6-flare",
  "prompt": "A small orange cat waves its paw in a smooth loop, fixed camera.",
  "output_format": "gif",
  "size": "512x512",
  "frame_count": 9,
  "frame_duration_ms": 200,
  "quality": "low",
  "n": 1
}

GIF billing uses the whole sheet's image tier, rather than charging each frame separately. n GIFs count as n outputs.

SVG vector output

Set output_format: "svg" and svg.model: "gpt-5.4-mini". Both 2.6 models support this format. Results are static SVG file URLs, with log previews and source-file downloads.

{
  "model": "gpt-image-2.6-flare",
  "prompt": "A minimalist bakery logo with a wheat stalk, flat colors, clean vector shapes",
  "output_format": "svg",
  "svg": {"model": "gpt-5.4-mini"},
  "size": "1:1",
  "resolution": "1k",
  "quality": "low",
  "n": 1
}
Field Description
svg.model Required; currently gpt-5.4-mini
svg.reasoning.effort Optional; omitting it is recommended. Accepted names are none / minimal / low / medium / high / xhigh / max; the conversion model determines which levels are supported

SVG supports text-to-image only with n=1. References, masks, markup, compression and GIF frame parameters are unsupported. quality and complexity control the intermediate reference image. Static vector elements and local definition references are supported, with an 8 MB output limit. Scripts, interactive animation, external resources and embedded bitmaps are unsupported.

SVG uses the configured image resolution and quality price. Text processing for vector conversion is included, with no additional text fee. Send an Idempotency-Key on the first submission and keep polling the original task once a task ID exists.

Results, logs and billing

curl --fail-with-body 'https://apimaster.ai/v1/tasks/TASK_ID?model=gpt-image-2.6-flare' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Keep polling while processing. succeeded / success / completed are successful terminal states; failed / error indicate failure. Read all images from data.result.images[].url, accepting either a string or URL array. Synchronous results use data[].url. Download files promptly.

Successful tasks have image previews in console request logs. Both 2.6 models have independent settings initialized to GPT Image 2's corresponding base prices, billed by output count. Exact pixels and GIF sheets determine the resolution billing tier; auto quality uses the configured auto tier. Route and account multipliers affect the final account price; consult the console and request log. Check final task status and refunds on failure: a reservation is not final consumption.

Fix parameter errors before retrying. Once a task ID exists, query that task instead of generating again. If a submission response is missing, recover its idempotency receipt first.