Qwen Image 3 Pro API, Qwen Image 2 Pro API, Qwen Image Edit 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.

Get API Key
Qwen AI API

Models Version

WELCOME BONUS

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

Pricing: $0.075 per generated image. Requests that set n > 1 are billed per image (n × $0.075).

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——A detailed text description of the desired image. Be specific about subjects, style, lighting, and composition.
sizeNostringautoauto · aspect ratio · WIDTHxHEIGHTOutput 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.
nNointeger11–6Number of images to generate in a single request. Billed per image — n images cost n × the per-image price.
negative_promptNostring——A description of elements to avoid in the generated image. Helps steer the model away from unwanted features.
seedNointeger——Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request.
watermarkNobooleanfalsetrue, falseWhen true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark).
prompt_extendNobooleantruetrue, falseAutomatically 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

HeaderValue
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYour API subscription key

Response Handling

Common status codes for Text to Image.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated images (R2 CDN)
output.media_typestringMIME type of the output (image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error (e.g. bad inputs) — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a text to image request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen Image 3.0 Pro API Pricing

Your request will cost $0.075 per image.
Image to Image (Editing)

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

Pricing: $0.075 per generated image. Requests that set n > 1 are billed per image (n × $0.075).

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlYesstring——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.
promptYesstring——A detailed description of the edit to apply to the source image.
sizeNostringautoauto · aspect ratio · WIDTHxHEIGHTOutput 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.
nNointeger11–6Number of images to generate in a single request. Billed per image — n images cost n × the per-image price.
negative_promptNostring——A description of elements to avoid in the generated image. Helps steer the model away from unwanted features.
seedNointeger——Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request.
watermarkNobooleanfalsetrue, falseWhen true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark).
prompt_extendNobooleantruetrue, falseAutomatically 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

HeaderValue
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYour API subscription key

Response Handling

Common status codes for Image to Image Editing.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated images (R2 CDN)
output.media_typestringMIME type of the output (image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error (e.g. bad inputs) — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a image to image editing request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen Image 3.0 Pro API Pricing

Your request will cost $0.075 per image.
Image to Image (Fusion)

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

Pricing: $0.075 per generated image. Requests that set n > 1 are billed per image (n × $0.075).

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlsYesarray of strings—2–3 URLsAn 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.
promptYesstring——A detailed description of how the input images should be fused or composed together.
sizeNostringautoauto · aspect ratio · WIDTHxHEIGHTOutput 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.
nNointeger11–6Number of images to generate in a single request. Billed per image — n images cost n × the per-image price.
negative_promptNostring——A description of elements to avoid in the generated image. Helps steer the model away from unwanted features.
seedNointeger——Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request.
watermarkNobooleanfalsetrue, falseWhen true, adds a small "Qwen-Image" watermark to the bottom-right corner. Defaults to false (no watermark).
prompt_extendNobooleantruetrue, falseAutomatically 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

HeaderValue
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYour API subscription key

Response Handling

Common status codes for Image to Image Fusion.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated images (R2 CDN)
output.media_typestringMIME type of the output (image/png)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error (e.g. bad inputs) — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a image to image fusion request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen Image 3.0 Pro API Pricing

Your request will cost $0.075 per image.
2. Qwen Image Max Edit

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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—Max 800 charactersText prompt describing the desired edit. Supports Chinese and English. Be specific about the change (subject, context, lighting, environment).
negative_promptNostring""Max 500 charactersDescribes unwanted elements or artifacts to avoid in the output. Improves quality by exclusion.
image_sizeNostring or object—square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9, or a custom {width, height} objectDimensions of the generated image. If omitted, the size of the input image is used.
enable_prompt_expansionNobooleantruetrue, falseAutomatically rewrites and enriches your prompt with extra detail before generation to improve results.
seedNointeger—0–2147483647Random seed for reproducible results. Reuse the same seed with the same inputs to regenerate a similar image.
enable_safety_checkerNobooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
sync_modeNobooleanfalsetrue, falseWhen 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_imagesNointeger11–6Number of edited images to generate. Must be between 1 and 6.
output_formatNostringpngpng, jpeg, webpOutput image format. Supported values: png, jpeg, webp.
image_urlsYesarray of strings—1–3 image URLsPublic 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

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBP · < 10 MBImage(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
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
Too Many Requests
500 Internal Server Error

Notes & Tips

  1. Poll the results endpoint every 2–3 seconds until status is COMPLETED or FAILED
  2. Implement exponential backoff for retry logic on 500 or 429 responses
  3. Use clear, specific prompts that describe the desired change in context, lighting, or environment
  4. Avoid overly vague prompts like “make it better”; specify elements such as “replace sky with sunset”
  5. Validate image URLs are publicly accessible and use HTTPS before submission
  6. 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_KEY

    cURL 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

    FieldTypeDescription
    request_idstringUnique request identifier
    statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
    model_idstringModel that processed the request
    errorstring|nullError message if failed
    output.media_urlarrayURLs to generated media (R2 CDN)
    output.media_typestringMIME type of the output
    created_atstringWhen request was created
    completed_atstring|nullWhen request completed
    polling_urlstringStatus URL (initial response only)

    Status Values

    StatusDescription
    QUEUEDRequest accepted, waiting to be processed
    PROCESSINGBeing processed by the model
    COMPLETEDDone — output contains the result
    FAILEDFailed — check error field
    ERRORSystem error — not charged

    Status Flow

    QUEUED → PROCESSING → COMPLETED
                        → FAILED
                        → ERROR

    Typical Workflow

    1. Send a generate request to the API endpoint
    2. Save the request_id from the response
    3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
    4. When status is "COMPLETED", download from output.media_url

    Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen Image Max Edit API Pricing

Your request will cost $0.075 per image.
3. Qwen Image Max t2i

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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——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_promptNostring——A description of elements to avoid in the generated image (up to 500 characters). Helps refine output quality by excluding unwanted features.
image_sizeNostringsquare_hdsquare_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9The resolution and aspect ratio of the output image. Choose one of the preset enum values, or pass a custom {width, height} object.
enable_prompt_expansionNobooleantruetrue, falseAutomatically rewrites and enriches your prompt with an LLM before generation to improve results.
enable_safety_checkerNobooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
seedNointeger—0–2147483647Random seed for reproducibility. Reuse the same seed with identical inputs to reproduce a result; omit for a random seed each request.
num_imagesNointeger11–4Number of images to generate in a single request.
output_formatNostringpngpng, jpeg, webpThe 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
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen Image Max t2i API Pricing

Your request will cost $0.075 per image.
4. Qwen Image Edit 2509

Qwen Image Edit 2509 API Documentation

https://gateway.pixazo.ai/qwen-image-lite/v1/qwen-image-lite-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 Edit Request - Qwen Image Edit

Request Code

POST https://gateway.pixazo.ai/qwen-image-lite/v1/qwen-image-lite-request
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": "Add a small bright red party hat on top, keep everything else identical",
  "negative_prompt": "",
  "num_inference_steps": 4,
  "true_cfg_scale": 1.0,
  "guidance_scale": 1.0,
  "seed": 42,
  "num_images": 1,
  "output_format": "png"
}
import requests

url = "https://gateway.pixazo.ai/qwen-image-lite/v1/qwen-image-lite-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/doc-assets/images/input.jpg",
    "prompt": "Add a small bright red party hat on top, keep everything else identical",
    "negative_prompt": "",
    "num_inference_steps": 4,
    "true_cfg_scale": 1.0,
    "guidance_scale": 1.0,
    "seed": 42,
    "num_images": 1,
    "output_format": "png"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/qwen-image-lite/v1/qwen-image-lite-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/doc-assets/images/input.jpg',
  prompt: 'Add a small bright red party hat on top, keep everything else identical',
  negative_prompt: '',
  num_inference_steps: 4,
  true_cfg_scale: 1.0,
  guidance_scale: 1.0,
  seed: 42,
  num_images: 1,
  output_format: 'png'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/qwen-image-lite/v1/qwen-image-lite-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/doc-assets/images/input.jpg",
    "prompt": "Add a small bright red party hat on top, keep everything else identical",
    "negative_prompt": "",
    "num_inference_steps": 4,
    "true_cfg_scale": 1.0,
    "guidance_scale": 1.0,
    "seed": 42,
    "num_images": 1,
    "output_format": "png"
  }'

Output

{
  "request_id": "qwen-image-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-lite_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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "qwen-image-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-lite_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-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "qwen-image-lite",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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 Edit Request

Parameter Required Type Default Allowed values / range Description
image_url Yes (one source) string — Public http(s) URL Source image to edit. Recommended. Provide exactly one image source — image_url, image_base64, or image_urls.
image_base64 Yes (one source) string — Raw base64 (no data: prefix) Base64-encoded source image. Alternative to image_url.
image_urls Yes (one source) array of strings — Array of public URLs (1 – 3 recommended) One or more source image URLs (multi-image edit). Qwen-Image-Edit-2509 is tuned for 1–3 reference images (e.g. person + product, person + scene); more images may degrade quality. Alternative to image_url.
prompt Yes string — Any text Edit instruction describing the change. Be specific for best results.
negative_prompt No string " " (space) Any text Concepts to steer away from in the output. Only takes effect when true_cfg_scale is greater than 1.0 — at the default true_cfg_scale of 1.0 the negative prompt is ignored.
num_inference_steps No integer 4 1 – 100 Denoising steps. This Lightning model is tuned for 4 steps; higher values rarely improve quality.
true_cfg_scale No number 1.0 ≥ 1.0 True classifier-free guidance scale — the control that actually affects prompt adherence. 1.0 (default) disables CFG, which is what the 4-step Lightning schedule expects. Set it above 1.0 together with a negative_prompt to enable CFG: stronger prompt adherence, but roughly 2× slower and often lower image quality.
guidance_scale No number 1.0 ≥ 1.0 Embedded (distillation) guidance value. It is accepted for compatibility but has no effect on this pipeline — raising it will not increase prompt adherence. Use true_cfg_scale instead.
seed No integer 42 Any integer Random seed for reproducible results.
num_images No integer 1 1 – 4 Number of edited images to generate.
output_format No string png png, jpg Output image format.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image_url1JPG, PNG, WEBP · < 10 MBImage to edit.
image_urls—JPG, PNG, WEBP · < 10 MBAdditional reference image(s).

Minimum Request

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/upscaler_019ed0c8-bb34-7854-afbc-b2a164758a15b/output.png",
  "prompt": "Add a small bright red party hat on top"
}

Full Request (all options)

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "Add a small bright red party hat on top, keep everything else identical",
  "negative_prompt": "",
  "num_inference_steps": 4,
  "true_cfg_scale": 1.0,
  "guidance_scale": 1.0,
  "seed": 42,
  "num_images": 1,
  "output_format": "png"
}

Response

{
  "request_id": "qwen-image-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/qwen-image-lite_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 Edit Request.

Code Meaning
202 Accepted — Request queued
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
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-lite' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "qwen-image-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "qwen-image-lite",
  "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-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "qwen-image-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "qwen-image-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/qwen-image-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.png"
    ],
    "media_type": "image/png"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen Image Edit 2509 API Pricing

Your request will cost $0.03 per image.
Covered by your monthly free credit
5. Qwen LoRA v1

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring——The text instruction describing the edit you want applied to the input image(s).
image_urlsYesarray——Publicly accessible URLs of the images to edit. Provide one or more reference images (or Base64 data URIs).
lorasNoarray[] (no LoRA)up to 3 entriesLoRA 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_sizeNostring or objectsize of the final input imagesquare_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_stepsNointeger282-50Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster.
seedNointeger——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_scaleNonumber40-20CFG 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_imagesNointeger11-4Number of images to generate in a single request.
output_formatNostringpngpng, jpegThe file format of the generated image.
negative_promptNostring" " (a single space)—A description of elements to avoid in the generated image.
accelerationNostringregularnone, regularAcceleration level for image generation. "regular" balances speed and quality; "none" disables acceleration.
enable_safety_checkerNobooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
webhookNostring——Webhook URL for async notifications
webhook_events_filterNoarray——Event types to receive: ["start"], ["complete"], ["*"]

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image—JPG, PNG, WEBP · < 10 MBImage(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-Typeapplication/json

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen LoRA v1 API Pricing

Your request will cost $0.0478 per megapixel of output.
Billed on the generated output size × number of images. Example: one 1024x1024 image (1.05 MP) costs about $0.050.
Image to Image (LoRA Trainer)

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_data_urlYesstring——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_rateNonumber0.0001—Learning rate for the LoRA parameters. Lower values train more slowly but more reliably; higher values train faster but risk instability.
stepsNointeger10001-30000Number of training steps to run. More steps generally improve fidelity but increase training time and cost.
default_captionNostring——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_countNointeger——Number of reference images supplied per training pair in the ZIP archive (the ROOT_start2/ROOT_start3 files).
webhookNostring——Webhook URL for training completion notifications
webhook_events_filterNoarray——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-Typeapplication/json
Ocp-Apim-Subscription-KeyYour subscription key

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen LoRA v1 API Pricing

Your request will cost $0.04 per LoRA training job.
Image to Image (Image Editing — Layered)

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.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour 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

HeaderRequiredDefaultDescription
X-Webhook-URLYes (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-ModeNoterminalterminal — 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 POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within 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

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlYesstring——The input image to be decomposed into layers. Must be a publicly accessible URL reachable by the server.
promptNostring——Optional caption describing the input image. A short, accurate caption helps the model separate the layers more reliably.
num_layersNointeger41-10Number 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_stepsNointeger281-50Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster.
guidance_scaleNonumber51-20Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation.
num_imagesNointeger11Number of layer sets to generate (currently only 1 is supported).
negative_promptNostring"" (empty)—A description of elements to avoid in the generated layers.
seedNointeger——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.
accelerationNostringregularnone, regular, highAcceleration level for generation. "high" is fastest, "regular" balances speed and quality, "none" disables acceleration.
enable_safety_checkerNobooleantruetrue, falseTurns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it.
output_formatNostringpngpng, webpThe file format of the generated layers. Use png to preserve transparency.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBP · < 10 MBImage 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-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal 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

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Qwen LoRA v1 API Pricing

Your request will cost $0.05 per image.

⚡ 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).

Show data for the last
Generations
77,000last 30d
~2,567 per day
Success rate
83.2%
of completed generations
Generation time
2.9minavg
p95 4.1min
Requests
Sep 16max 9,200Oct 15
Qwen Image Edit 2509Avg 2,023/day
Qwen Image 3.0 ProAvg 527/day
Qwen Image Max EditAvg 13/day
Qwen Image Max t2iAvg 3/day
Generation Time
Sep 16max 5.3minOct 15
Qwen Image Edit 2509Avg 3.3min
Qwen Image 3.0 ProAvg 93.8s
Qwen Image Max EditAvg 67.8s
Qwen Image Max t2iAvg 97.0s
Error Rate
Sep 16max 100.0%Oct 15
Qwen Image Edit 2509Avg 20.6%
Qwen Image 3.0 ProAvg 9.4%
Qwen Image Max EditAvg 0.0%
Qwen Image Max t2iAvg 0.0%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
83.25%
across all generations of this model family
Uptime
Sep 16max 100%Oct 15
Qwen Image Edit 2509Avg 79.37%
Qwen Image 3.0 ProAvg 90.65%
Qwen Image Max EditAvg 100.00%
Qwen Image Max t2iAvg 100.00%