# ChatGPT Images 2.6 API Complete API reference for ChatGPT Images 2.6 Flare and Sunburst models. ## Model Variants This API supports four model variants: | Model | ID | Description | |-------|-----|-------------| | **ChatGPT Images 2.6 Flare** | `gpt-image-2.6-flare` | Text-to-image generation with resolution and quality controls | | **ChatGPT Images 2.6 Flare Edit** | `gpt-image-2.6-flare-edit` | Image editing and multi-image composition | | **ChatGPT Images 2.6 Sunburst** | `gpt-image-2.6-sunburst` | Text-to-image generation with resolution and quality controls | | **ChatGPT Images 2.6 Sunburst Edit** | `gpt-image-2.6-sunburst-edit` | Image editing and multi-image composition | ## Quick Comparison Flare and Sunburst share the following request options. | Feature | Flare / Sunburst | Flare Edit / Sunburst Edit | |---------|-----------------|---------------------------| | Input | Text prompt | Image(s) + text prompt | | Resolution Options | `1k`, `2k`, `4k` | `1k`, `2k`, `4k` | | Quality Options | `low`, `medium`, `high`, `xhigh`, `max` | `low`, `medium`, `high`, `xhigh`, `max` | | Default Quality | `medium` | `medium` | | Aspect Ratios | 10 options | 10 options | | Image Input | No | Required (1–16 images) | | Output Formats | `png`, `jpeg`, `webp`, `gif`, `svg` | `png`, `jpeg`, `webp` | | Default Output Format | `png` | `png` | ### Supported Aspect Ratios `16:9`, `9:16`, `1:1`, `3:2`, `2:3`, `3:4`, `4:3`, `5:4`, `4:5`, `21:9` ## ChatGPT Images 2.6 Flare (Text-to-Image) ### Endpoint ``` POST /api/v1/image/task ``` ### Authentication ``` Authorization: Bearer YOUR_API_KEY ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"gpt-image-2.6-flare"` | | `prompt` | string | Image generation prompt | | `width` | integer | Width ratio value, such as `16` for `16:9`; not a pixel dimension | | `height` | integer | Height ratio value, such as `9` for `16:9`; not a pixel dimension | | `resolution` | string | `"1k"`, `"2k"`, or `"4k"` | The width:height ratio must match one of the supported aspect ratios listed above. #### Optional | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `quality` | string | `"medium"` | `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"` | | `output_format` | string | `"png"` | Output format: `"png"`, `"jpeg"`, `"webp"`, `"gif"`, or `"svg"`. Use `"gif"` for GIF animation or `"svg"` for SVG vector output | | `frame_count` | integer | `9` | GIF frame count, from `2` to `16`. Only applies when `output_format` is `"gif"` | | `frame_duration_ms` | integer | `200` | GIF frame duration in milliseconds, from `20` to `2000`. Only applies when `output_format` is `"gif"` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/image/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'gpt-image-2.6-flare', prompt: 'A looping animation of steam rising from a ceramic mug on a pale stone table, warm studio lighting', width: 1, height: 1, resolution: '1k', quality: 'medium', output_format: 'gif', frame_count: 9, frame_duration_ms: 200 }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## ChatGPT Images 2.6 Flare Edit (Image Editing) ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"gpt-image-2.6-flare-edit"` | | `prompt` | string | Description of the desired edits | | `image_url_list` | string[] | Input image URLs; at least 1 and at most 16 images, each smaller than 50 MB | | `width` | integer | Width ratio value, such as `16` for `16:9`; not a pixel dimension | | `height` | integer | Height ratio value, such as `9` for `16:9`; not a pixel dimension | | `resolution` | string | `"1k"`, `"2k"`, or `"4k"` | The width:height ratio must match one of the supported aspect ratios listed above. #### Optional | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `quality` | string | `"medium"` | `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"` | | `output_format` | string | `"png"` | Output format: `"png"`, `"jpeg"`, or `"webp"` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/image/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'gpt-image-2.6-flare-edit', prompt: 'Replace the background with a warm studio setting while keeping the product unchanged', image_url_list: ['https://example.com/product-photo.jpg'], width: 1, height: 1, resolution: '1k', quality: 'medium', output_format: 'png' }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## ChatGPT Images 2.6 Sunburst (Text-to-Image) ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"gpt-image-2.6-sunburst"` | | `prompt` | string | Image generation prompt | | `width` | integer | Width ratio value, such as `16` for `16:9`; not a pixel dimension | | `height` | integer | Height ratio value, such as `9` for `16:9`; not a pixel dimension | | `resolution` | string | `"1k"`, `"2k"`, or `"4k"` | The width:height ratio must match one of the supported aspect ratios listed above. #### Optional | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `quality` | string | `"medium"` | `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"` | | `output_format` | string | `"png"` | Output format: `"png"`, `"jpeg"`, `"webp"`, `"gif"`, or `"svg"`. Use `"gif"` for GIF animation or `"svg"` for SVG vector output | | `frame_count` | integer | `9` | GIF frame count, from `2` to `16`. Only applies when `output_format` is `"gif"` | | `frame_duration_ms` | integer | `200` | GIF frame duration in milliseconds, from `20` to `2000`. Only applies when `output_format` is `"gif"` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/image/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'gpt-image-2.6-sunburst', prompt: 'A looping animation of steam rising from a ceramic mug on a pale stone table, warm studio lighting', width: 1, height: 1, resolution: '1k', quality: 'medium', output_format: 'gif', frame_count: 9, frame_duration_ms: 200 }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## ChatGPT Images 2.6 Sunburst Edit (Image Editing) ### Endpoint ``` POST /api/v1/image/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"gpt-image-2.6-sunburst-edit"` | | `prompt` | string | Description of the desired edits | | `image_url_list` | string[] | Input image URLs; at least 1 and at most 16 images, each smaller than 50 MB | | `width` | integer | Width ratio value, such as `16` for `16:9`; not a pixel dimension | | `height` | integer | Height ratio value, such as `9` for `16:9`; not a pixel dimension | | `resolution` | string | `"1k"`, `"2k"`, or `"4k"` | The width:height ratio must match one of the supported aspect ratios listed above. #### Optional | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `quality` | string | `"medium"` | `"low"`, `"medium"`, `"high"`, `"xhigh"`, or `"max"` | | `output_format` | string | `"png"` | Output format: `"png"`, `"jpeg"`, or `"webp"` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/image/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'gpt-image-2.6-sunburst-edit', prompt: 'Replace the background with a warm studio setting while keeping the product unchanged', image_url_list: ['https://example.com/product-photo.jpg'], width: 1, height: 1, resolution: '1k', quality: 'medium', output_format: 'png' }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Response Format ### Initial Response All four ChatGPT Images 2.6 variants return a `task_id` for polling: ```json { "code": 0, "data": { "task_id": "{task_id}", "task_status": "submitted", "response_url": "https://api.flaq.ai/api/v1/image/{task_id}" }, "message": "success" } ``` ### Polling Response Poll `GET /api/v1/image/{task_id}` to check status: ```json { "code": 0, "data": { "task_id": "{task_id}", "task_status": "succeed", "task_status_msg": null, "response_url": "https://api.flaq.ai/api/v1/image/{task_id}", "task_result": { "credit": 0.0997, "images": [ { "url": "https://example.com/generated-image.jpeg" } ] } }, "message": "success" } ``` ### Status Values - `submitted`: Task accepted - `processing`: Image generation or editing in progress - `succeed`: Task completed successfully - `failed`: Task failed ## Processing Time Processing time varies by model, output settings, prompt complexity, and reference-image count. Poll until the task status is `succeed` or `failed`; a submitted or processing task may not contain image results yet. ## Best Practices 1. **Be explicit about composition**: ChatGPT Images 2.6 performs best when prompts describe subject, framing, lighting, and intended style clearly. 2. **Match aspect ratio to delivery target**: Set the ratio up front for social posts, banners, product pages, or editorial layouts. 3. **Use clean source images for edits**: Sharp, well-lit inputs improve identity preservation and local edit quality. 4. **Limit multi-image requests to strong references**: For edit requests, provide only the images that matter to avoid conflicting visual guidance.