GPT Image 2.5 API, GPT Image 2 API, GPT Image 1.5 API: Pricing, Documentation
by OpenAI
GPT Image leverages OpenAI's advanced multimodal capabilities to generate and manipulate images with unprecedented understanding of context and intent. Through Pixazo's API, developers can create images that accurately reflect complex prompts, edit existing images with natural language instructions, and generate variations. The API combines GPT's language understanding with powerful image generation for intuitive creative workflows.

Models Version
Get 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
GPT Image 2.5 Flare API Documentation
https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/text-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - GPT Image 2.5 Flare
Request Code
POST https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A serene sunset over mountains"
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A serene sunset over mountains"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/text-to-image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
prompt: 'A serene sunset over mountains'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/text-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A serene sunset over mountains"
}'
Output
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-flare",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-flare",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Text to Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Up to 32,000 characters | Text description of the desired image. Must be non-empty. Every request carries a prompt charge that scales with prompt length — see the pricing panel. |
n | No | integer | 1 | 1–10 | Number of images to generate in one request. |
size | No | string | "auto" | 1024x1024, 1024x1536, 1536x1024, 2048x2048, 2048x1152, 2160x3840, 3840x2160, auto, or custom W×H | Output dimensions. Custom sizes: both edges multiples of 16px, longest edge up to 3840px, aspect ratio up to 3:1, total pixels 655,360–8,294,400. Sizes outside the listed grid are billed at the next larger listed size. |
quality | No | string | "auto" | low, medium, high, xhigh, max, auto | Sets how much detail is rendered. xhigh and max render more detail than high at a higher cost; max looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
format | No | string | "png" | png, jpeg, webp | Output file format. jpeg is fastest. |
output_compression | No | integer | 100 | 0–100 | Sets how hard the image is squeezed when it is saved as a JPEG or WebP — lower means a smaller file with softer detail. It has no effect on PNG. |
background | No | string | "auto" | opaque, auto, transparent | Sets how the background is handled. opaque fills it in, transparent returns a cut-out with an alpha channel and needs png or webp output, and auto lets GPT Image 2.5 Flare decide. |
moderation | No | string | "auto" | auto, low | Sets how strictly your prompt and the result are checked for sensitive content. Auto is the standard filter; Low is less restrictive. |
Example Request
{
"prompt": "Photorealistic 2K landscape of a fjord at golden hour, dramatic clouds, ultra-detailed",
"n": 4,
"size": "2048x1152",
"quality": "high",
"format": "webp",
"output_compression": 80,
"background": "opaque",
"moderation": "low"
}
Response
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-2-5-flare' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-flare",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-flare",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Prompting Guide
GPT Image 2.5 Flare responds best to prompts that read like a brief to a photographer or illustrator: subject first, then framing, light and mood, then the details that must be exact.
| Technique | How to use it |
|---|---|
| Subject, framing, setting | Lead with the subject in the first clause, then say how close the camera is and from what angle, then describe the environment. Full sentences with one idea each work better than a pile of keywords. |
| Medium and mood | Name the medium and an era or mood: “studio photograph”, “editorial illustration”, “flat vector icon”, “clay render”, “film still, late 1970s”. Without a medium the model picks one for you. |
| Light and lens | Say where the light comes from and what it is like (soft window light from the left, overcast, golden-hour backlight, hard studio flash) and add a lens or depth cue (85mm portrait, wide environmental shot, macro, shallow depth of field). |
| Composition and empty space | Say where the subject sits in the frame and where you need clear space for a headline or logo. For product shots ask for a plain backdrop and describe its colour. |
| Exact on-image text | Put the words in quotes, say where they go and how the letters should feel (“bold condensed sans”, “hand-lettered”). Keep it short. For dense text, tables, diagrams or tiny type set quality to xhigh or max, and use a larger size so small letters get more pixels. |
| Colour | Two or three named colours, or a palette phrase such as “muted earth tones” or “brand blue on white”. |
| What to leave out | There is no negative-prompt parameter. State exclusions in plain language inside the prompt: “no people, no logo, no watermark, no extra text”. |
| Variations and iteration | Set n up to 10 to explore several takes of one prompt. Refine by changing one clause at a time, and carry the best result into the Image to Image (Image Editing) operation for targeted changes. |
| Quality on this model | auto renders at the low tier on GPT Image 2.5, which is ideal for drafts. Set quality explicitly for anything final. |
| Filtering | If the standard filter blocks content that is allowed for your use case, set moderation to low. |
| Transparent cut-outs | For logos, icons and product cut-outs set background to transparent with format png or webp. Describe the subject only and ask for “no backdrop, no shadow”. |
| Which model | Flare is the default: the fastest of the two and the right choice for one-shot generations. If you already know the image will go through several rounds of precise edits, start on Sunburst so the subject and layout carry across turns. |
Prompt skeleton
{
"prompt": "A matte black ceramic pour-over coffee dripper on a pale oak counter, medium close-up from slightly above, soft morning window light from the left, shallow depth of field, minimal kitchen, clear space on the right third for a headline, no text, no people, no logo.",
"quality": "high",
"size": "1536x1024",
"format": "png",
"n": 2
}Choosing quality, size and format
| Goal | Settings |
|---|---|
| Quick drafts | quality low, format jpeg with output_compression around 70. |
| Final hero image | quality high; step up to xhigh or max when fine detail matters. |
| Dense text, tables, diagrams | quality xhigh or max, format png, and a larger size. |
| Portrait for social | size 1024x1536. |
| Wide banner or slide | size 2048x1152, or 3840x2160 for 4K. |
| Custom frame | Any width and height that are multiples of 16, with an aspect ratio up to 3:1 and a long edge up to 3840px, within the documented pixel range. A custom size is billed at the nearest listed size. |
| Cut-out with alpha | background transparent with format png or webp. |
| Smaller files | format jpeg or webp with output_compression; it has no effect on png. |
GPT Image 2.5 Flare API Pricing
| Resolution | Base price (USD) | Per image (USD) |
|---|---|---|
| 1024x768 (Low) | $0.00525 | $0.0084 |
| 1024x1024 (Low) | $0.0063 | $0.00945 |
| 1024x1536 (Low) | $0.00525 | $0.0084 |
| 1536x1024 (Low) | $0.00525 | $0.0084 |
| 1920x1088 (Low) | $0.00525 | $0.0084 |
| 2560x1440 (Low) | $0.00735 | $0.0105 |
| 3840x2160 (Low) | $0.0126 | $0.01575 |
| 1024x768 (Medium) | $0.0105 | $0.01365 |
| 1024x1024 (Medium) | $0.0147 | $0.01785 |
| 1024x1536 (Medium) | $0.01155 | $0.0147 |
| 1536x1024 (Medium) | $0.01155 | $0.0147 |
| 1920x1088 (Medium) | $0.01155 | $0.0147 |
| 2560x1440 (Medium) | $0.01575 | $0.0189 |
| 3840x2160 (Medium) | $0.0273 | $0.03045 |
| 1024x768 (High) | $0.03885 | $0.042 |
| 1024x1024 (High) | $0.05565 | $0.0588 |
| 1024x1536 (High) | $0.0441 | $0.04725 |
| 1536x1024 (High) | $0.0441 | $0.04725 |
| 1920x1088 (High) | $0.042 | $0.04515 |
| 2560x1440 (High) | $0.0588 | $0.06195 |
| 3840x2160 (High) | $0.10605 | $0.1092 |
| 1024x768 (XHigh) | $0.06825 | $0.0714 |
| 1024x1024 (XHigh) | $0.0987 | $0.10185 |
| 1024x1536 (XHigh) | $0.0777 | $0.08085 |
| 1536x1024 (XHigh) | $0.0777 | $0.08085 |
| 1920x1088 (XHigh) | $0.07455 | $0.0777 |
| 2560x1440 (XHigh) | $0.10395 | $0.1071 |
| 3840x2160 (XHigh) | $0.1869 | $0.19005 |
| 1024x768 (Max) | $0.15225 | $0.1554 |
| 1024x1024 (Max) | $0.22155 | $0.2247 |
| 1024x1536 (Max) | $0.17325 | $0.1764 |
| 1536x1024 (Max) | $0.17325 | $0.1764 |
| 1920x1088 (Max) | $0.16695 | $0.1701 |
| 2560x1440 (Max) | $0.2331 | $0.23625 |
| 3840x2160 (Max) | $0.42105 | $0.4242 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.0126 per input image | image-to-image edits only |
GPT Image 2.5 Flare API Documentation
https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/image-to-image/editing
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Image (Edit Image) - GPT Image 2.5 Flare
Request Code
POST https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/image-to-image/editing
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/image-to-image/editing"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/image-to-image/editing';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
prompt: 'Add a flamingo to the pool',
image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/image-to-image/editing" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}'
Output
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-flare",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-flare",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Image Edit
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Up to 32,000 characters | Text instruction describing the edit. Must be non-empty. Every request carries a prompt charge that scales with prompt length — see the pricing panel. |
image | Yes | string or string[] | — | Up to 16 images | Upload the image you want to edit. Add up to 16 to combine them into a single result. JPG, PNG or WebP; under 50 MB each. Each input image is billed in addition to the output — see the pricing panel. |
mask | No | string | — | PNG with an alpha channel, same dimensions as the first input image | Optional. Upload a PNG the same size as your image, with the parts you want changed fully see-through and everything you want kept solid. Under 4 MB. It applies to the first image. |
n | No | integer | 1 | 1–10 | Number of output variations to generate. |
size | No | string | "auto" | 1024x1024, 1024x1536, 1536x1024, 2048x2048, 2048x1152, 2160x3840, 3840x2160, auto, or custom W×H | Output dimensions. Custom sizes: both edges multiples of 16px, longest edge up to 3840px, aspect ratio up to 3:1, total pixels 655,360–8,294,400. Sizes outside the listed grid are billed at the next larger listed size. |
quality | No | string | "auto" | low, medium, high, xhigh, max, auto | Sets how much detail is rendered. xhigh and max render more detail than high at a higher cost; max looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
format | No | string | "png" | png, jpeg, webp | Output file format. jpeg is fastest. |
output_compression | No | integer | 100 | 0–100 | Sets how hard the image is squeezed when it is saved as a JPEG or WebP — lower means a smaller file with softer detail. It has no effect on PNG. |
background | No | string | "auto" | opaque, auto, transparent | Sets how the background is handled. opaque fills it in, transparent returns a cut-out with an alpha channel and needs png or webp output, and auto lets GPT Image 2.5 Flare decide. |
moderation | No | string | "auto" | auto, low | Sets how strictly your prompt and the result are checked for sensitive content. Auto is the standard filter; Low is less restrictive. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 16 | JPG, PNG, WEBP · < 50 MB | Image(s) to edit (up to 16). |
| mask | 1 | PNG with an alpha channel · < 4 MB | Optional mask; must match image size. Transparent pixels mark the region to edit. |
Input image requirements: HTTPS URL or data:image/...;base64,... data-URI. PNG, JPEG, or WEBP. Multiple input images may be combined in a single edit request via the image array.
Edit-specific Notes
imageas array — each entry is independently resolved (URL fetched, or base64 decoded). All are uploaded as repeatedimage[]parts. Useful for "combine these references" workflows.masksemantics — must match the input image's dimensions. The mask must be a PNG with an alpha channel — fully transparent pixels mark the region to edit, opaque pixels are preserved. A flat black & white PNG carries no alpha channel and is rejected before the request reaches the model, because a fully opaque image selects nothing. Ifmaskis omitted, the entire image is in scope for the edit.- Multi-image + mask together — allowed, but the mask applies to the first input image only.
transparentbackground — NOT supported on gpt-image-2-5-flare (onlyopaqueandauto).
Example Request
{
"prompt": "Compose a gift basket containing all items, photorealistic, white background, with a Relax & Unwind ribbon",
"image": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-lite-text-to-image_019ecace-485b-7447-c8d1-ce0344929afed/output.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/nano-banana-pro_019ed0b0-e2d6-70d5-7724-7322947d78d18/output.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1781619282400-0.webp"
],
"n": 1,
"size": "1024x1024",
"quality": "high",
"format": "png",
"output_compression": 90,
"background": "opaque",
"moderation": "auto"
}
Response
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-2-5-flare' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-flare",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-flare",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-flare_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Prompting Guide
For edits on GPT Image 2.5 Flare, the prompt is an instruction, not a scene description: say what changes, and list what must stay the same.
| Technique | How to use it |
|---|---|
| Change one thing, name what stays | Say exactly what changes and list what must not: “Change only the jacket to a navy wool coat. Keep the face, pose, lighting, background and label text unchanged.” An explicit preserve list on every request is the single biggest improvement. |
| Instruction, not description | Give the edit as an instruction (“replace the sofa with a tan leather armchair”) rather than re-describing the whole scene, which invites the model to redraw more than you asked. |
| Several inputs, roles by order | Pass up to 16 images in image and assign each a role by position: “image 1 is the product, image 2 is the backdrop, image 3 sets the lighting mood”. The first image sets the frame and is the one a mask applies to. |
| Masks | mask is a PNG with an alpha channel at the same size as the first image. See-through pixels mark the area that may change; describe only what should fill that area, and leave a small margin around the object. |
| Multi-turn consistency | Feed the previous output back in as image, repeat the preserve list and change one thing per turn. That keeps a character or product recognisable across a series. |
| Restyle | Name the target medium (“render this as a flat vector poster”) and say what must survive: composition, subject, any text. |
| Text edits | Quote the replacement text exactly and say where it goes. Use quality xhigh or max when the type is small. |
| Frame | Leave size at auto to keep the input’s shape; set an explicit size only when you want a different frame. |
| Filtering and variations | moderation low relaxes the standard filter for allowed content; n above 1 returns several candidates to pick from. |
| Transparent cut-outs | To lift a subject off its background set background to transparent with format png or webp and ask for “subject only, no backdrop, no shadow”. |
| Which model | Flare handles quick single edits well. If you are building a sequence of edits on the same subject, Sunburst holds identity and layout across turns more reliably. |
Prompt skeleton
{
"prompt": "Image 1 is the product, image 2 is the backdrop. Place the product on the backdrop and match the backdrop's light direction. Keep the product's shape, label text and colours unchanged. No extra props, no added text.",
"image": [
"https://your-server.com/product.png",
"https://your-server.com/backdrop.jpg"
],
"quality": "high",
"size": "auto",
"format": "png"
}Choosing quality, size and format
| Goal | Settings |
|---|---|
| Quick drafts | quality low, format jpeg with output_compression around 70. |
| Final hero image | quality high; step up to xhigh or max when fine detail matters. |
| Dense text, tables, diagrams | quality xhigh or max, format png, and a larger size. |
| Portrait for social | size 1024x1536. |
| Wide banner or slide | size 2048x1152, or 3840x2160 for 4K. |
| Custom frame | Any width and height that are multiples of 16, with an aspect ratio up to 3:1 and a long edge up to 3840px, within the documented pixel range. A custom size is billed at the nearest listed size. |
| Cut-out with alpha | background transparent with format png or webp. |
| Smaller files | format jpeg or webp with output_compression; it has no effect on png. |
GPT Image 2.5 Flare API Pricing
| Resolution | Base price (USD) | Per image, 1 input image (USD) |
|---|---|---|
| 1024x768 (Low) | $0.00525 | $0.021 |
| 1024x1024 (Low) | $0.0063 | $0.02205 |
| 1024x1536 (Low) | $0.00525 | $0.021 |
| 1536x1024 (Low) | $0.00525 | $0.021 |
| 1920x1088 (Low) | $0.00525 | $0.021 |
| 2560x1440 (Low) | $0.00735 | $0.0231 |
| 3840x2160 (Low) | $0.0126 | $0.02835 |
| 1024x768 (Medium) | $0.0105 | $0.02625 |
| 1024x1024 (Medium) | $0.0147 | $0.03045 |
| 1024x1536 (Medium) | $0.01155 | $0.0273 |
| 1536x1024 (Medium) | $0.01155 | $0.0273 |
| 1920x1088 (Medium) | $0.01155 | $0.0273 |
| 2560x1440 (Medium) | $0.01575 | $0.0315 |
| 3840x2160 (Medium) | $0.0273 | $0.04305 |
| 1024x768 (High) | $0.03885 | $0.0546 |
| 1024x1024 (High) | $0.05565 | $0.0714 |
| 1024x1536 (High) | $0.0441 | $0.05985 |
| 1536x1024 (High) | $0.0441 | $0.05985 |
| 1920x1088 (High) | $0.042 | $0.05775 |
| 2560x1440 (High) | $0.0588 | $0.07455 |
| 3840x2160 (High) | $0.10605 | $0.1218 |
| 1024x768 (XHigh) | $0.06825 | $0.084 |
| 1024x1024 (XHigh) | $0.0987 | $0.11445 |
| 1024x1536 (XHigh) | $0.0777 | $0.09345 |
| 1536x1024 (XHigh) | $0.0777 | $0.09345 |
| 1920x1088 (XHigh) | $0.07455 | $0.0903 |
| 2560x1440 (XHigh) | $0.10395 | $0.1197 |
| 3840x2160 (XHigh) | $0.1869 | $0.20265 |
| 1024x768 (Max) | $0.15225 | $0.168 |
| 1024x1024 (Max) | $0.22155 | $0.2373 |
| 1024x1536 (Max) | $0.17325 | $0.189 |
| 1536x1024 (Max) | $0.17325 | $0.189 |
| 1920x1088 (Max) | $0.16695 | $0.1827 |
| 2560x1440 (Max) | $0.2331 | $0.24885 |
| 3840x2160 (Max) | $0.42105 | $0.4368 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.0126 per input image | image-to-image edits only |
GPT Image 2.5 Sunburst API Documentation
https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/text-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - GPT Image 2.5 Sunburst
Request Code
POST https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A serene sunset over mountains"
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A serene sunset over mountains"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/text-to-image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
prompt: 'A serene sunset over mountains'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/text-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A serene sunset over mountains"
}'
Output
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-sunburst",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-sunburst",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Text to Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Up to 32,000 characters | Text description of the desired image. Must be non-empty. Every request carries a prompt charge that scales with prompt length — see the pricing panel. |
n | No | integer | 1 | 1–10 | Number of images to generate in one request. |
size | No | string | "auto" | 1024x1024, 1024x1536, 1536x1024, 2048x2048, 2048x1152, 2160x3840, 3840x2160, auto, or custom W×H | Output dimensions. Custom sizes: both edges multiples of 16px, longest edge up to 3840px, aspect ratio up to 3:1, total pixels 655,360–8,294,400. Sizes outside the listed grid are billed at the next larger listed size. |
quality | No | string | "auto" | low, medium, high, xhigh, max, auto | Sets how much detail is rendered. xhigh and max render more detail than high at a higher cost; max looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
format | No | string | "png" | png, jpeg, webp | Output file format. jpeg is fastest. |
output_compression | No | integer | 100 | 0–100 | Sets how hard the image is squeezed when it is saved as a JPEG or WebP — lower means a smaller file with softer detail. It has no effect on PNG. |
background | No | string | "auto" | opaque, auto, transparent | Sets how the background is handled. opaque fills it in, transparent returns a cut-out with an alpha channel and needs png or webp output, and auto lets GPT Image 2.5 Sunburst decide. |
moderation | No | string | "auto" | auto, low | Sets how strictly your prompt and the result are checked for sensitive content. Auto is the standard filter; Low is less restrictive. |
Example Request
{
"prompt": "Photorealistic 2K landscape of a fjord at golden hour, dramatic clouds, ultra-detailed",
"n": 4,
"size": "2048x1152",
"quality": "high",
"format": "webp",
"output_compression": 80,
"background": "opaque",
"moderation": "low"
}
Response
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-2-5-sunburst' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-sunburst",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-sunburst",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Prompting Guide
GPT Image 2.5 Sunburst responds best to prompts that read like a brief to a photographer or illustrator: subject first, then framing, light and mood, then the details that must be exact.
| Technique | How to use it |
|---|---|
| Subject, framing, setting | Lead with the subject in the first clause, then say how close the camera is and from what angle, then describe the environment. Full sentences with one idea each work better than a pile of keywords. |
| Medium and mood | Name the medium and an era or mood: “studio photograph”, “editorial illustration”, “flat vector icon”, “clay render”, “film still, late 1970s”. Without a medium the model picks one for you. |
| Light and lens | Say where the light comes from and what it is like (soft window light from the left, overcast, golden-hour backlight, hard studio flash) and add a lens or depth cue (85mm portrait, wide environmental shot, macro, shallow depth of field). |
| Composition and empty space | Say where the subject sits in the frame and where you need clear space for a headline or logo. For product shots ask for a plain backdrop and describe its colour. |
| Exact on-image text | Put the words in quotes, say where they go and how the letters should feel (“bold condensed sans”, “hand-lettered”). Keep it short. For dense text, tables, diagrams or tiny type set quality to xhigh or max, and use a larger size so small letters get more pixels. |
| Colour | Two or three named colours, or a palette phrase such as “muted earth tones” or “brand blue on white”. |
| What to leave out | There is no negative-prompt parameter. State exclusions in plain language inside the prompt: “no people, no logo, no watermark, no extra text”. |
| Variations and iteration | Set n up to 10 to explore several takes of one prompt. Refine by changing one clause at a time, and carry the best result into the Image to Image (Image Editing) operation for targeted changes. |
| Quality on this model | auto renders at the low tier on GPT Image 2.5, which is ideal for drafts. Set quality explicitly for anything final. |
| Filtering | If the standard filter blocks content that is allowed for your use case, set moderation to low. |
| Transparent cut-outs | For logos, icons and product cut-outs set background to transparent with format png or webp. Describe the subject only and ask for “no backdrop, no shadow”. |
| Which model | Sunburst is the slower, precision variant: use it when the image will be edited across several turns and the subject, layout and lighting must stay put. For quick single generations, Flare is faster. |
Prompt skeleton
{
"prompt": "A matte black ceramic pour-over coffee dripper on a pale oak counter, medium close-up from slightly above, soft morning window light from the left, shallow depth of field, minimal kitchen, clear space on the right third for a headline, no text, no people, no logo.",
"quality": "high",
"size": "1536x1024",
"format": "png",
"n": 2
}Choosing quality, size and format
| Goal | Settings |
|---|---|
| Quick drafts | quality low, format jpeg with output_compression around 70. |
| Final hero image | quality high; step up to xhigh or max when fine detail matters. |
| Dense text, tables, diagrams | quality xhigh or max, format png, and a larger size. |
| Portrait for social | size 1024x1536. |
| Wide banner or slide | size 2048x1152, or 3840x2160 for 4K. |
| Custom frame | Any width and height that are multiples of 16, with an aspect ratio up to 3:1 and a long edge up to 3840px, within the documented pixel range. A custom size is billed at the nearest listed size. |
| Cut-out with alpha | background transparent with format png or webp. |
| Smaller files | format jpeg or webp with output_compression; it has no effect on png. |
GPT Image 2.5 Sunburst API Pricing
| Resolution | Base price (USD) | Per image (USD) |
|---|---|---|
| 1024x768 (Low) | $0.00525 | $0.0084 |
| 1024x1024 (Low) | $0.0063 | $0.00945 |
| 1024x1536 (Low) | $0.00525 | $0.0084 |
| 1536x1024 (Low) | $0.00525 | $0.0084 |
| 1920x1088 (Low) | $0.00525 | $0.0084 |
| 2560x1440 (Low) | $0.00735 | $0.0105 |
| 3840x2160 (Low) | $0.0126 | $0.01575 |
| 1024x768 (Medium) | $0.0105 | $0.01365 |
| 1024x1024 (Medium) | $0.0147 | $0.01785 |
| 1024x1536 (Medium) | $0.01155 | $0.0147 |
| 1536x1024 (Medium) | $0.01155 | $0.0147 |
| 1920x1088 (Medium) | $0.01155 | $0.0147 |
| 2560x1440 (Medium) | $0.01575 | $0.0189 |
| 3840x2160 (Medium) | $0.0273 | $0.03045 |
| 1024x768 (High) | $0.03885 | $0.042 |
| 1024x1024 (High) | $0.05565 | $0.0588 |
| 1024x1536 (High) | $0.0441 | $0.04725 |
| 1536x1024 (High) | $0.0441 | $0.04725 |
| 1920x1088 (High) | $0.042 | $0.04515 |
| 2560x1440 (High) | $0.0588 | $0.06195 |
| 3840x2160 (High) | $0.10605 | $0.1092 |
| 1024x768 (XHigh) | $0.06825 | $0.0714 |
| 1024x1024 (XHigh) | $0.0987 | $0.10185 |
| 1024x1536 (XHigh) | $0.0777 | $0.08085 |
| 1536x1024 (XHigh) | $0.0777 | $0.08085 |
| 1920x1088 (XHigh) | $0.07455 | $0.0777 |
| 2560x1440 (XHigh) | $0.10395 | $0.1071 |
| 3840x2160 (XHigh) | $0.1869 | $0.19005 |
| 1024x768 (Max) | $0.15225 | $0.1554 |
| 1024x1024 (Max) | $0.22155 | $0.2247 |
| 1024x1536 (Max) | $0.17325 | $0.1764 |
| 1536x1024 (Max) | $0.17325 | $0.1764 |
| 1920x1088 (Max) | $0.16695 | $0.1701 |
| 2560x1440 (Max) | $0.2331 | $0.23625 |
| 3840x2160 (Max) | $0.42105 | $0.4242 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.0126 per input image | image-to-image edits only |
GPT Image 2.5 Sunburst API Documentation
https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/image-to-image/editing
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Image (Edit Image) - GPT Image 2.5 Sunburst
Request Code
POST https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/image-to-image/editing
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/image-to-image/editing"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/image-to-image/editing';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
prompt: 'Add a flamingo to the pool',
image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/gpt-image-2-5-sunburst/v1/image-to-image/editing" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}'
Output
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-sunburst",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-sunburst",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Image Edit
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Up to 32,000 characters | Text instruction describing the edit. Must be non-empty. Every request carries a prompt charge that scales with prompt length — see the pricing panel. |
image | Yes | string or string[] | — | Up to 16 images | Upload the image you want to edit. Add up to 16 to combine them into a single result. JPG, PNG or WebP; under 50 MB each. Each input image is billed in addition to the output — see the pricing panel. |
mask | No | string | — | PNG with an alpha channel, same dimensions as the first input image | Optional. Upload a PNG the same size as your image, with the parts you want changed fully see-through and everything you want kept solid. Under 4 MB. It applies to the first image. |
n | No | integer | 1 | 1–10 | Number of output variations to generate. |
size | No | string | "auto" | 1024x1024, 1024x1536, 1536x1024, 2048x2048, 2048x1152, 2160x3840, 3840x2160, auto, or custom W×H | Output dimensions. Custom sizes: both edges multiples of 16px, longest edge up to 3840px, aspect ratio up to 3:1, total pixels 655,360–8,294,400. Sizes outside the listed grid are billed at the next larger listed size. |
quality | No | string | "auto" | low, medium, high, xhigh, max, auto | Sets how much detail is rendered. xhigh and max render more detail than high at a higher cost; max looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
format | No | string | "png" | png, jpeg, webp | Output file format. jpeg is fastest. |
output_compression | No | integer | 100 | 0–100 | Sets how hard the image is squeezed when it is saved as a JPEG or WebP — lower means a smaller file with softer detail. It has no effect on PNG. |
background | No | string | "auto" | opaque, auto, transparent | Sets how the background is handled. opaque fills it in, transparent returns a cut-out with an alpha channel and needs png or webp output, and auto lets GPT Image 2.5 Sunburst decide. |
moderation | No | string | "auto" | auto, low | Sets how strictly your prompt and the result are checked for sensitive content. Auto is the standard filter; Low is less restrictive. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 16 | JPG, PNG, WEBP · < 50 MB | Image(s) to edit (up to 16). |
| mask | 1 | PNG with an alpha channel · < 4 MB | Optional mask; must match image size. Transparent pixels mark the region to edit. |
Input image requirements: HTTPS URL or data:image/...;base64,... data-URI. PNG, JPEG, or WEBP. Multiple input images may be combined in a single edit request via the image array.
Edit-specific Notes
imageas array — each entry is independently resolved (URL fetched, or base64 decoded). All are uploaded as repeatedimage[]parts. Useful for "combine these references" workflows.masksemantics — must match the input image's dimensions. The mask must be a PNG with an alpha channel — fully transparent pixels mark the region to edit, opaque pixels are preserved. A flat black & white PNG carries no alpha channel and is rejected before the request reaches the model, because a fully opaque image selects nothing. Ifmaskis omitted, the entire image is in scope for the edit.- Multi-image + mask together — allowed, but the mask applies to the first input image only.
transparentbackground — NOT supported on gpt-image-2-5-sunburst (onlyopaqueandauto).
Example Request
{
"prompt": "Compose a gift basket containing all items, photorealistic, white background, with a Relax & Unwind ribbon",
"image": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-lite-text-to-image_019ecace-485b-7447-c8d1-ce0344929afed/output.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/nano-banana-pro_019ed0b0-e2d6-70d5-7724-7322947d78d18/output.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1781619282400-0.webp"
],
"n": 1,
"size": "1024x1024",
"quality": "high",
"format": "png",
"output_compression": 90,
"background": "opaque",
"moderation": "auto"
}
Response
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-2-5-sunburst' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2-5-sunburst",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2-5-sunburst",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2-5-sunburst_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Prompting Guide
For edits on GPT Image 2.5 Sunburst, the prompt is an instruction, not a scene description: say what changes, and list what must stay the same.
| Technique | How to use it |
|---|---|
| Change one thing, name what stays | Say exactly what changes and list what must not: “Change only the jacket to a navy wool coat. Keep the face, pose, lighting, background and label text unchanged.” An explicit preserve list on every request is the single biggest improvement. |
| Instruction, not description | Give the edit as an instruction (“replace the sofa with a tan leather armchair”) rather than re-describing the whole scene, which invites the model to redraw more than you asked. |
| Several inputs, roles by order | Pass up to 16 images in image and assign each a role by position: “image 1 is the product, image 2 is the backdrop, image 3 sets the lighting mood”. The first image sets the frame and is the one a mask applies to. |
| Masks | mask is a PNG with an alpha channel at the same size as the first image. See-through pixels mark the area that may change; describe only what should fill that area, and leave a small margin around the object. |
| Multi-turn consistency | Feed the previous output back in as image, repeat the preserve list and change one thing per turn. That keeps a character or product recognisable across a series. |
| Restyle | Name the target medium (“render this as a flat vector poster”) and say what must survive: composition, subject, any text. |
| Text edits | Quote the replacement text exactly and say where it goes. Use quality xhigh or max when the type is small. |
| Frame | Leave size at auto to keep the input’s shape; set an explicit size only when you want a different frame. |
| Filtering and variations | moderation low relaxes the standard filter for allowed content; n above 1 returns several candidates to pick from. |
| Transparent cut-outs | To lift a subject off its background set background to transparent with format png or webp and ask for “subject only, no backdrop, no shadow”. |
| Which model | Sunburst is built for multi-turn editing: it holds the subject’s identity, the layout and the lighting steady from one edit to the next. Repeat your preserve list on every turn all the same. |
Prompt skeleton
{
"prompt": "Image 1 is the product, image 2 is the backdrop. Place the product on the backdrop and match the backdrop's light direction. Keep the product's shape, label text and colours unchanged. No extra props, no added text.",
"image": [
"https://your-server.com/product.png",
"https://your-server.com/backdrop.jpg"
],
"quality": "high",
"size": "auto",
"format": "png"
}Choosing quality, size and format
| Goal | Settings |
|---|---|
| Quick drafts | quality low, format jpeg with output_compression around 70. |
| Final hero image | quality high; step up to xhigh or max when fine detail matters. |
| Dense text, tables, diagrams | quality xhigh or max, format png, and a larger size. |
| Portrait for social | size 1024x1536. |
| Wide banner or slide | size 2048x1152, or 3840x2160 for 4K. |
| Custom frame | Any width and height that are multiples of 16, with an aspect ratio up to 3:1 and a long edge up to 3840px, within the documented pixel range. A custom size is billed at the nearest listed size. |
| Cut-out with alpha | background transparent with format png or webp. |
| Smaller files | format jpeg or webp with output_compression; it has no effect on png. |
GPT Image 2.5 Sunburst API Pricing
| Resolution | Base price (USD) | Per image, 1 input image (USD) |
|---|---|---|
| 1024x768 (Low) | $0.00525 | $0.021 |
| 1024x1024 (Low) | $0.0063 | $0.02205 |
| 1024x1536 (Low) | $0.00525 | $0.021 |
| 1536x1024 (Low) | $0.00525 | $0.021 |
| 1920x1088 (Low) | $0.00525 | $0.021 |
| 2560x1440 (Low) | $0.00735 | $0.0231 |
| 3840x2160 (Low) | $0.0126 | $0.02835 |
| 1024x768 (Medium) | $0.0105 | $0.02625 |
| 1024x1024 (Medium) | $0.0147 | $0.03045 |
| 1024x1536 (Medium) | $0.01155 | $0.0273 |
| 1536x1024 (Medium) | $0.01155 | $0.0273 |
| 1920x1088 (Medium) | $0.01155 | $0.0273 |
| 2560x1440 (Medium) | $0.01575 | $0.0315 |
| 3840x2160 (Medium) | $0.0273 | $0.04305 |
| 1024x768 (High) | $0.03885 | $0.0546 |
| 1024x1024 (High) | $0.05565 | $0.0714 |
| 1024x1536 (High) | $0.0441 | $0.05985 |
| 1536x1024 (High) | $0.0441 | $0.05985 |
| 1920x1088 (High) | $0.042 | $0.05775 |
| 2560x1440 (High) | $0.0588 | $0.07455 |
| 3840x2160 (High) | $0.10605 | $0.1218 |
| 1024x768 (XHigh) | $0.06825 | $0.084 |
| 1024x1024 (XHigh) | $0.0987 | $0.11445 |
| 1024x1536 (XHigh) | $0.0777 | $0.09345 |
| 1536x1024 (XHigh) | $0.0777 | $0.09345 |
| 1920x1088 (XHigh) | $0.07455 | $0.0903 |
| 2560x1440 (XHigh) | $0.10395 | $0.1197 |
| 3840x2160 (XHigh) | $0.1869 | $0.20265 |
| 1024x768 (Max) | $0.15225 | $0.168 |
| 1024x1024 (Max) | $0.22155 | $0.2373 |
| 1024x1536 (Max) | $0.17325 | $0.189 |
| 1536x1024 (Max) | $0.17325 | $0.189 |
| 1920x1088 (Max) | $0.16695 | $0.1827 |
| 2560x1440 (Max) | $0.2331 | $0.24885 |
| 3840x2160 (Max) | $0.42105 | $0.4368 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.0126 per input image | image-to-image edits only |
GPT Image 2 API Documentation
https://gateway.pixazo.ai/gpt-image-2/v1/text-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - GPT Image 2
Request Code
POST https://gateway.pixazo.ai/gpt-image-2/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "A serene sunset over mountains"
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-2/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "A serene sunset over mountains"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/gpt-image-2/v1/text-to-image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
prompt: 'A serene sunset over mountains'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/gpt-image-2/v1/text-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "A serene sunset over mountains"
}'
Output
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Text to Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Up to 32,000 characters | Text description of the desired image. Must be non-empty. Every request carries a prompt charge that scales with prompt length — see the pricing panel. |
n | No | integer | 1 | 1–10 | Number of images to generate in one request. |
size | No | string | "auto" | 1024x1024, 1024x1536, 1536x1024, 2048x2048, 2048x1152, 2160x3840, 3840x2160, auto, or custom W×H | Output dimensions. Custom sizes: both edges multiples of 16px, longest edge up to 3840px, aspect ratio up to 3:1, total pixels 655,360–8,294,400. Sizes outside the listed grid are billed at the next larger listed size. |
quality | No | string | "auto" | low, medium, high, auto | Sets how much detail is rendered. High looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
format | No | string | "png" | png, jpeg, webp | Output file format. jpeg is fastest. |
output_compression | No | integer | 100 | 0–100 | Sets how hard the image is squeezed when it is saved as a JPEG or WebP — lower means a smaller file with softer detail. It has no effect on PNG. |
background | No | string | "auto" | opaque, auto | Sets how the background is handled. GPT Image 2 always fills the background in — transparent cut-outs are not available on this model. |
moderation | No | string | "auto" | auto, low | Sets how strictly your prompt and the result are checked for sensitive content. Auto is the standard filter; Low is less restrictive. |
Example Request
{
"prompt": "Photorealistic 2K landscape of a fjord at golden hour, dramatic clouds, ultra-detailed",
"n": 4,
"size": "2048x1152",
"quality": "high",
"format": "webp",
"output_compression": 80,
"background": "opaque",
"moderation": "low"
}
Response
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-2' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
GPT Image 2 API Pricing
| Resolution | Base price (USD) | Per image (USD) |
|---|---|---|
| 1024x768 (Low) | $0.00525 | $0.0084 |
| 1024x1024 (Low) | $0.0063 | $0.00945 |
| 1024x1536 (Low) | $0.00525 | $0.0084 |
| 1536x1024 (Low) | $0.00525 | $0.0084 |
| 1920x1088 (Low) | $0.00525 | $0.0084 |
| 2560x1440 (Low) | $0.00735 | $0.0105 |
| 3840x2160 (Low) | $0.0126 | $0.01575 |
| 1024x768 (Medium) | $0.03885 | $0.042 |
| 1024x1024 (Medium) | $0.05565 | $0.0588 |
| 1024x1536 (Medium) | $0.0441 | $0.04725 |
| 1536x1024 (Medium) | $0.0441 | $0.04725 |
| 1920x1088 (Medium) | $0.042 | $0.04515 |
| 2560x1440 (Medium) | $0.0588 | $0.06195 |
| 3840x2160 (Medium) | $0.10605 | $0.1092 |
| 1024x768 (High) | $0.15225 | $0.1554 |
| 1024x1024 (High) | $0.22155 | $0.2247 |
| 1024x1536 (High) | $0.17325 | $0.1764 |
| 1536x1024 (High) | $0.17325 | $0.1764 |
| 1920x1088 (High) | $0.1659 | $0.16905 |
| 2560x1440 (High) | $0.2331 | $0.23625 |
| 3840x2160 (High) | $0.42105 | $0.4242 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.0126 per input image | image-to-image edits only |
GPT Image 2 API Documentation
https://gateway.pixazo.ai/gpt-image-2/v1/image-to-image-edit
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Image (Edit Image) - GPT Image 2
Request Code
POST https://gateway.pixazo.ai/gpt-image-2/v1/image-to-image-edit
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-2/v1/image-to-image-edit"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/gpt-image-2/v1/image-to-image-edit';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
};
const data = {
prompt: 'Add a flamingo to the pool',
image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/gpt-image-2/v1/image-to-image-edit" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "Add a flamingo to the pool",
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/gpt-images-2/img_c86ec1806237_0.png"
}'
Output
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Image Edit
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | Up to 32,000 characters | Text instruction describing the edit. Must be non-empty. Every request carries a prompt charge that scales with prompt length — see the pricing panel. |
image | Yes | string or string[] | — | Up to 16 images | Upload the image you want to edit. Add up to 16 to combine them into a single result. JPG, PNG or WebP; under 50 MB each. Each input image is billed in addition to the output — see the pricing panel. |
mask | No | string | — | PNG with an alpha channel, same dimensions as the first input image | Optional. Upload a PNG the same size as your image, with the parts you want changed fully see-through and everything you want kept solid. Under 4 MB. It applies to the first image. |
n | No | integer | 1 | 1–10 | Number of output variations to generate. |
size | No | string | "auto" | 1024x1024, 1024x1536, 1536x1024, 2048x2048, 2048x1152, 2160x3840, 3840x2160, auto, or custom W×H | Output dimensions. Custom sizes: both edges multiples of 16px, longest edge up to 3840px, aspect ratio up to 3:1, total pixels 655,360–8,294,400. Sizes outside the listed grid are billed at the next larger listed size. |
quality | No | string | "auto" | low, medium, high, auto | Sets how much detail is rendered. High looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
format | No | string | "png" | png, jpeg, webp | Output file format. jpeg is fastest. |
output_compression | No | integer | 100 | 0–100 | Sets how hard the image is squeezed when it is saved as a JPEG or WebP — lower means a smaller file with softer detail. It has no effect on PNG. |
background | No | string | "auto" | opaque, auto | Sets how the background is handled. GPT Image 2 always fills the background in — transparent cut-outs are not available on this model. |
moderation | No | string | "auto" | auto, low | Sets how strictly your prompt and the result are checked for sensitive content. Auto is the standard filter; Low is less restrictive. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 16 | JPG, PNG, WEBP · < 50 MB | Image(s) to edit (up to 16). |
| mask | 1 | PNG with an alpha channel · < 4 MB | Optional mask; must match image size. Transparent pixels mark the region to edit. |
Input image requirements: HTTPS URL or data:image/...;base64,... data-URI. PNG, JPEG, or WEBP. Multiple input images may be combined in a single edit request via the image array.
Edit-specific Notes
imageas array — each entry is independently resolved (URL fetched, or base64 decoded). All are uploaded as repeatedimage[]parts. Useful for "combine these references" workflows.masksemantics — must match the input image's dimensions. The mask must be a PNG with an alpha channel — fully transparent pixels mark the region to edit, opaque pixels are preserved. A flat black & white PNG carries no alpha channel and is rejected before the request reaches the model, because a fully opaque image selects nothing. Ifmaskis omitted, the entire image is in scope for the edit.- Multi-image + mask together — allowed, but the mask applies to the first input image only.
transparentbackground — NOT supported on gpt-image-2 (onlyopaqueandauto).
Example Request
{
"prompt": "Compose a gift basket containing all items, photorealistic, white background, with a Relax & Unwind ribbon",
"image": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/seedream-5-0-lite-text-to-image_019ecace-485b-7447-c8d1-ce0344929afed/output.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/nano-banana-pro_019ed0b0-e2d6-70d5-7724-7322947d78d18/output.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/recraft/a-red-cat-1781619282400-0.webp"
],
"n": 1,
"size": "1024x1024",
"quality": "high",
"format": "png",
"output_compression": 90,
"background": "opaque",
"moderation": "auto"
}
Response
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-2' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-2",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-2",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-2_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
GPT Image 2 API Pricing
| Resolution | Base price (USD) | Per image, 1 input image (USD) |
|---|---|---|
| 1024x768 (Low) | $0.00525 | $0.021 |
| 1024x1024 (Low) | $0.0063 | $0.02205 |
| 1024x1536 (Low) | $0.00525 | $0.021 |
| 1536x1024 (Low) | $0.00525 | $0.021 |
| 1920x1088 (Low) | $0.00525 | $0.021 |
| 2560x1440 (Low) | $0.00735 | $0.0231 |
| 3840x2160 (Low) | $0.0126 | $0.02835 |
| 1024x768 (Medium) | $0.03885 | $0.0546 |
| 1024x1024 (Medium) | $0.05565 | $0.0714 |
| 1024x1536 (Medium) | $0.0441 | $0.05985 |
| 1536x1024 (Medium) | $0.0441 | $0.05985 |
| 1920x1088 (Medium) | $0.042 | $0.05775 |
| 2560x1440 (Medium) | $0.0588 | $0.07455 |
| 3840x2160 (Medium) | $0.10605 | $0.1218 |
| 1024x768 (High) | $0.15225 | $0.168 |
| 1024x1024 (High) | $0.22155 | $0.2373 |
| 1024x1536 (High) | $0.17325 | $0.189 |
| 1536x1024 (High) | $0.17325 | $0.189 |
| 1920x1088 (High) | $0.1659 | $0.18165 |
| 2560x1440 (High) | $0.2331 | $0.24885 |
| 3840x2160 (High) | $0.42105 | $0.4368 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.0126 per input image | image-to-image edits only |
gpt-image-1.5, the model behind this API, on 1 December 2026, so this API is switched off on 30 November 2026. Requests sent after that date will fail. Migrate to GPT Image 2.5 Flare — https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/text-to-image — same asynchronous flow, with these field names: image_size → size, num_images → n, output_format → format; drop sync_mode.GPT Image v1.5 API Documentation
https://gateway.pixazo.ai/gpt-image-1-5-api-923/v1/gpt-image-1-5-api-request
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
GPT-Image 1.5 API generate request - GPT Image 1.5 API
Request Code
POST https://gateway.pixazo.ai/gpt-image-1-5-api-923/v1/gpt-image-1-5-api-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
"image_size": "1024x1024",
"background": "auto",
"quality": "high",
"num_images": 1,
"output_format": "png"
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-1-5-api-923/v1/gpt-image-1-5-api-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
"image_size": "1024x1024",
"background": "auto",
"quality": "high",
"num_images": 1,
"output_format": "png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/gpt-image-1-5-api-923/v1/gpt-image-1-5-api-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912',
image_size: '1024x1024',
background: 'auto',
quality: 'high',
num_images: 1,
output_format: 'png'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/gpt-image-1-5-api-923/v1/gpt-image-1-5-api-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
"image_size": "1024x1024",
"background": "auto",
"quality": "high",
"num_images": 1,
"output_format": "png"
}'
Output
{
"request_id": "gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-1-5-api-923",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-05-22T13:17:32.110Z",
"updated_at": "2026-05-22 13:19:23",
"completed_at": "2026-05-22 13:19:23"
}
Failure callback shape
{
"request_id": "gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-1-5-api-923",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - GPT-Image 1.5 API generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | 2–32,000 characters | Detailed text description of the desired image (2–32,000 characters). Every request carries a prompt charge that scales with prompt length — see the pricing panel. |
image_size | No | string | "1024x1024" | 1024x1024, 1536x1024, 1024x1536 | Output dimensions — square, landscape, or portrait. |
quality | No | string | "high" | low, medium, high | Sets how much detail is rendered. High looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
background | No | string | "auto" | auto, transparent, opaque | Sets how the background is handled. Transparent gives you a cut-out with no background, saved as a PNG or WebP; Opaque fills it in. |
num_images | No | integer | 1 | 1–4 | Number of images to generate in one request. |
output_format | No | string | "png" | jpeg, png, webp | Output file format. |
sync_mode | No | boolean | false | — | If true, returns the image as a base64-encoded data URI inline in the response. If false, returns hosted image URLs via the async queue. |
Example Request
{
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
"image_size": "1024x1024",
"background": "auto",
"quality": "high",
"num_images": 1,
"output_format": "png"
}
Response
{
"request_id": "gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-1-5-api-923' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-1-5-api-923",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-1-5-api-923_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-1-5-api-923",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-1-5-api-923_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
GPT Image v1.5 API Pricing
Variants map to quality tiers: Variant 1 = Low, Variant 2 = Medium, Variant 3 = High. Higher = more detail and better prompt adherence at higher cost and latency.
| Resolution | Model | Base price (USD) | Per image (USD) |
|---|---|---|---|
| 1024x1024 | low-1024x1024 | $0.00945 | $0.0126 |
| 1024x1536 | low-1024x1536 | $0.01365 | $0.0168 |
| 1536x1024 | low-1536x1024 | $0.01365 | $0.0168 |
| 1024x1024 | medium-1024x1024 | $0.0357 | $0.03885 |
| 1024x1536 | medium-1024x1536 | $0.05355 | $0.0567 |
| 1536x1024 | medium-1536x1024 | $0.0525 | $0.05565 |
| 1024x1024 | high-1024x1024 | $0.13965 | $0.1428 |
| 1024x1536 | high-1024x1536 | $0.21 | $0.21315 |
| 1536x1024 | high-1536x1024 | $0.20895 | $0.2121 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.05775 per input image | image-to-image edits only |
gpt-image-1.5, the model behind this API, on 1 December 2026, so this API is switched off on 30 November 2026. Requests sent after that date will fail. Migrate to GPT Image 2.5 Flare — https://gateway.pixazo.ai/gpt-image-2-5-flare/v1/image-to-image/editing — same asynchronous flow, with these field names: image_urls → image, mask_image_url → mask, image_size → size, num_images → n, output_format → format; drop sync_mode.GPT Image v1.5 API Documentation
https://gateway.pixazo.ai/gpt-image-1-5/v1/image-to-image/editing
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
GPT Image 1.5 Edit generate request
Request Code
POST https://gateway.pixazo.ai/gpt-image-1-5/v1/image-to-image/editing
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "Replace the sky with a dramatic sunset and add a flock of birds in the distance",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"num_images": 1,
"image_size": "auto",
"background": "auto",
"quality": "high",
"input_fidelity": "high",
"output_format": "png",
"sync_mode": false
}
import requests
url = "https://gateway.pixazo.ai/gpt-image-1-5/v1/image-to-image/editing"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "Replace the sky with a dramatic sunset and add a flock of birds in the distance",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"num_images": 1,
"image_size": "auto",
"background": "auto",
"quality": "high",
"input_fidelity": "high",
"output_format": "png",
"sync_mode": false
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/gpt-image-1-5/v1/image-to-image/editing";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
"prompt": "Replace the sky with a dramatic sunset and add a flock of birds in the distance",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"num_images": 1,
"image_size": "auto",
"background": "auto",
"quality": "high",
"input_fidelity": "high",
"output_format": "png",
"sync_mode": false
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/gpt-image-1-5/v1/image-to-image/editing" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "Replace the sky with a dramatic sunset and add a flock of birds in the distance",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg"
],
"num_images": 1,
"image_size": "auto",
"background": "auto",
"quality": "high",
"input_fidelity": "high",
"output_format": "png",
"sync_mode": false
}'
Output
{
"request_id": "gpt-image-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - GPT Image 1.5 Edit generate request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | 2–32,000 characters | Text description of the desired edit (2–32,000 characters). Must clearly specify changes to the reference image. |
| image_urls | Yes | string[] | — | — | Upload the image you want to edit. Add more than one to combine them into a single result. JPG, PNG or WebP; under 50 MB each. Each input image is billed in addition to the output — see the pricing panel. |
| num_images | No | integer | 1 | 1, 2, 3, 4 | Number of edited images to generate. Allowed values: 1, 2, 3, 4. |
| image_size | No | enum | "auto" | auto, 1024x1024, 1536x1024, 1024x1536 | Output image dimensions. Allowed values: `auto`, `1024x1024`, `1536x1024`, `1024x1536`. `auto` selects size based on input image. |
| background | No | enum | "auto" | auto, transparent, opaque | Sets how the background is handled. Transparent removes it for a cut-out; Opaque fills it with a neutral tone. |
| quality | No | enum | "high" | low, medium, high | Sets how much detail is kept in the edit. High looks the sharpest but takes longer and costs more; Low is good for quick drafts. |
| input_fidelity | No | enum | "high" | low, high | Sets how closely the result sticks to your original image. High keeps more of its texture and detail, which suits faces and fine detail; Low gives the model more freedom to change things. |
| output_format | No | enum | "png" | jpeg, png, webp | File format of generated images. Allowed values: `jpeg`, `png`, `webp`. |
| mask_image_url | No | string | — | — | Optional. Upload a PNG with an alpha channel, the same size as the one you are editing: fully transparent pixels mark the areas to change, opaque pixels stay as they are. A black-and-white or grayscale PNG has no alpha channel and is rejected. Under 4 MB. |
| sync_mode | No | boolean | false | — | If `true`, returns media as base64-encoded data URI inline in the response. If `false`, returns a polling ID and async output URL. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image_urls | — | JPG, PNG, WEBP · < 50 MB | Image(s) to edit. |
| mask_image_url | 1 | PNG with an alpha channel · < 4 MB | Optional mask; must match image size. Transparent pixels mark the region to edit. |
Example Request
{
"prompt": "Replace the sky with a dramatic sunset and add a flock of birds in the distance",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/nano-banana-2-image-to-image-batch_019eacab-dc06-7502-95d0-927f64f29bb60/output.jpg"
],
"num_images": 1,
"image_size": "auto",
"background": "auto",
"quality": "high",
"input_fidelity": "high",
"output_format": "png",
"sync_mode": false
}
Response
{
"request_id": "gpt-image-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/gpt-image-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'gpt-image-1-5' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "gpt-image-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "gpt-image-1-5",
"error": "Description of the error",
"output": null
}
Retrieving Results
Poll the universal status endpoint to check progress and retrieve results.
Endpoint
GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY
cURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://gateway.pixazo.ai/v2/requests/status/gpt-image-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "gpt-image-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "gpt-image-1-5",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/gpt-image-1-5_019dxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
GPT Image v1.5 API Pricing
| Resolution | Model | Base price (USD) | Per image, 1 input image (USD) |
|---|---|---|---|
| 1024x1024 | low-1024x1024 | $0.00945 | $0.07035 |
| 1024x1536 | low-1024x1536 | $0.01365 | $0.07455 |
| 1536x1024 | low-1536x1024 | $0.01365 | $0.07455 |
| 1024x1024 | medium-1024x1024 | $0.0357 | $0.0966 |
| 1024x1536 | medium-1024x1536 | $0.05355 | $0.11445 |
| 1536x1024 | medium-1536x1024 | $0.0525 | $0.1134 |
| 1024x1024 | high-1024x1024 | $0.13965 | $0.20055 |
| 1024x1536 | high-1024x1536 | $0.21 | $0.2709 |
| 1536x1024 | high-1536x1024 | $0.20895 | $0.26985 |
| Charge | Rate | Applies to |
|---|---|---|
| Base price | the quality × size rate in the table above | every image |
| Prompt charge | $0.00315 per request for prompts up to 1,200 characters; longer prompts pay $0.002625 per 1,000 characters instead | every request |
| Input images | $0.05775 per input image | image-to-image edits only |
⚡ Performance
Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.