Skip to content
中文

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.

Base URL: https://api.vezapi.com
Send 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

POST/api/v1/jobs/createTask

Model IDs: gpt-image-2-6/economy-image-to-image

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `gpt-image-2-6/economy-image-to-image`.

Values: "gpt-image-2-6/economy-image-to-image"

Default: "gpt-image-2-6/economy-image-to-image"

callBackUrl
optional
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.

input
required
object

Input parameters for the image-to-image task.

input.prompt
required
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.

minLength: 1

maxLength: 20000

input.input_urls
optional
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.

maxItems: 16

input.aspect_ratio
optional
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: "auto", "1:1", "16:9", "9:16", "3:2", "2:3", "21:9", "4:3"

Default: "auto"

input.background
optional
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: "transparent", "opaque", "auto"

Default: "auto"

input.output_format
optional
string

Output image format. Default `png`. Economy supports `png` only.

Values: "png"

Default: "png"

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

ParameterTypeDescription & constraints
code
optional
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: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description when failed

data
required
object
data.taskId
required
string

Task ID, can be used with Get Task Details endpoint to query task status

GPT Image 2.6 Economy - Text to Image

POST/api/v1/jobs/createTask

Model IDs: gpt-image-2-6/economy-text-to-image

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `gpt-image-2-6/economy-text-to-image`.

Values: "gpt-image-2-6/economy-text-to-image"

Default: "gpt-image-2-6/economy-text-to-image"

callBackUrl
optional
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.

input
required
object

Input parameters for the text-to-image task.

input.prompt
required
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.

minLength: 1

maxLength: 20000

input.aspect_ratio
optional
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: "auto", "1:1", "16:9", "9:16", "3:2", "2:3", "21:9", "4:3"

Default: "auto"

input.background
optional
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: "transparent", "opaque", "auto"

Default: "auto"

input.output_format
optional
string

Output image format. Default `png`. Economy supports `png` and `gif` only.

Values: "png", "gif"

Default: "png"

input.frame_count
optional
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: "auto", "4", "9", "16", "25", "36", "64"

Default: "auto"

input.frame_duration_ms
optional
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

ParameterTypeDescription & constraints
code
optional
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: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description when failed

data
required
object
data.taskId
required
string

Task ID, can be used with Get Task Details endpoint to query task status

GPT Image 2.6 Flare - Text to Image

POST/api/v1/jobs/createTask

Model IDs: gpt-image-2-6/flare-text-to-image

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `gpt-image-2-6/flare-text-to-image`.

Values: "gpt-image-2-6/flare-text-to-image"

Default: "gpt-image-2-6/flare-text-to-image"

callBackUrl
optional
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.

input
required
object

Input parameters.

input.prompt
required
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.

minLength: 1

maxLength: 32000

input.aspect_ratio
optional
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: "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"

Default: "auto"

input.resolution
optional
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: "1K", "2K", "4K"

Default: "1K"

input.quality
optional
string

Quality. Optional, default `medium`. Supported: `low`, `medium`, `high`, `xhigh`, `max`, `auto`.

Values: "low", "medium", "high", "xhigh", "max", "auto"

Default: "medium"

input.background
optional
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: "transparent", "opaque", "auto"

Default: "auto"

input.output_format
optional
string

Output format. Optional, default `png`. Passing `jpg` is treated as `jpeg`. - Transparent background is only supported with `png` / `webp`

Values: "png", "jpeg", "webp", "gif"

Default: "png"

input.complexity
optional
string

Planning complexity. Optional, default `high`. Supported: `low`, `medium`, `high`.

Values: "low", "medium", "high"

Default: "high"

input.moderation
optional
string

Moderation strength. Optional, default `low`. Supported: `auto`, `low`.

Values: "auto", "low"

Default: "low"

input.output_compression
optional
integer

JPEG / WebP compression, 0–100. Optional. Send only when `output_format` is `jpeg` or `webp`. Do not include this field for other formats.

minimum: 0

maximum: 100

input.size
optional
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: "auto"

input.frame_count
optional
integer

GIF frame count. Send only when `output_format=gif`. Integer 2–16, default 9. Do not send for non-gif.

Default: 9

minimum: 2

maximum: 16

input.frame_duration_ms
optional
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: 200

minimum: 20

maximum: 2000

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

ParameterTypeDescription & constraints
code
optional
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: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description when failed

data
required
object
data.taskId
required
string

Task ID, can be used with Get Task Details endpoint to query task status

GPT Image 2.6 Sunburst - Text to Image

POST/api/v1/jobs/createTask

Model IDs: gpt-image-2-6/sunburst-text-to-image

ParameterTypeDescription & constraints
model
required
string

The model name used for generation. This endpoint must use `gpt-image-2-6/sunburst-text-to-image`.

Values: "gpt-image-2-6/sunburst-text-to-image"

Default: "gpt-image-2-6/sunburst-text-to-image"

callBackUrl
optional
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.

input
required
object

Input parameters.

input.prompt
required
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.

minLength: 1

maxLength: 32000

input.aspect_ratio
optional
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: "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"

Default: "auto"

input.resolution
optional
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: "1K", "2K", "4K"

Default: "1K"

input.quality
optional
string

Quality. Optional, default `medium`. Supported: `low`, `medium`, `high`, `xhigh`, `max`, `auto`.

Values: "low", "medium", "high", "xhigh", "max", "auto"

Default: "medium"

input.background
optional
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: "transparent", "opaque", "auto"

Default: "auto"

input.output_format
optional
string

Output format. Optional, default `png`. Passing `jpg` is treated as `jpeg`. - Transparent background is only supported with `png` / `webp`

Values: "png", "jpeg", "webp", "gif"

Default: "png"

input.complexity
optional
string

Planning complexity. Optional, default `high`. Supported: `low`, `medium`, `high`.

Values: "low", "medium", "high"

Default: "high"

input.moderation
optional
string

Moderation strength. Optional, default `low`. Supported: `auto`, `low`.

Values: "auto", "low"

Default: "low"

input.output_compression
optional
integer

JPEG / WebP compression, 0–100. Optional. Send only when `output_format` is `jpeg` or `webp`. Do not include this field for other formats.

minimum: 0

maximum: 100

input.size
optional
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: "auto"

input.frame_count
optional
integer

GIF frame count. Send only when `output_format=gif`. Integer 2–16, default 9. Do not send for non-gif.

Default: 9

minimum: 2

maximum: 16

input.frame_duration_ms
optional
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: 200

minimum: 20

maximum: 2000

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

ParameterTypeDescription & constraints
code
optional
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: 200, 401, 402, 404, 422, 429, 433, 455, 500, 501, 505

msg
optional
string

Response message, error description when failed

data
required
object
data.taskId
required
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.