Qwen Image 3 API (Pro & Standard), Qwen Image Max API, Qwen Image API: Pricing, Documentation
by Alibaba
Qwen Image by Alibaba offers comprehensive AI image generation and editing capabilities with multiple specialized variants. Through Pixazo's API, developers can access text-to-image generation, image editing, layered image creation, and LoRA training features. The API represents Alibaba's advanced AI research applied to visual content creation, suitable for both consumer applications and enterprise 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).
Qwen Image 3.0 Standard API Documentation
https://gateway.pixazo.ai/qwen-image-3-0/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 - Qwen Image 3.0
Request Code
POST https://gateway.pixazo.ai/qwen-image-3-0/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-3-0/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/qwen-image-3-0/v1/text-to-image";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
prompt: "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
};
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/qwen-image-3-0/v1/text-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}'
Output
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0_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": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Failure callback shape
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0",
"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
Requests that set n > 1 are billed per image.
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | — |
| A detailed text description of the desired image. Be specific about subjects, style, lighting, and composition. | ||||
size | No | string | auto | auto · aspect ratio · WIDTHxHEIGHT |
Output resolution. Accepts auto (default — the model chooses a size), an aspect-ratio string (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9), or an explicit WIDTHxHEIGHT with each side 512–2048 px (e.g. 1024x1024, 1536x1024, 1328x1328). Also works with n > 1. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate in a single request. Billed per image — n images cost n × the per-image price. | ||||
negative_prompt | No | string | — | — |
| A description of elements to avoid in the generated image. Helps steer the model away from unwanted features. | ||||
seed | No | integer | — | — |
| Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request. | ||||
watermark | No | boolean | false | true, false |
When true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark). | ||||
prompt_extend | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with an LLM before generation to improve results. Enabled by default. | ||||
Minimum Request
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
Full Request (all options)
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic",
"size": "1024x1024",
"n": 1,
"negative_prompt": "low resolution, error, worst quality, low quality, deformed",
"seed": 42,
"watermark": false,
"prompt_extend": true
}
Response
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image.
| 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 'qwen-image-3-0' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0",
"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/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
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 images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/png) |
| 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 (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a text to image 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.
Qwen Image 3.0 Standard API Pricing
Qwen Image 3.0 Standard API Documentation
https://gateway.pixazo.ai/qwen-image-3-0/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 Editing - Qwen Image 3.0
Request Code
POST https://gateway.pixazo.ai/qwen-image-3-0/v1/image-to-image/editing
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-3-0/v1/image-to-image/editing"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/qwen-image-3-0/v1/image-to-image/editing";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
prompt: "Change the background to a snowy mountain landscape at golden hour"
};
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/qwen-image-3-0/v1/image-to-image/editing" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}'
Output
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0_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": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Failure callback shape
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0",
"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 to Image Editing
Requests that set n > 1 are billed per image.
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_url | Yesrequired | string | — | — |
| Publicly accessible HTTP/HTTPS URL of the single source image to edit (exactly one). Accepted formats: JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF. Width & height 384–2048 px (recommended for best results); file size up to 10 MB. | ||||
prompt | Yesrequired | string | — | — |
| A detailed description of the edit to apply to the source image. | ||||
size | No | string | auto | auto · aspect ratio · WIDTHxHEIGHT |
Output resolution. Accepts auto (default — the model chooses a size), an aspect-ratio string (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9), or an explicit WIDTHxHEIGHT with each side 512–2048 px (e.g. 1024x1024, 1536x1024, 1328x1328). Also works with n > 1. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate in a single request. Billed per image — n images cost n × the per-image price. | ||||
negative_prompt | No | string | — | — |
| A description of elements to avoid in the generated image. Helps steer the model away from unwanted features. | ||||
seed | No | integer | — | — |
| Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request. | ||||
watermark | No | boolean | false | true, false |
When true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark). | ||||
prompt_extend | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with an LLM before generation to improve results. Enabled by default. | ||||
Minimum Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}
Full Request (all options)
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour",
"size": "1024x1024",
"n": 1,
"negative_prompt": "low resolution, artifacts, distorted",
"seed": 42,
"watermark": false,
"prompt_extend": true
}
Response
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image to Image Editing.
| 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 'qwen-image-3-0' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0",
"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/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
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 images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/png) |
| 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 (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a image to image editing 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.
Qwen Image 3.0 Standard API Pricing
Qwen Image 3.0 Standard API Documentation
https://gateway.pixazo.ai/qwen-image-3-0/v1/image-to-image/fusion
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 Fusion - Qwen Image 3.0
Request Code
POST https://gateway.pixazo.ai/qwen-image-3-0/v1/image-to-image/fusion
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-3-0/v1/image-to-image/fusion"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/qwen-image-3-0/v1/image-to-image/fusion";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
image_urls: [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
prompt: "Blend the two portraits into a single cinematic double-exposure composition"
};
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/qwen-image-3-0/v1/image-to-image/fusion" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}'
Output
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0_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": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Failure callback shape
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0",
"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 to Image Fusion
Requests that set n > 1 are billed per image.
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_urls | Yesrequired | array of strings | — | 2–3 URLs |
| An array of 2 to 3 publicly accessible HTTP/HTTPS image URLs to fuse into a single output image (array order defines the composition sequence). Each image — formats JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF, width & height 384–2048 px (recommended), up to 10 MB. | ||||
prompt | Yesrequired | string | — | — |
| A detailed description of how the input images should be fused or composed together. | ||||
size | No | string | auto | auto · aspect ratio · WIDTHxHEIGHT |
Output resolution. Accepts auto (default — the model chooses a size), an aspect-ratio string (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9), or an explicit WIDTHxHEIGHT with each side 512–2048 px (e.g. 1024x1024, 1536x1024, 1328x1328). Also works with n > 1. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate in a single request. Billed per image — n images cost n × the per-image price. | ||||
negative_prompt | No | string | — | — |
| A description of elements to avoid in the generated image. Helps steer the model away from unwanted features. | ||||
seed | No | integer | — | — |
| Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request. | ||||
watermark | No | boolean | false | true, false |
When true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark). | ||||
prompt_extend | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with an LLM before generation to improve results. Enabled by default. | ||||
Minimum Request
{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}
Full Request (all options)
{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition",
"size": "1024x1024",
"n": 1,
"negative_prompt": "low resolution, artifacts, distorted",
"seed": 42,
"watermark": false,
"prompt_extend": true
}
Response
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image to Image Fusion.
| 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 'qwen-image-3-0' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0",
"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/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
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 images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/png) |
| 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 (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a image to image fusion 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.
Qwen Image 3.0 Standard API Pricing
Qwen Image 3.0 Pro API Documentation
https://gateway.pixazo.ai/qwen-image-3-0-pro/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 - Qwen Image 3.0 Pro
Request Code
POST https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/text-to-image";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
prompt: "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
};
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/qwen-image-3-0-pro/v1/text-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}'
Output
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0-pro_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": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0-pro",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Failure callback shape
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0-pro",
"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
Requests that set n > 1 are billed per image.
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | — |
| A detailed text description of the desired image. Be specific about subjects, style, lighting, and composition. | ||||
size | No | string | auto | auto · aspect ratio · WIDTHxHEIGHT |
Output resolution. Accepts auto (default — the model chooses a size), an aspect-ratio string (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9), or an explicit WIDTHxHEIGHT with each side 512–2048 px (e.g. 1024x1024, 1536x1024, 1328x1328). Also works with n > 1. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate in a single request. Billed per image — n images cost n × the per-image price. | ||||
negative_prompt | No | string | — | — |
| A description of elements to avoid in the generated image. Helps steer the model away from unwanted features. | ||||
seed | No | integer | — | — |
| Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request. | ||||
watermark | No | boolean | false | true, false |
When true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark). | ||||
prompt_extend | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with an LLM before generation to improve results. Enabled by default. | ||||
Minimum Request
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
Full Request (all options)
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic",
"size": "1024x1024",
"n": 1,
"negative_prompt": "low resolution, error, worst quality, low quality, deformed",
"seed": 42,
"watermark": false,
"prompt_extend": true
}
Response
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image.
| 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 'qwen-image-3-0-pro' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0-pro",
"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/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0-pro",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
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 images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/png) |
| 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 (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a text to image 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.
Qwen Image 3.0 Pro API Pricing
Qwen Image 3.0 Pro API Documentation
https://gateway.pixazo.ai/qwen-image-3-0-pro/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 Editing - Qwen Image 3.0 Pro
Request Code
POST https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/image-to-image/editing
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/image-to-image/editing"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/image-to-image/editing";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
prompt: "Change the background to a snowy mountain landscape at golden hour"
};
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/qwen-image-3-0-pro/v1/image-to-image/editing" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}'
Output
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0-pro_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": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0-pro",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Failure callback shape
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0-pro",
"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 to Image Editing
Requests that set n > 1 are billed per image.
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_url | Yesrequired | string | — | — |
| Publicly accessible HTTP/HTTPS URL of the single source image to edit (exactly one). Accepted formats: JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF. Width & height 384–2048 px (recommended for best results); file size up to 10 MB. | ||||
prompt | Yesrequired | string | — | — |
| A detailed description of the edit to apply to the source image. | ||||
size | No | string | auto | auto · aspect ratio · WIDTHxHEIGHT |
Output resolution. Accepts auto (default — the model chooses a size), an aspect-ratio string (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9), or an explicit WIDTHxHEIGHT with each side 512–2048 px (e.g. 1024x1024, 1536x1024, 1328x1328). Also works with n > 1. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate in a single request. Billed per image — n images cost n × the per-image price. | ||||
negative_prompt | No | string | — | — |
| A description of elements to avoid in the generated image. Helps steer the model away from unwanted features. | ||||
seed | No | integer | — | — |
| Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request. | ||||
watermark | No | boolean | false | true, false |
When true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark). | ||||
prompt_extend | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with an LLM before generation to improve results. Enabled by default. | ||||
Minimum Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour"
}
Full Request (all options)
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"prompt": "Change the background to a snowy mountain landscape at golden hour",
"size": "1024x1024",
"n": 1,
"negative_prompt": "low resolution, artifacts, distorted",
"seed": 42,
"watermark": false,
"prompt_extend": true
}
Response
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image to Image Editing.
| 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 'qwen-image-3-0-pro' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0-pro",
"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/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0-pro",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
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 images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/png) |
| 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 (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a image to image editing 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.
Qwen Image 3.0 Pro API Pricing
Qwen Image 3.0 Pro API Documentation
https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/image-to-image/fusion
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 Fusion - Qwen Image 3.0 Pro
Request Code
POST https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/image-to-image/fusion
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/image-to-image/fusion"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/qwen-image-3-0-pro/v1/image-to-image/fusion";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
image_urls: [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
prompt: "Blend the two portraits into a single cinematic double-exposure composition"
};
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/qwen-image-3-0-pro/v1/image-to-image/fusion" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}'
Output
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0-pro_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": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0-pro",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Failure callback shape
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0-pro",
"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 to Image Fusion
Requests that set n > 1 are billed per image.
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_urls | Yesrequired | array of strings | — | 2–3 URLs |
| An array of 2 to 3 publicly accessible HTTP/HTTPS image URLs to fuse into a single output image (array order defines the composition sequence). Each image — formats JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF, width & height 384–2048 px (recommended), up to 10 MB. | ||||
prompt | Yesrequired | string | — | — |
| A detailed description of how the input images should be fused or composed together. | ||||
size | No | string | auto | auto · aspect ratio · WIDTHxHEIGHT |
Output resolution. Accepts auto (default — the model chooses a size), an aspect-ratio string (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9), or an explicit WIDTHxHEIGHT with each side 512–2048 px (e.g. 1024x1024, 1536x1024, 1328x1328). Also works with n > 1. | ||||
n | No | integer | 1 | 1–6 |
| Number of images to generate in a single request. Billed per image — n images cost n × the per-image price. | ||||
negative_prompt | No | string | — | — |
| A description of elements to avoid in the generated image. Helps steer the model away from unwanted features. | ||||
seed | No | integer | — | — |
| Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request. | ||||
watermark | No | boolean | false | true, false |
When true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark). | ||||
prompt_extend | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with an LLM before generation to improve results. Enabled by default. | ||||
Minimum Request
{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition"
}
Full Request (all options)
{
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-a.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/fusion-b.jpg"
],
"prompt": "Blend the two portraits into a single cinematic double-exposure composition",
"size": "1024x1024",
"n": 1,
"negative_prompt": "low resolution, artifacts, distorted",
"seed": 42,
"watermark": false,
"prompt_extend": true
}
Response
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image to Image Fusion.
| 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 'qwen-image-3-0-pro' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-3-0-pro",
"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/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-3-0-pro",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-3-0-pro_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
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 images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/png) |
| 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 (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a image to image fusion 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.
Qwen Image 3.0 Pro API Pricing
Qwen Image Max Edit API Documentation
https://gateway.pixazo.ai/qwen-image-max-edit/v1/qwen-image-max-edit-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 |
Qwen Image Max Edit generate request - Qwen Image Max Edit
Request Code
POST https://gateway.pixazo.ai/qwen-image-max-edit/v1/qwen-image-max-edit-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Transform the background into a serene mountain landscape with snow-capped peaks and a clear blue sky",
"image_urls": [
"https://imagesai.appypie.com/7686410/JUEOHp2Y3FDjmXwOQJVy_017731476841749.png"
]
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-max-edit/v1/qwen-image-max-edit-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Transform the background into a serene mountain landscape with snow-capped peaks and a clear blue sky",
"image_urls": [
"https://imagesai.appypie.com/7686410/JUEOHp2Y3FDjmXwOQJVy_017731476841749.png"
]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/qwen-image-max-edit/v1/qwen-image-max-edit-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'Transform the background into a serene mountain landscape with snow-capped peaks and a clear blue sky',
image_urls: [
'https://imagesai.appypie.com/7686410/JUEOHp2Y3FDjmXwOQJVy_017731476841749.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/qwen-image-max-edit/v1/qwen-image-max-edit-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Transform the background into a serene mountain landscape with snow-capped peaks and a clear blue sky",
"image_urls": [
"https://imagesai.appypie.com/7686410/JUEOHp2Y3FDjmXwOQJVy_017731476841749.png"
]
}'
Output
{
"request_id": "qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-max-edit_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": "qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-max-edit",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-max-edit_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": "qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-max-edit",
"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 - Qwen Image Max Edit generate request
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | Max 800 characters |
| Text prompt describing the desired edit. Supports Chinese and English. Be specific about the change (subject, context, lighting, environment). | ||||
negative_prompt | No | string | "" | Max 500 characters |
| Describes unwanted elements or artifacts to avoid in the output. Improves quality by exclusion. | ||||
image_size | No | string or object | — | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom {width, height} object |
| Dimensions of the generated image. If omitted, the size of the input image is used. | ||||
enable_prompt_expansion | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with extra detail before generation to improve results. | ||||
seed | No | integer | — | 0–2147483647 |
| Random seed for reproducible results. Reuse the same seed with the same inputs to regenerate a similar image. | ||||
enable_safety_checker | No | boolean | true | true, false |
| Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. | ||||
sync_mode | No | boolean | false | true, false |
| When true, the image is returned inline as a data URI in the response instead of a hosted URL, and the output is not saved to your request history. | ||||
num_images | No | integer | 1 | 1–6 |
| Number of edited images to generate. Must be between 1 and 6. | ||||
output_format | No | string | png | png, jpeg, webp |
| Output image format. Supported values: png, jpeg, webp. | ||||
image_urls | Yesrequired | array of strings | — | 1–3 image URLs |
| Public URLs of the reference image(s) to edit (1–3 images). Order matters — the first URL is image 1, the second image 2, and so on; reference them by position in your prompt. Each image 384–5000px per dimension, max 10 MB; JPG, PNG (no alpha), or WEBP. | ||||
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP · < 10 MB | Image(s) to edit. |
Minimum Request
{
"prompt": "Transform the background into a serene mountain landscape with snow-capped peaks and a clear blue sky",
"image_urls": [
"https://imagesai.appypie.com/7686410/JUEOHp2Y3FDjmXwOQJVy_017731476841749.png"
]
}
Full Request (all options)
{
"prompt": "Transform the background into a serene mountain landscape with snow-capped peaks and a clear blue sky",
"negative_prompt": "low resolution, error, worst quality, low quality, deformed",
"enable_prompt_expansion": true,
"enable_safety_checker": true,
"num_images": 1,
"output_format": "png",
"image_urls": [
"https://imagesai.appypie.com/7686410/JUEOHp2Y3FDjmXwOQJVy_017731476841749.png"
]
}
Response
{
"request_id": "qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Qwen Image Max Edit generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Notes & Tips
- Poll the results endpoint every 2–3 seconds until status is COMPLETED or FAILED
- Implement exponential backoff for retry logic on 500 or 429 responses
- Use clear, specific prompts that describe the desired change in context, lighting, or environment
- Avoid overly vague prompts like “make it better”; specify elements such as “replace sky with sunset”
- Validate image URLs are publicly accessible and use HTTPS before submission
- Limit num_images to 1 unless multiple variations are required to
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 'qwen-image-max-edit' not found or is disabled" }Error via Status/Webhook
{ "request_id": "qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "status": "ERROR", "model_id": "qwen-image-max-edit", "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_KEYcURL Example
curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ "https://gateway.pixazo.ai/v2/requests/status/qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"Response (Completed)
{ "request_id": "qwen-image-max-edit_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "status": "COMPLETED", "model_id": "qwen-image-max-edit", "error": null, "output": { "media_url": [ "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-max-edit_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 → ERRORTypical 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-URLheader to get a callback instead of polling.
Qwen Image Max Edit API Pricing
Qwen Image Max t2i API Documentation
https://gateway.pixazo.ai/qwen-image-max/v1/qwen-image-max-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 |
Qwen Image Max generate request - Qwen Image Max
Request Code
POST https://gateway.pixazo.ai/qwen-image-max/v1/qwen-image-max-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-max/v1/qwen-image-max-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/qwen-image-max/v1/qwen-image-max-request";
const headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
};
const data = {
prompt: "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
};
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/qwen-image-max/v1/qwen-image-max-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}'
Output
{
"request_id": "qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-max_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": "qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-max",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-max_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": "qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-max",
"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 - Qwen Image Max generate request
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | — |
| A detailed text description of the desired image. Supports English and Chinese; up to 800 characters. Be specific about subjects, styles, lighting, and composition. | ||||
negative_prompt | No | string | — | — |
| A description of elements to avoid in the generated image (up to 500 characters). Helps refine output quality by excluding unwanted features. | ||||
image_size | No | string | square_hd | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 |
| The resolution and aspect ratio of the output image. Choose one of the preset enum values, or pass a custom {width, height} object. | ||||
enable_prompt_expansion | No | boolean | true | true, false |
| Automatically rewrites and enriches your prompt with an LLM before generation to improve results. | ||||
enable_safety_checker | No | boolean | true | true, false |
| Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. | ||||
seed | No | integer | — | 0–2147483647 |
| Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request. | ||||
num_images | No | integer | 1 | 1–4 |
| Number of images to generate in a single request. | ||||
output_format | No | string | png | png, jpeg, webp |
| The file format of the generated image. Supported values: png, jpeg, webp. | ||||
Minimum Request
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic"
}
Full Request (all options)
{
"prompt": "A majestic white tiger resting on a mossy rock beside a waterfall in a tropical rainforest, photorealistic",
"negative_prompt": "low resolution, error, worst quality, low quality, deformed",
"image_size": "square_hd",
"enable_prompt_expansion": true,
"enable_safety_checker": true,
"num_images": 1,
"output_format": "png"
}
Response
{
"request_id": "qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Qwen Image Max generate request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 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 'qwen-image-max' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-max",
"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/qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-max_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-max",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-max_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.
Qwen Image Max t2i API Pricing
Qwen Image Edit 2509 Relight API Documentation
Re-light a photo from a description of the light you want: its direction, colour, softness and time of day (for example warm sunset light from the left, soft daylight through a window, or neon pink and blue). The people, objects and composition stay the same; shadows, highlights and colour follow the new light. Built on Qwen-Image-Edit-2509 with a relighting LoRA. Prompts in English work. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED.
POST https://gateway.pixazo.ai/qwen-image-edit-2509-relight/v1/relightAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Relight - Qwen Image Edit 2509 Relight
Request Code
POST https://gateway.pixazo.ai/qwen-image-edit-2509-relight/v1/relight
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Relight the photo with warm golden sunset light coming from the left side",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}import requests
url = "https://gateway.pixazo.ai/qwen-image-edit-2509-relight/v1/relight"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Relight the photo with warm golden sunset light coming from the left side",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())const res = await fetch("https://gateway.pixazo.ai/qwen-image-edit-2509-relight/v1/relight", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "Relight the photo with warm golden sunset light coming from the left side",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
})
});
console.log(await res.json());curl -X POST 'https://gateway.pixazo.ai/qwen-image-edit-2509-relight/v1/relight' \
-H 'Content-Type: application/json' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--data-raw '{"prompt": "Relight the photo with warm golden sunset light coming from the left side", "image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"]}'Output
{
"request_id": "qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Webhook (Optional)
Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks). |
Callback Payload (success)
{
"request_id": "qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-edit-2509-relight",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-11-18T06:41:04.645Z",
"updated_at": "2026-11-18 06:43:52",
"completed_at": "2026-11-18 06:43:51"
}Failure callback shape
{
"request_id": "qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-edit-2509-relight",
"error": "Generation failed: the request was rejected (image_urls[0]: Failed to load the image. Please ensure the image file is not corrupted and is in a supported format).",
"output": null,
"created_at": "2026-11-18T06:41:06.174Z",
"updated_at": "2026-11-18 06:43:54",
"completed_at": "2026-11-18 06:43:54"
}Callbacks are idempotent on request_id — de-duplicate on it. Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | 1 to 2,000 characters |
| The light you want: source, direction, colour, softness, time of day. See Writing the prompt below. | ||||
image_urls | Yesrequired | array of strings | — | Exactly 1 public http(s) URL; JPEG or PNG |
| The photo to re-light. | ||||
image_size | No | string | the photo's own shape, about 1 megapixel | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 |
| Output size. Leave it out to keep the photo's shape. See Sizes below. | ||||
num_images | No | integer | 1 | 1 to 4 |
| How many versions to make; each is billed. | ||||
negative_prompt | No | string | — | up to 2,000 characters |
| What to avoid in the result. | ||||
seed | No | integer | random | 0 or more |
| Fix it to make a result easier to reproduce. | ||||
num_inference_steps | No | integer | 28 | 2 to 50 |
| More steps can add detail and take longer. | ||||
guidance_scale | No | number | 4 | 0 to 20 |
| How closely the result follows the prompt. | ||||
acceleration | No | string | regular | none, regular |
none is slower and can be slightly cleaner. | ||||
output_format | No | string | png | png, jpeg |
| Format of the returned image. | ||||
enable_safety_checker | No | boolean | true | true, false |
| Screen the result for unsafe content. | ||||
How usage is measured
Billed per output image by its size, counted in started megapixels of 1024×1024 pixels. An image of up to 1024×1024 pixels (1,048,576) is one unit: most results, for example 832×1248 from a portrait photo, and every image_size preset. A larger result is two units: a very large wide photo comes back at 1376×768. num_images multiplies the charge. The rates are in the pricing panel on this page. Nothing is charged for a request that fails.
Parameters not supported
Rejected with 400
Checked when you submit: the request is rejected before it is queued.
| Parameter | Why | Use instead |
|---|---|---|
loras | This API always applies its relighting LoRA; other LoRAs are not accepted. | — |
image_size as {width, height}, or another preset | Only the listed sizes are offered. | A listed preset, or leave it out |
Two or more image_urls | One photo per request. | One request per photo |
image_url | Not accepted by this endpoint. | image_urls (an array with one URL) |
n, count, batch_size, number_of_images; num_images outside 1–4 | Use num_images. | num_images 1 to 4 |
sync_mode | Results are returned as image URLs. | — |
Accepted, then the request fails
These pass the submit check, so the submit returns 202, but the request then fails with status: "ERROR" and an error that names the problem. Nothing is charged.
| Parameter | When the request fails |
|---|---|
image_urls | The image cannot be downloaded or is not a usable image. |
Writing the prompt
Describe the light, not the subject: the subject is kept. Name the source, its direction and colour, how hard or soft it is, and the mood. For example:
| Prompt | Effect |
|---|---|
| Relight the photo with warm golden sunset light coming from the left side | Low warm sun from the left, rim light on hair and shoulders |
| Relight with soft cool morning light from a window on the right | Gentle daylight from the right, soft shadows |
| Relight with dramatic neon pink and blue light | Coloured club-style light from two sides |
| Relight the scene with cool blue moonlight | Dim, cool night light |
The model was also trained with the Chinese trigger “重新照明” (relight); adding it at the start of the prompt is optional.
Sizes
Without image_size, the result keeps the photo’s shape at about 1 megapixel (for example 853×1280 in, 832×1248 out; 1344×768 stays 1344×768; a 5461×3072 photo comes back at 1376×768). With image_size, the result has that exact size:
| image_size | Output |
|---|---|
square_hd | 1024×1024 |
square | 512×512 |
portrait_4_3 | 768×1024 |
portrait_16_9 | 576×1024 |
landscape_4_3 | 1024×768 |
landscape_16_9 | 1024×576 |
A preset with a different shape from the photo crops or reframes it; leave image_size out to keep the framing.
Timing
A relight usually takes about 40 seconds when the model is already running, and up to about 5 minutes for the first requests after a quiet period, while it starts up. Polling the status endpoint every 5 seconds is enough, or use a Webhook.
Example Request
{
"prompt": "Relight the photo with warm golden sunset light coming from the left side",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}Example Response
{
"request_id": "qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Request Headers
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Bad request — the body failed the submit check (see Request Parameters) and was not queued. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance. |
| 403 | Forbidden. |
| 429 | Too many requests. |
| 500 | Internal server error. |
Error Responses
A 400 names every rejected parameter in violations:
{
"error": "Invalid request parameters",
"message": "'image_urls' must have at most 1 item (got 2)",
"violations": [
"'image_urls' must have at most 1 item (got 2)"
]
}Retrieving Results
Poll the status endpoint with the request_id until status is COMPLETED or ERROR, then download the image from output.media_url.
curl 'https://gateway.pixazo.ai/v2/requests/status/qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'Completed response
Captured from a real Qwen Image Edit 2509 Relight request at launch; the request id is masked.
{
"request_id": "qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-edit-2509-relight",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-edit-2509-relight_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
],
"media_type": "image/png"
},
"created_at": "2026-11-18T06:41:04.645Z",
"updated_at": "2026-11-18 06:43:52",
"completed_at": "2026-11-18 06:43:51"
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request. |
| error | string or null | Error message when status is ERROR; otherwise null. |
| output.media_url | array of strings | URL of each image (num_images of them). Download them and keep your own copies. |
| output.media_type | string | The image MIME type, image/png by default. |
| created_at | string | Request creation timestamp. |
| updated_at | string | Last status change timestamp. |
| completed_at | string | Completion timestamp. |
| polling_url | string | Status URL for this request (in the submit response). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure). Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.
Qwen Image Edit 2509 Relight API Pricing
Billed per output image by its size, in started megapixels of 1024×1024: most results (up to 1024×1024 pixels) are one unit; a larger result, such as a very large wide photo returned at 1376×768, is two. num_images multiplies the charge. Nothing is charged for a request that fails.
| Output image | Price (USD) |
|---|---|
| Output up to 1024×1024 pixels (most results, e.g. 832×1248 from a portrait) | $0.03675 per image |
| Output over 1024×1024 pixels (e.g. 1376×768 from a very large wide photo) | $0.0735 per image |
Qwen LoRA v1 API Documentation
https://gateway.pixazo.ai/qwen-image-edit-plus/v1/qwen-image-edit-plus-lora/generate
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Generate Image Edit Request - Qwen Image Edit Plus Lora API
Request Code
POST https://gateway.pixazo.ai/qwen-image-edit-plus/v1/qwen-image-edit-plus-lora/generate
Content-Type: application/json
{
"prompt": "Close shot of a woman standing next to this car on this highway",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-edit-plus/v1/qwen-image-edit-plus-lora/generate"
headers = {
"Content-Type": "application/json"
}
data = {
"prompt": "Close shot of a woman standing next to this car on this highway",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/qwen-image-edit-plus/v1/qwen-image-edit-plus-lora/generate';
const data = {
prompt: 'Close shot of a woman standing next to this car on this highway',
image_urls: [
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg',
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg',
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg'
]
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
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/qwen-image-edit-plus/v1/qwen-image-edit-plus-lora/generate \
-H "Content-Type: application/json" \
-d '{
"prompt": "Close shot of a woman standing next to this car on this highway",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}'
Output
{
"request_id": "qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-edit-plus-lora_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": "qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-edit-plus-lora",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-edit-plus-lora_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": "qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-edit-plus-lora",
"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 - Generate Image Edit Request
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
prompt | Yesrequired | string | — | — |
| The text instruction describing the edit you want applied to the input image(s). | ||||
image_urls | Yesrequired | array | — | — |
| Publicly accessible URLs of the images to edit. Provide one or more reference images (or Base64 data URIs). | ||||
loras | No | array | [] (no LoRA) | up to 3 entries |
LoRA weights to apply on top of the base model. Each entry is an object with path (required — URL of the LoRA weights) and scale (number, default 1, range 0-4). Up to 3 LoRAs are merged together for the final image. | ||||
image_size | No | string or object | size of the final input image | square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom {"width": …, "height": …} object (1-14142 px per side) |
| Size of the generated image. If omitted, the size of the final input image is used. | ||||
num_inference_steps | No | integer | 28 | 2-50 |
| Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. | ||||
seed | No | integer | — | — |
| Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. | ||||
guidance_scale | No | number | 4 | 0-20 |
| CFG scale — controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. | ||||
num_images | No | integer | 1 | 1-4 |
| Number of images to generate in a single request. | ||||
output_format | No | string | png | png, jpeg |
| The file format of the generated image. | ||||
negative_prompt | No | string | " " (a single space) | — |
| A description of elements to avoid in the generated image. | ||||
acceleration | No | string | regular | none, regular |
| Acceleration level for image generation. "regular" balances speed and quality; "none" disables acceleration. | ||||
enable_safety_checker | No | boolean | true | true, false |
| Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. | ||||
webhook | No | string | — | — |
| Webhook URL for async notifications | ||||
webhook_events_filter | No | array | — | — |
| Event types to receive: ["start"], ["complete"], ["*"] | ||||
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP · < 10 MB | Image(s) to edit. |
Example Request
{
"prompt": "Close shot of a woman standing next to this car on this highway",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"image_size": "square_hd",
"num_inference_steps": 50,
"guidance_scale": 4,
"num_images": 1,
"output_format": "png",
"negative_prompt": " ",
"acceleration": "regular",
"enable_safety_checker": true
}
Response
{
"request_id": "qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
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 'qwen-image-edit-plus-lora' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-edit-plus-lora",
"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/qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-edit-plus-lora_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-edit-plus-lora",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-edit-plus-lora_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.
Qwen LoRA v1 API Pricing
Qwen LoRA v1 API Documentation
https://gateway.pixazo.ai/qwen-image-edit-plus-trainer/v1/qwen-image-edit-plus-trainer/generate
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Training Request - Qwen Image Edit Plus Trainer API
Request Code
POST https://gateway.pixazo.ai/qwen-image-edit-plus-trainer/v1/qwen-image-edit-plus-trainer/generate
Content-Type: application/json
Ocp-Apim-Subscription-Key: your-subscription-key
{
"image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
"steps": 1000
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-edit-plus-trainer/v1/qwen-image-edit-plus-trainer/generate"
headers = {
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "your-subscription-key"
}
data = {
"image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
"steps": 1000
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/qwen-image-edit-plus-trainer/v1/qwen-image-edit-plus-trainer/generate';
const headers = {
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': 'your-subscription-key'
};
const data = {
image_data_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip',
steps: 1000
};
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/qwen-image-edit-plus-trainer/v1/qwen-image-edit-plus-trainer/generate \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: your-subscription-key" \
-d '{
"image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
"steps": 1000
}'
Output
{
"request_id": "qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-edit-plus-trainer_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": "qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-edit-plus-trainer",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-edit-plus-trainer_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": "qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-edit-plus-trainer",
"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 - Training Request
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_data_url | Yesrequired | string | — | — |
URL to the ZIP archive of training data. The ZIP holds image pairs named ROOT_start.EXT / ROOT_end.EXT (e.g. photo_start.jpg and photo_end.jpg). Extra reference images per pair are named ROOT_start2.EXT, ROOT_start3.EXT, … and an optional ROOT.txt per pair supplies that pair's edit instruction. | ||||
learning_rate | No | number | 0.0001 | — |
| Learning rate for the LoRA parameters. Lower values train more slowly but more reliably; higher values train faster but risk instability. | ||||
steps | No | integer | 1000 | 1-30000 |
| Number of training steps to run. More steps generally improve fidelity but increase training time and cost. | ||||
default_caption | No | string | — | — |
Caption used for any image pair that has no ROOT.txt caption file. If it is omitted and a caption file is missing, the training run fails. | ||||
reference_image_count | No | integer | — | — |
Number of reference images supplied per training pair in the ZIP archive (the ROOT_start2/ROOT_start3 files). | ||||
webhook | No | string | — | — |
| Webhook URL for training completion notifications | ||||
webhook_events_filter | No | array | — | — |
| Event types to receive ("*" for all) | ||||
Example Request
{
"image_data_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/trainers/flux-i2i-demo-dataset.zip",
"learning_rate": 0.0002,
"steps": 2000,
"default_caption": "professional cinematic lighting with dramatic shadows",
"reference_image_count": 2,
"webhook": "https://your-domain.com/training-complete"
}
Response
{
"request_id": "qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| 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 'qwen-image-edit-plus-trainer' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-edit-plus-trainer",
"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/qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-edit-plus-trainer_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-edit-plus-trainer",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-edit-plus-trainer_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.
Qwen LoRA v1 API Pricing
Qwen LoRA v1 API Documentation
https://gateway.pixazo.ai/qwen-image-layered/v1/qwen-image-layered-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 |
Qwen Image Layered generate request - Qwen Image Layered API
Request Code
POST https://gateway.pixazo.ai/qwen-image-layered/v1/qwen-image-layered-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/car_race.jpeg",
"num_inference_steps": 28,
"guidance_scale": 5.0,
"num_images": 1,
"enable_safety_checker": true,
"output_format": "png",
"acceleration": "regular"
}
import requests
url = "https://gateway.pixazo.ai/qwen-image-layered/v1/qwen-image-layered-request"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/car_race.jpeg",
"num_inference_steps": 28,
"guidance_scale": 5.0,
"num_images": 1,
"enable_safety_checker": True,
"output_format": "png",
"acceleration": "regular"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/qwen-image-layered/v1/qwen-image-layered-request';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/car_race.jpeg',
num_inference_steps: 28,
guidance_scale: 5.0,
num_images: 1,
enable_safety_checker: true,
output_format: 'png',
acceleration: 'regular'
};
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/qwen-image-layered/v1/qwen-image-layered-request" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/car_race.jpeg",
"num_inference_steps": 28,
"guidance_scale": 5.0,
"num_images": 1,
"enable_safety_checker": true,
"output_format": "png",
"acceleration": "regular"
}'
Output
{
"request_id": "qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-layered_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": "qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-layered",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_0.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_1.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_2.png",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output_3.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": "qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-layered",
"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 - Qwen Image Layered generate request
| Parameter | Required | Type | Default | Allowed values / range |
|---|---|---|---|---|
image_url | Yesrequired | string | — | — |
| The input image to be decomposed into layers. Must be a publicly accessible URL reachable by the server. | ||||
prompt | No | string | — | — |
| Optional caption describing the input image. A short, accurate caption helps the model separate the layers more reliably. | ||||
num_layers | No | integer | 4 | 1-10 |
Number of layers to decompose the input image into. The response returns one image URL per layer in media_url (output_0 … output_N-1); index 0 is the opaque base layer and the remaining layers carry transparency. | ||||
num_inference_steps | No | integer | 28 | 1-50 |
| Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. | ||||
guidance_scale | No | number | 5 | 1-20 |
| Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. | ||||
num_images | No | integer | 1 | 1 |
| Number of layer sets to generate (currently only 1 is supported). | ||||
negative_prompt | No | string | "" (empty) | — |
| A description of elements to avoid in the generated layers. | ||||
seed | No | integer | — | — |
| Random seed that controls the generation's randomness. Reuse the same seed with identical settings to reproduce the same result; leave it empty for a different output each time. | ||||
acceleration | No | string | regular | none, regular, high |
| Acceleration level for generation. "high" is fastest, "regular" balances speed and quality, "none" disables acceleration. | ||||
enable_safety_checker | No | boolean | true | true, false |
| Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. | ||||
output_format | No | string | png | png, webp |
| The file format of the generated layers. Use png to preserve transparency. | ||||
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP · < 10 MB | Image to decompose into layers. |
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/car_race.jpeg",
"num_inference_steps": 28,
"guidance_scale": 5.0,
"num_images": 1,
"enable_safety_checker": true,
"output_format": "png",
"acceleration": "regular"
}
Response
{
"request_id": "qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-layered_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 'qwen-image-layered' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "qwen-image-layered",
"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/qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "qwen-image-layered_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "qwen-image-layered",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-layered_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.
Qwen LoRA v1 API Pricing
⚡ 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.