GPT Image 2.6 API
GPT Image 2.6 API with VezAPI. Explore model capabilities, credit pricing, request parameters, and integration examples.
GPT Image 2.6 API documentation
Integrate GPT Image 2.6 with your VezAPI key. The operations below share the same authentication and account balance.
Flare and Sunburst currently support text-to-raster output only (PNG, JPEG, WebP or GIF). Image editing and SVG output are paused until enforceable spending limits are available. Economy retains its fixed-price operations.
https://api.vezapi.comSend Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.
GPT Image 2.6 Economy - Image to Image
/api/v1/jobs/createTaskModel IDs: gpt-image-2-6/economy-image-to-image
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name used for generation. This endpoint must use `gpt-image-2-6/economy-image-to-image`. Values: Default: |
callBackUrloptional | string | Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent. |
inputrequired | object | Input parameters for the image-to-image task. |
input.promptrequired | string | Instruction for how to edit or combine the input images. Say what should stay the same and what should change. Put any text that should appear in the image in quotes. Required, 1 to 20,000 characters.
|
input.input_urlsoptional | array | Publicly accessible URLs of the images to edit or use as references. Optional. Up to 16 images; JPEG, PNG or WebP (including jpg), up to 30 MB each. With several images, refer to them by order in the prompt.
|
input.aspect_ratiooptional | string | Aspect ratio of the output image. `auto` (default) lets the model choose the frame that best fits the prompt and input images. Economy supports `auto`, `1:1`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `4:3` only. Values: Default: |
input.backgroundoptional | string | Background handling. - `transparent`: transparent background, useful for product cut-outs, icons and stickers - `opaque`: always a solid background - `auto` (default): the model decides Values: Default: |
input.output_formatoptional | string | Output image format. Default `png`. Economy supports `png` only. Values: Default: |
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2-6/economy-image-to-image",
"input": {
"prompt": "Keep the shelf, the mug shapes, the window light and the camera angle unchanged. Change the glaze of every mug to matte black, and add a small chalkboard sign on the top shelf that reads \"FRESH ROAST\" in white chalk lettering.",
"aspect_ratio": "auto"
}
}'Responses and errors
HTTP 200
Request Successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **433**: Request Limit - Sub-key Usage Exceeds Limit - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled Values: |
msgoptional | string | Response message, error description when failed |
datarequired | object | |
data.taskIdrequired | string | Task ID, can be used with Get Task Details endpoint to query task status |
GPT Image 2.6 Economy - Text to Image
/api/v1/jobs/createTaskModel IDs: gpt-image-2-6/economy-text-to-image
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name used for generation. This endpoint must use `gpt-image-2-6/economy-text-to-image`. Values: Default: |
callBackUrloptional | string | Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent. |
inputrequired | object | Input parameters for the text-to-image task. |
input.promptrequired | string | Text description of the image to generate. Describe the subject, setting, composition, lighting and style. Put any text that should appear in the image in quotes. Required, 1 to 20,000 characters.
|
input.aspect_ratiooptional | string | Aspect ratio of the output image. `auto` (default) lets the model choose the frame that best fits the prompt. Economy supports `auto`, `1:1`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `4:3` only. Values: Default: |
input.backgroundoptional | string | Background handling. - `transparent`: transparent background, useful for product cut-outs, icons and stickers - `opaque`: always a solid background - `auto` (default): the model decides Values: Default: |
input.output_formatoptional | string | Output image format. Default `png`. Economy supports `png` and `gif` only. Values: Default: |
input.frame_countoptional | string | Number of frames. `auto` (default) lets the model choose. Allowed values: `auto`, `4`, `9`, `16`, `25`, `36`, `64`. This parameter is supported only when the output format is GIF. Values: Default: |
input.frame_duration_msoptional | number | Duration of each frame in milliseconds. `auto` (default) lets the model choose. You can also pass any integer from 20 to 2000; values are rounded to a multiple of 10 ms. This parameter is supported only when the output format is GIF. |
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2-6/economy-text-to-image",
"input": {
"prompt": "A sunlit ceramic studio shelf lined with hand-thrown mugs in muted terracotta and sage glazes, soft morning light through a side window, shallow depth of field, clean editorial product photography, with a small paper tag on the middle shelf that reads \"BATCH 07\".",
"aspect_ratio": "auto"
}
}'Responses and errors
HTTP 200
Request Successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **433**: Request Limit - Sub-key Usage Exceeds Limit - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled Values: |
msgoptional | string | Response message, error description when failed |
datarequired | object | |
data.taskIdrequired | string | Task ID, can be used with Get Task Details endpoint to query task status |
GPT Image 2.6 Flare - Text to Image
/api/v1/jobs/createTaskModel IDs: gpt-image-2-6/flare-text-to-image
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name used for generation. This endpoint must use `gpt-image-2-6/flare-text-to-image`. Values: Default: |
callBackUrloptional | string | Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent. |
inputrequired | object | Input parameters. |
input.promptrequired | string | Text description of the image to generate. Describe the subject, setting, composition, lighting and style. Put any text that should appear in the image in quotes. Required, 1 to 32,000 characters.
|
input.aspect_ratiooptional | string | Aspect ratio. Optional, default `auto`. Supported: `auto`, `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`. Values: Default: |
input.resolutionoptional | string | Resolution tier. Optional, default `1K`. GIF frame pixels do **not** use this table — use `size`. Static-image pixel sizes (width × height): | ratio | 1K | 2K | 4K | |---|---|---|---| | 1:1 / auto | 1024×1024 | 2048×2048 | 2880×2880 | | 3:2 | 1536×1024 | 2048×1360 | 3520×2336 | | 2:3 | 1024×1536 | 1360×2048 | 2336×3520 | | 4:3 | 1024×768 | 2048×1536 | 3312×2480 | | 3:4 | 768×1024 | 1536×2048 | 2480×3312 | | 5:4 | 1280×1024 | 2560×2048 | 3216×2576 | | 4:5 | 1024×1280 | 2048×2560 | 2576×3216 | | 16:9 | 1536×864 | 2048×1152 | 3840×2160 | | 9:16 | 864×1536 | 1152×2048 | 2160×3840 | | 2:1 | 2048×1024 | 2688×1344 | 3840×1920 | | 1:2 | 1024×2048 | 1344×2688 | 1920×3840 | | 21:9 | 2016×864 | 2688×1152 | 3840×1648 | | 9:21 | 864×2016 | 1152×2688 | 1648×3840 | | 3:1 | 1536×512 | 3072×1024 | 3840×1280 | | 1:3 | 512×1536 | 1024×3072 | 1280×3840 | Values: Default: |
input.qualityoptional | string | Quality. Optional, default `medium`. Supported: `low`, `medium`, `high`, `xhigh`, `max`, `auto`. Values: Default: |
input.backgroundoptional | string | Background. Optional, default `auto`. Transparent background is only supported with `png` / `webp` / `gif`. - `transparent`: transparent background, useful for product cut-outs, icons and stickers. `output_format` must be `png` or `webp` - `opaque`: always a solid background - `auto` (default): the model decides Values: Default: |
input.output_formatoptional | string | Output format. Optional, default `png`. Passing `jpg` is treated as `jpeg`. - Transparent background is only supported with `png` / `webp` Values: Default: |
input.complexityoptional | string | Planning complexity. Optional, default `high`. Supported: `low`, `medium`, `high`. Values: Default: |
input.moderationoptional | string | Moderation strength. Optional, default `low`. Supported: `auto`, `low`. Values: Default: |
input.output_compressionoptional | integer | JPEG / WebP compression, 0–100. Optional. Send only when `output_format` is `jpeg` or `webp`. Do not include this field for other formats.
|
input.sizeoptional | string | GIF **per-frame** pixel size. Send only when `output_format=gif`. Width and height must both be multiples of 16. Optional, default `auto` (currently equivalent to `512x512`). Do not pass ratio names such as `1:1`. Do not send for non-gif. Frames are first packed into a sprite sheet: 2–8 frames use 4×2, 9 frames use 3×3, 10–12 frames use 4×3, 13–16 frames use 4×4. Rows and columns may be swapped to get a closer-to-square layout. The full sheet must have each side ≤ 3840, total pixels ≤ 8,294,400, and long/short side ratio ≤ 3:1, otherwise the request returns 400. - `512x512` works for all 2–16 frames - `768x768` supports at most 12 frames - `1024x1024` exceeds the per-side sheet limit even with only 2 frames Default: |
input.frame_countoptional | integer | GIF frame count. Send only when `output_format=gif`. Integer 2–16, default 9. Do not send for non-gif. Default:
|
input.frame_duration_msoptional | integer | Duration of each GIF frame. Send only when `output_format=gif`. Integer milliseconds, default 200, minimum 20, rounded to 10 ms. Do not send for non-gif. Default:
|
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2-6/flare-text-to-image",
"input": {
"prompt": "A cinematic product photo of a red maple leaf on dark stone, soft side light, shallow depth of field, with a small paper tag that reads \"BATCH 07\".",
"aspect_ratio": "auto",
"resolution": "1K"
}
}'Responses and errors
HTTP 200
Request Successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **433**: Request Limit - Sub-key Usage Exceeds Limit - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled Values: |
msgoptional | string | Response message, error description when failed |
datarequired | object | |
data.taskIdrequired | string | Task ID, can be used with Get Task Details endpoint to query task status |
GPT Image 2.6 Sunburst - Text to Image
/api/v1/jobs/createTaskModel IDs: gpt-image-2-6/sunburst-text-to-image
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name used for generation. This endpoint must use `gpt-image-2-6/sunburst-text-to-image`. Values: Default: |
callBackUrloptional | string | Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent. |
inputrequired | object | Input parameters. |
input.promptrequired | string | Text description of the image to generate. Describe the subject, setting, composition, lighting and style. Put any text that should appear in the image in quotes. Required, 1 to 32,000 characters.
|
input.aspect_ratiooptional | string | Aspect ratio. Optional, default `auto`. Supported: `auto`, `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`. Values: Default: |
input.resolutionoptional | string | Resolution tier. Optional, default `1K`. GIF frame pixels do **not** use this table — use `size`. Static-image pixel sizes (width × height): | ratio | 1K | 2K | 4K | |---|---|---|---| | 1:1 / auto | 1024×1024 | 2048×2048 | 2880×2880 | | 3:2 | 1536×1024 | 2048×1360 | 3520×2336 | | 2:3 | 1024×1536 | 1360×2048 | 2336×3520 | | 4:3 | 1024×768 | 2048×1536 | 3312×2480 | | 3:4 | 768×1024 | 1536×2048 | 2480×3312 | | 5:4 | 1280×1024 | 2560×2048 | 3216×2576 | | 4:5 | 1024×1280 | 2048×2560 | 2576×3216 | | 16:9 | 1536×864 | 2048×1152 | 3840×2160 | | 9:16 | 864×1536 | 1152×2048 | 2160×3840 | | 2:1 | 2048×1024 | 2688×1344 | 3840×1920 | | 1:2 | 1024×2048 | 1344×2688 | 1920×3840 | | 21:9 | 2016×864 | 2688×1152 | 3840×1648 | | 9:21 | 864×2016 | 1152×2688 | 1648×3840 | | 3:1 | 1536×512 | 3072×1024 | 3840×1280 | | 1:3 | 512×1536 | 1024×3072 | 1280×3840 | Values: Default: |
input.qualityoptional | string | Quality. Optional, default `medium`. Supported: `low`, `medium`, `high`, `xhigh`, `max`, `auto`. Values: Default: |
input.backgroundoptional | string | Background. Optional, default `auto`. Transparent background is only supported with `png` / `webp`/ `gif`. - `transparent`: transparent background, useful for product cut-outs, icons and stickers. `output_format` must be `png` or `webp` - `opaque`: always a solid background - `auto` (default): the model decides Values: Default: |
input.output_formatoptional | string | Output format. Optional, default `png`. Passing `jpg` is treated as `jpeg`. - Transparent background is only supported with `png` / `webp` Values: Default: |
input.complexityoptional | string | Planning complexity. Optional, default `high`. Supported: `low`, `medium`, `high`. Values: Default: |
input.moderationoptional | string | Moderation strength. Optional, default `low`. Supported: `auto`, `low`. Values: Default: |
input.output_compressionoptional | integer | JPEG / WebP compression, 0–100. Optional. Send only when `output_format` is `jpeg` or `webp`. Do not include this field for other formats.
|
input.sizeoptional | string | GIF **per-frame** pixel size. Send only when `output_format=gif`. Width and height must both be multiples of 16. Optional, default `auto` (currently equivalent to `512x512`). Do not pass ratio names such as `1:1`. Do not send for non-gif. Frames are first packed into a sprite sheet: 2–8 frames use 4×2, 9 frames use 3×3, 10–12 frames use 4×3, 13–16 frames use 4×4. Rows and columns may be swapped to get a closer-to-square layout. The full sheet must have each side ≤ 3840, total pixels ≤ 8,294,400, and long/short side ratio ≤ 3:1, otherwise the request returns 400. - `512x512` works for all 2–16 frames - `768x768` supports at most 12 frames - `1024x1024` exceeds the per-side sheet limit even with only 2 frames Default: |
input.frame_countoptional | integer | GIF frame count. Send only when `output_format=gif`. Integer 2–16, default 9. Do not send for non-gif. Default:
|
input.frame_duration_msoptional | integer | Duration of each GIF frame. Send only when `output_format=gif`. Integer milliseconds, default 200, minimum 20, rounded to 10 ms. Do not send for non-gif. Default:
|
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2-6/sunburst-text-to-image",
"input": {
"prompt": "A cinematic product photo of a red maple leaf on dark stone, soft side light, shallow depth of field, with a small paper tag that reads \"BATCH 07\".",
"aspect_ratio": "auto",
"resolution": "1K"
}
}'Responses and errors
HTTP 200
Request Successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **433**: Request Limit - Sub-key Usage Exceeds Limit - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled Values: |
msgoptional | string | Response message, error description when failed |
datarequired | object | |
data.taskIdrequired | string | Task ID, can be used with Get Task Details endpoint to query task status |
Task status and callbacks
For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.
A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.
Files, logs and billing
Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.
Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.
Send a request using your VezAPI key. Successful generations use your account credits.
/api/v1/jobs/createTaskYour response will appear here.
GPT Image 2.6 API pricing
Rates below are reference estimates; final deductions equal actual discounted consumption, one for one. At the standard pack rate, 1,000 credits ≈ $10. Larger packs reduce the effective credit price.
| Specification | Credits | Unit | USD reference |
|---|---|---|---|
| gpt-image-2-6-sunburst, text-to-image / image-to-image, Image Output | 5400 | per million tokens | $54 |
| gpt-image-2-6-sunburst, text-to-image / image-to-image, Cached Image Input | 360 | per million tokens | $3.6 |
| gpt-image-2-6-sunburst, text-to-image / image-to-image, Image Input | 1440 | per million tokens | $14.4 |
| gpt-image-2-6-sunburst, text-to-image / image-to-image, Cached Text Input | 225 | per million tokens | $2.25 |
| gpt-image-2-6-sunburst, text-to-image / image-to-image, Text Input | 900 | per million tokens | $9 |
| gpt-image-2-6-economy, image-to-image, 1K | 5 | per image | $0.05 |
| gpt-image-2-6-economy, text-to-image, 1K | 5 | per image | $0.05 |
| gpt-image-2-6-flare, text-to-image / image-to-image, Image Output | 5400 | per million tokens | $54 |
| gpt-image-2-6-flare, text-to-image / image-to-image, Cached Image Input | 360 | per million tokens | $3.6 |
| gpt-image-2-6-flare, text-to-image / image-to-image, Image Input | 1440 | per million tokens | $14.4 |
| gpt-image-2-6-flare, text-to-image / image-to-image, Cached Text Input | 225 | per million tokens | $2.25 |
| gpt-image-2-6-flare, text-to-image / image-to-image, Text Input | 900 | per million tokens | $9 |