asOpenAI localized example text:Path, Request Bodyand OpenAIimages/generations,images/edits, can OpenAI SDK.with v2 endpointPOST /api/v2/open/aigc/gpt-image-2.6(camelCase Request Body, localized example textgenType), task and, use.
Overview
GPT Image 2.6 with Sunburst and Flare, Request and exactly identical, Request Bodymodel: | model | localized example text | Scenario |
|---|---|---|---|
gpt-image-2.6-flare | , | , image,,, | |
gpt-image-2.6-sunburst | and | , image, |
exactly identical, when inlocalized example textandqualitylocalized example text.Scenarioflare.
| Capability | localized example text | RequestFormat |
|---|---|---|
| Text-to-Image / Image-to-Image | POST /v1/images/generations | application/json |
| Image Editing (upload a file) | POST /v1/images/edits | multipart/form-data |
| Query Tasklocalized example text | GET /v1/images/generations/{taskId} | — |
- supported Text-to-Image and Image-to-Image, 1 images image
- Reference image images, ModelCapability
- supported15 and 1K / 2K / 4K Resolution
- -
resolutioneach - default:task booking after Usually 1 seconds return
taskId, query image;async=falsecan as, Request OpenAI imageBase URL:https://mm-internal-cn.leonecloud.com
localized example text```http Authorization: Bearer YOUR_API_KEY
## Create Task
**POST** `/v1/images/generations`
`Content-Type: application/json`.defaultlocalized example text——task bookingafter Usually 1 seconds return`taskId`, etc. image.Requestimage when`async=false`, see below[localized example text](#-async-false).
### Text-to-Imagelocalized example text```bash
curl -X POST "https://mm-internal-cn.leonecloud.com/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.6-sunburst",
"prompt": ",, and,",
"size": "16:9",
"resolution": "2k",
"callback_url": "https://example.com/webhooks/image",
"task_nickname": "autumn-fox"
}'localized example textmodel localized example textgpt-image-2.6-flare can, fieldexactly identical.
Image-to-Imagelocalized example textimage Image-to-Image.
{
"model": "gpt-image-2.6-sunburst",
"prompt": "Reference image in the subject,",
"image": ["https://example.com/product.png"],
"size": "1:1",
"resolution": "1k"
}Reference imagesupported can URL, supported Base64 data URI.
Image Editinglocalized example text**POST** /v1/images/edits
Content-Type: multipart/form-data.and, field and Meaningexactly identical, in image file, no URL or Base64.task bookingand query Methodexactly identical.
curl -X POST "https://mm-internal-cn.leonecloud.com/v1/images/edits" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=gpt-image-2.6-sunburst" \
-F "prompt=localized example text" \
-F "size=1024x1024" \
-F "image=@/path/to/cat.png"Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | gpt-image-2.6-sunburst orgpt-image-2.6-flare |
prompt | string | Yes | — | image, up to 20,000 characters.use Reference image when, subject and |
image | string[] | No | — | input imagelist (URL or Base64 data URI),Image-to-Image |
size | string | No | 1:1 | , pixel string or1K / 2K / 4K, see below「and Resolution」 |
resolution | string | No | 1k | Resolutionlocalized example text1k / 2k / 4k, size can.localized example text |
nsfw_check | boolean | No | — | Safety moderation toggle; takes precedence over extra_body.nsfw_checker when both are sent |
async | boolean | No | true | ;false image and return OpenAI image |
response_format | string | No | url | only async=false when:url orb64_json |
extra_body | object | No | — | Modelwith Parameter,{"nsfw_checker": true} |
callback_url | string | No | — | Callback notification URL after the task is complete |
task_nickname | string | No | — | Task label for business tracking |
user | string | No | — | (OpenAI field) |
Model1 images image (nas 1); supportedmaskrepainting; supportedbackground/moderation/output_format/output_compression, will;quality( height quality).Mask,complexity,webp/gif/svgoutput or token,GPT Image 2.6 Official.
/v1/images/edits field and Meaning and exactly identical, inimage as file; can useimage_urls URL Reference image, and upload a file can.localized example textextra_body JSON characters.
and Resolutionsize supported1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, 21:9, 9:21, 2:1, 1:2, 1:3, 3:1 15,1536x1024 pixel string or1K / 2K / 4K; If omitted orauto when1:1 localized example text.
size | 1K | 2K | 4K |
|---|---|---|---|
1:1 | 1024×1024 | 2048×2048 | 2880×2880 |
16:9 | 1280×720 | 2048×1152 | 3840×2160 |
9:16 | 720×1280 | 1152×2048 | 2160×3840 |
4:3 | 1152×864 | 2304×1728 | 3264×2448 |
3:4 | 864×1152 | 1728×2304 | 2448×3264 |
3:2 | 1536×1024 | 2048×1360 | 3504×2336 |
2:3 | 1024×1536 | 1360×2048 | 2336×3504 |
5:4 | 1120×896 | 2240×1792 | 3200×2560 |
4:5 | 896×1120 | 1792×2240 | 2560×3200 |
21:9 | 1456×624 | 2912×1248 | 3840×1648 |
9:21 | 624×1456 | 1248×2912 | 1648×3840 |
2:1 | 1536×768 | 3072×1536 | 3840×1920 |
1:2 | 768×1536 | 1536×3072 | 1920×3840 |
1:3 | — | 688×2048 | 1280×3840 |
3:1 | — | 2048×688 | 3840×1280 |
Resolutionasresolution > size localized example text.4K Resolution, width.
1:3and3:1provide 2K / 4K,1kwill return ParameterError.
task booking(default)task:| Parameter | Type | Description |
| --- | --- | --- |
| code | int | Status Code, 0 indicates success |
| msg | string | Message |
| data.taskId | string | Task ID, used to query task status |
| data.status | string | Task Status, task bookingwhen asprocessing |
| data.createdAt | string | Created Time |
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260509150000_abc12345",
"status": "processing",
"createdAt": "2026-05-09 15:00:00"
}
}Query Task
GET /v1/images/generations/{taskId}
/v1/images/generations and/v1/images/edits create task query.tasklocalized example textprocessing when recommendedsecondsPolling,success orfailed; can usecallback_url complete, Polling.
curl "https://mm-internal-cn.leonecloud.com/v1/images/generations/task_20260509150000_abc12345" \
-H "Authorization: Bearer YOUR_API_KEY"{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260509150000_abc12345",
"status": "success",
"result": ["https://fc-gw-sh.oss-accelerate.aliyuncs.com/images/2026/05/09/output_001.png"],
"progress": 100,
"createdAt": "2026-05-09 15:00:00",
"updatedAt": "2026-05-09 15:00:25"
}
}(async=false)
as OpenAI image, can OpenAI SDK:```json
{
"created": 1778394000,
"data": [
{ "url": "https://.../output_001.png" }
]
}
localized example text`response_format=b64_json` when,`data` as`{"b64_json":"..."}`.
> 4K image when: when width 10 minutes; Scenariorecommended use default, when.
## localized example text`resolution` each;`sunburst` and`flare` localized example text.Reference imageinput.
| Resolutionlocalized example text| each Pricing|
| --- | --- |
| `1K` | $0.030 |
| `2K` | $0.050 |
| `4K` | $0.080 |
Create Taskwhen, taskSuccess after, Failure.and as.
## Errorlocalized example text**(default)**Error, HTTP Status Code as 200,`code`:| `code` | Description |
| --- | --- |
| 0 | Success |
| 10002 | Parametermissing or malformed / supported model (`size`, `resolution`, and`1:3`, `3:1` localized example text`1k`) |
| 10005 | API Key invalid or missing |
| 30003 | Task not found |
| 40001 | Insufficient balance, Create Taskwhen Failure, after|
| 90003 | Internal server error |
taskFailurewhen will,.
**(`async=false`)**OpenAI Error, and use HTTP Status Code:`400` ParameterError, `401` Failure,`402` Insufficient balance, `500` taskexecute Failure,`504` etc. exceeds 10 minutes not image (**tasknot**, `error.code` localized example text`taskId`, can query ).
## and GPT Image Model| Model | Billing Method | image| Scenario|
| --- | --- | --- | --- |
| `gpt-image-2.6-sunburst` / `-flare` ()| Resolution each| as, can| can|
| [GPT Image 2.6 Official](/docs/gpt-image-2-6-official) | token| localized example text| Mask,`complexity`, `webp` / `gif` / `svg`, any dimensions|
| [GPT Image 2.5](/docs/gpt-image-2-5) | Resolution each| as, can|, and exactly identical|
## v2 endpoint
v2 endpoint and task and, field as camelCase:| localized example text| v2 endpoint| (OpenAI )|
| --- | --- | --- |
| create Path| `POST /api/v2/open/aigc/gpt-image-2.6` | `POST /v1/images/generations` |
| query Path| `GET /api/v2/open/aigc/{taskId}` | `GET /v1/images/generations/{taskId}` |
| localized example text| Request Body `genType` (`sunburst` / `flare`) | `model` localized example text`-sunburst` / `-flare` |
| Reference imagefield | `imageUrls` | `image` |
| fieldlocalized example text| camelCase (`callbackUrl` / `taskNickname`) | OpenAI field (`callback_url` / `task_nickname`) |
| image| supported| supported (`async=false`) |
| OpenAI SDK localized example text| No | Yes |
v2 fieldDescription[GPT Image v2 endpoint](/docs/gpt-image-v2).