Pixelforge 3.0 API, Pixelforge 2.0 API, Pixelforge 1.0 API: Pricing, Documentation
by Pixazo
Pixelforge 3.0 API, developers can generate new images and transform the lighting of existing photos for product photography, real estate, and creative applications. The API's relighting feature is particularly valuable for e-commerce and professional photography workflows.
Models Version
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
PixelForge 3.0 API Documentation
https://gateway.pixazo.ai/pixelforge-v3/v1/text-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Text to Image - PixelForge 3.0
Generate one or more images from a text prompt.
Request Code
POST https://gateway.pixazo.ai/pixelforge-v3/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "A single red maple leaf centred on a plain white background, studio lighting"
}
import requests
url = "https://gateway.pixazo.ai/pixelforge-v3/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "A single red maple leaf centred on a plain white background, studio lighting"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const response = await fetch("https://gateway.pixazo.ai/pixelforge-v3/v1/text-to-image", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "A single red maple leaf centred on a plain white background, studio lighting"
})
});
const data = await response.json();
console.log(data);
curl -X POST "https://gateway.pixazo.ai/pixelforge-v3/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 single red maple leaf centred on a plain white background, studio lighting"
}'
Output
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Send an X-Webhook-URL header with your request and the finished result is POSTed to that URL, so you do not have to poll.
POST https://gateway.pixazo.ai/pixelforge-v3/v1/text-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
X-Webhook-URL: https://your-server.example.com/hooks/pixelforge
Webhook Payload (Success)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
}
}
Webhook Payload (Failure)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
- Delivery — one POST per terminal result, retried a few times on a non-2xx response.
- Respond quickly — return 2xx 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.011 per generated image. Requests that set num_images > 1 are billed per image (num_images × $0.011).
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | 1–4000 characters | A detailed description of the image you want. Be specific about the subject, style, lighting and composition. |
| num_images | No | integer | 1 | 1–4 | How many images to generate in one request. Billed per image — n images cost n × $0.011. |
| image_size | No | string | auto | auto · 1024x1024 · 1024x1536 · 1536x1024 · 1792x1024 · 1024x1792 · 1:1 · 3:2 · 2:3 · 16:9 · 9:16 · square · portrait · landscape | The shape of the output. This sets the aspect ratio only — the generator picks its own resolution and caps the long edge at roughly 1600 px, so the returned pixel dimensions will not match the numbers you supply. Omit it, or send auto, to let the model choose. |
| output_format | No | string | webp | webp · png · jpeg · jpg | Encoding of the returned image. webp gives the smallest files at equivalent quality. jpg is accepted as a synonym for jpeg. |
| quality | No | string | high | standard · high | high lets the model reason for longer before drawing, which helps with complex prompts and legible text. standard is faster. Both cost the same. |
Not supported by this model. Sending any of these returns 400 with an explanation rather than being silently ignored: seed (generation is non-deterministic — the same prompt returns a different image every time), mask / mask_url (there is no masked in-painting; describe the region to change in the prompt), background / transparent (output is always opaque), stream and partial_images (results arrive by polling), and model, moderation, response_format and tool_enablement.
Minimum Request
{
"prompt": "A single red maple leaf centred on a plain white background, studio lighting"
}
Full Request (all options)
{
"prompt": "A single red maple leaf centred on a plain white background, studio lighting",
"num_images": 2,
"image_size": "1024x1024",
"output_format": "webp",
"quality": "high"
}
Response
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Text to Image.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Missing a required parameter
{
"error": "Invalid request parameters",
"message": "'prompt' is required",
"violations": [
"'prompt' is required"
]
}
Error via Status/Webhook
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
A request blocked by the content safety filter returns status: "ERROR" with a message asking you to rephrase the prompt or use a different reference image. Failed requests are not charged.
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/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/webp) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
PixelForge 3.0 API Pricing
PixelForge 3.0 API Documentation
https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/editing
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Image (Image Editing) - PixelForge 3.0
Edit an existing image with a text instruction. The model changes only what you ask for and leaves the rest of the picture intact.
Request Code
POST https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/editing
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Change the background to a soft blue gradient",
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
import requests
url = "https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/editing"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Change the background to a soft blue gradient",
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const response = await fetch("https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/editing", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "Change the background to a soft blue gradient",
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
})
});
const data = await response.json();
console.log(data);
curl -X POST "https://gateway.pixazo.ai/pixelforge-v3/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 '{
"prompt": "Change the background to a soft blue gradient",
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}'
Output
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Send an X-Webhook-URL header with your request and the finished result is POSTed to that URL, so you do not have to poll.
POST https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/editing
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
X-Webhook-URL: https://your-server.example.com/hooks/pixelforge
Webhook Payload (Success)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
}
}
Webhook Payload (Failure)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
- Delivery — one POST per terminal result, retried a few times on a non-2xx response.
- Respond quickly — return 2xx 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 (Image Editing)
Pricing: $0.011 per generated image. Requests that set num_images > 1 are billed per image (num_images × $0.011).
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | 1–4000 characters | A detailed description of the image you want. Be specific about the subject, style, lighting and composition. |
| image_url | Yes | string | — | Public HTTPS URL or base64 data URI | The image to edit, as a public HTTPS URL — no size limit — or supplied inline as a data:image/...;base64, data URI. Inline data URIs only are capped at 20 MB per image and 40 MB per request; use an HTTPS URL for anything larger. |
| num_images | No | integer | 1 | 1–4 | How many images to generate in one request. Billed per image — n images cost n × $0.011. |
| image_size | No | string | auto | auto · 1024x1024 · 1024x1536 · 1536x1024 · 1792x1024 · 1024x1792 · 1:1 · 3:2 · 2:3 · 16:9 · 9:16 · square · portrait · landscape | The shape of the output. This sets the aspect ratio only — the generator picks its own resolution and caps the long edge at roughly 1600 px, so the returned pixel dimensions will not match the numbers you supply. Omit it, or send auto, to let the model choose. |
| output_format | No | string | webp | webp · png · jpeg · jpg | Encoding of the returned image. webp gives the smallest files at equivalent quality. jpg is accepted as a synonym for jpeg. |
| quality | No | string | high | standard · high | high lets the model reason for longer before drawing, which helps with complex prompts and legible text. standard is faster. Both cost the same. |
Not supported by this model. Sending any of these returns 400 with an explanation rather than being silently ignored: seed (generation is non-deterministic — the same prompt returns a different image every time), mask / mask_url (there is no masked in-painting; describe the region to change in the prompt), background / transparent (output is always opaque), stream and partial_images (results arrive by polling), and model, moderation, response_format and tool_enablement.
Minimum Request
{
"prompt": "Change the background to a soft blue gradient",
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
Full Request (all options)
{
"prompt": "Change the background to a soft blue gradient",
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"num_images": 1,
"image_size": "1024x1024",
"output_format": "webp",
"quality": "high"
}
Response
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image to Image (Image Editing).
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Missing a required parameter
{
"error": "Invalid request parameters",
"message": "'prompt' is required",
"violations": [
"'prompt' is required"
]
}
Error via Status/Webhook
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
A request blocked by the content safety filter returns status: "ERROR" with a message asking you to rephrase the prompt or use a different reference image. Failed requests are not charged.
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/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/webp) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
PixelForge 3.0 API Pricing
PixelForge 3.0 API Documentation
https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/compose
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image to Image (Multi-Image Compose) - PixelForge 3.0
Blend two or more images into a single scene — for example, place a product from one photograph into the setting of another. The model may rearrange the layout to make the composition work.
Request Code
POST https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/compose
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Place the product from the first image on the table in the second image",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
]
}
import requests
url = "https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/compose"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Place the product from the first image on the table in the second image",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const response = await fetch("https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/compose", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "Place the product from the first image on the table in the second image",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
]
})
});
const data = await response.json();
console.log(data);
curl -X POST "https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/compose" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Place the product from the first image on the table in the second image",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
]
}'
Output
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Send an X-Webhook-URL header with your request and the finished result is POSTed to that URL, so you do not have to poll.
POST https://gateway.pixazo.ai/pixelforge-v3/v1/image-to-image/compose
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
X-Webhook-URL: https://your-server.example.com/hooks/pixelforge
Webhook Payload (Success)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
}
}
Webhook Payload (Failure)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
- Delivery — one POST per terminal result, retried a few times on a non-2xx response.
- Respond quickly — return 2xx 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 (Multi-Image Compose)
Pricing: $0.011 per generated image. Requests that set num_images > 1 are billed per image (num_images × $0.011).
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | 1–4000 characters | A detailed description of the image you want. Be specific about the subject, style, lighting and composition. |
| image_urls | Yes | array of string | — | 2–6 items | The images to combine, as public HTTPS URLs or base64 data URIs. At least two are required — use image-to-image/editing for a single image. They must be two different images: repeated URLs are collapsed before the minimum is checked, so [A, A] is rejected as one image, not accepted as two. |
| num_images | No | integer | 1 | 1–4 | How many images to generate in one request. Billed per image — n images cost n × $0.011. |
| image_size | No | string | auto | auto · 1024x1024 · 1024x1536 · 1536x1024 · 1792x1024 · 1024x1792 · 1:1 · 3:2 · 2:3 · 16:9 · 9:16 · square · portrait · landscape | The shape of the output. This sets the aspect ratio only — the generator picks its own resolution and caps the long edge at roughly 1600 px, so the returned pixel dimensions will not match the numbers you supply. Omit it, or send auto, to let the model choose. |
| output_format | No | string | webp | webp · png · jpeg · jpg | Encoding of the returned image. webp gives the smallest files at equivalent quality. jpg is accepted as a synonym for jpeg. |
| quality | No | string | high | standard · high | high lets the model reason for longer before drawing, which helps with complex prompts and legible text. standard is faster. Both cost the same. |
Not supported by this model. Sending any of these returns 400 with an explanation rather than being silently ignored: seed (generation is non-deterministic — the same prompt returns a different image every time), mask / mask_url (there is no masked in-painting; describe the region to change in the prompt), background / transparent (output is always opaque), stream and partial_images (results arrive by polling), and model, moderation, response_format and tool_enablement.
Minimum Request
{
"prompt": "Place the product from the first image on the table in the second image",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
]
}
Full Request (all options)
{
"prompt": "Place the product from the first image on the table in the second image",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/scene-end.jpg"
],
"num_images": 1,
"image_size": "1536x1024",
"output_format": "webp",
"quality": "high"
}
Response
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image to Image (Multi-Image Compose).
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Missing a required parameter
{
"error": "Invalid request parameters",
"message": "'prompt' is required",
"violations": [
"'prompt' is required"
]
}
Error via Status/Webhook
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
A request blocked by the content safety filter returns status: "ERROR" with a message asking you to rephrase the prompt or use a different reference image. Failed requests are not charged.
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/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/webp) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
PixelForge 3.0 API Pricing
PixelForge 3.0 API Documentation
https://gateway.pixazo.ai/pixelforge-v3/v1/reference-to-image
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Reference to Image - PixelForge 3.0
Generate a new image that keeps the subject, style or product from one to three reference images. Use it to hold a character or a product identity steady across a series of shots.
Request Code
POST https://gateway.pixazo.ai/pixelforge-v3/v1/reference-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "The same product photographed on a marble kitchen counter in morning light",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}
import requests
url = "https://gateway.pixazo.ai/pixelforge-v3/v1/reference-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "The same product photographed on a marble kitchen counter in morning light",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const response = await fetch("https://gateway.pixazo.ai/pixelforge-v3/v1/reference-to-image", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
},
body: JSON.stringify({
"prompt": "The same product photographed on a marble kitchen counter in morning light",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
})
});
const data = await response.json();
console.log(data);
curl -X POST "https://gateway.pixazo.ai/pixelforge-v3/v1/reference-to-image" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "The same product photographed on a marble kitchen counter in morning light",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}'
Output
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Send an X-Webhook-URL header with your request and the finished result is POSTed to that URL, so you do not have to poll.
POST https://gateway.pixazo.ai/pixelforge-v3/v1/reference-to-image
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
X-Webhook-URL: https://your-server.example.com/hooks/pixelforge
Webhook Payload (Success)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
}
}
Webhook Payload (Failure)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
- Delivery — one POST per terminal result, retried a few times on a non-2xx response.
- Respond quickly — return 2xx 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 - Reference to Image
Pricing: $0.011 per generated image. Requests that set num_images > 1 are billed per image (num_images × $0.011).
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | 1–4000 characters | A detailed description of the image you want. Be specific about the subject, style, lighting and composition. |
| reference_image_urls | Yes | array of string | — | 1–3 items | Reference images that anchor the subject, product or style, as public HTTPS URLs or base64 data URIs. They condition the new image rather than being edited in place. |
| num_images | No | integer | 1 | 1–4 | How many images to generate in one request. Billed per image — n images cost n × $0.011. |
| image_size | No | string | auto | auto · 1024x1024 · 1024x1536 · 1536x1024 · 1792x1024 · 1024x1792 · 1:1 · 3:2 · 2:3 · 16:9 · 9:16 · square · portrait · landscape | The shape of the output. This sets the aspect ratio only — the generator picks its own resolution and caps the long edge at roughly 1600 px, so the returned pixel dimensions will not match the numbers you supply. Omit it, or send auto, to let the model choose. |
| output_format | No | string | webp | webp · png · jpeg · jpg | Encoding of the returned image. webp gives the smallest files at equivalent quality. jpg is accepted as a synonym for jpeg. |
| quality | No | string | high | standard · high | high lets the model reason for longer before drawing, which helps with complex prompts and legible text. standard is faster. Both cost the same. |
Not supported by this model. Sending any of these returns 400 with an explanation rather than being silently ignored: seed (generation is non-deterministic — the same prompt returns a different image every time), mask / mask_url (there is no masked in-painting; describe the region to change in the prompt), background / transparent (output is always opaque), stream and partial_images (results arrive by polling), and model, moderation, response_format and tool_enablement.
Minimum Request
{
"prompt": "The same product photographed on a marble kitchen counter in morning light",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
]
}
Full Request (all options)
{
"prompt": "The same product photographed on a marble kitchen counter in morning light",
"reference_image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
],
"num_images": 2,
"image_size": "1024x1536",
"output_format": "webp",
"quality": "high"
}
Response
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-v3_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 Reference to Image.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Missing a required parameter
{
"error": "Invalid request parameters",
"message": "'prompt' is required",
"violations": [
"'prompt' is required"
]
}
Error via Status/Webhook
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-v3",
"error": "Description of the error",
"output": null
}
A request blocked by the content safety filter returns status: "ERROR" with a message asking you to rephrase the prompt or use a different reference image. Failed requests are not charged.
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/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-v3",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-v3_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.webp"
],
"media_type": "image/webp"
},
"created_at": "2026-07-23T10:00:00.000Z",
"updated_at": "2026-07-23 10:00:15",
"completed_at": "2026-07-23 10:00:15"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated images (R2 CDN) |
| output.media_type | string | MIME type of the output (image/webp) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error (e.g. bad inputs) — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
PixelForge 3.0 API Pricing
PixelForge 2.0 API Documentation
https://gateway.pixazo.ai/pixelforge-image-v2/v1/text-to-image
Text to Image - PixelForge V2
Image search — returns existing library images matching your text query (not a generation). Free, synchronous (~1s), and returns results inline (no polling). Up to 100 results per query.
Request Code
POST https://gateway.pixazo.ai/pixelforge-image-v2/v1/text-to-image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: your-subscription-key-here
{
"text": "red dress",
"type": "tags,caption",
"seed": 1,
"size": 10
}
import requests
url = "https://gateway.pixazo.ai/pixelforge-image-v2/v1/text-to-image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "your-subscription-key-here"
}
data = {
"text": "red dress",
"type": "tags,caption",
"seed": 1,
"size": 10
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/pixelforge-image-v2/v1/text-to-image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'your-subscription-key-here'
};
const body = {
text: 'red dress',
type: 'tags,caption',
seed: 1,
size: 10
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(body)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST https://gateway.pixazo.ai/pixelforge-image-v2/v1/text-to-image \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: your-subscription-key-here" \
-d '{
"text": "red dress",
"type": "tags,caption",
"seed": 1,
"size": 10
}'
Output
{
"text": "red dress",
"type": ["tags", "caption"],
"seed": 1,
"size": 10,
"total": 100,
"results": [
{
"key": "vibe/example-image.png",
"caption": "A short caption describing the image.",
"url": "https://images.mediadirhub.com/vibe/example-image.png"
}
]
}
Request Parameters - Text to Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
text | Yes | string | — | — | The search query. Matches against the image library; an empty value returns no results. |
type | No | string | all fields | tags, caption (comma-separated) | Which fields to match against, e.g. tags,caption. Omit (or send an unknown value) to search all fields. Also accepts a JSON array, e.g. ["tags","caption"]. |
seed | No | integer | — (random) | −(2^53−1) … 2^53−1 | Deterministic shuffle seed — the same seed returns the same ordering. Omit for a random order each call. Values beyond ±2^53 lose precision. |
size | No | integer | 10 | 1 – 100 | Number of results to return. Values > 100 are clamped to 100; ≤ 0 or non-numeric fall back to 10. |
Served by the Qwen text-to-image engine. Free — no credit cost. Advanced callers may send a full DashScope-style body (model/input/parameters), which is passed through unchanged. Typical generation time ~10–15 seconds (synchronous response).
Example Request
{
"text": "red dress",
"type": "tags,caption",
"seed": 1,
"size": 10
}
Response
{
"text": "red dress",
"type": ["tags", "caption"],
"seed": 1,
"size": 10,
"total": 100,
"results": [
{
"key": "vibe/example-image.png",
"caption": "A short caption describing the image.",
"url": "https://images.mediadirhub.com/vibe/example-image.png"
}
]
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key for authentication |
Response Handling
Common status codes for Text to Image.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
PixelForge 2.0 API Pricing
PixelForge 1.0 API Documentation
https://gateway.pixazo.ai/pixelforge-image/v1/qwen_image_gen/serve_image
Generate Image - Pixelforge Image API
Request Code
POST https://gateway.pixazo.ai/pixelforge-image/v1/qwen_image_gen/serve_image
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: your-subscription-key-here
{
"prompt": "A futuristic city skyline at sunset with flying cars and neon signs"
}
import requests
url = "https://gateway.pixazo.ai/pixelforge-image/v1/qwen_image_gen/serve_image"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "your-subscription-key-here"
}
data = {
"prompt": "A futuristic city skyline at sunset with flying cars and neon signs"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/pixelforge-image/v1/qwen_image_gen/serve_image';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'your-subscription-key-here'
};
const body = {
prompt: 'A futuristic city skyline at sunset with flying cars and neon signs'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(body)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST https://gateway.pixazo.ai/pixelforge-image/v1/qwen_image_gen/serve_image \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: your-subscription-key-here" \
-d '{
"prompt": "A futuristic city skyline at sunset with flying cars and neon signs"
}'
Output
Synchronous — the generated image is returned inline in this response at output.choices[0].message.content[0].image. There is no separate “get result” / polling step.
{
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{ "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/qwen-image/qwen-image-....png" }
]
}
}
],
"task_metric": { "FAILED": 0, "SUCCEEDED": 1, "TOTAL": 1 }
},
"usage": { "height": 1328, "image_count": 1, "width": 1328 }
}
Request Parameters - Generate Image
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | Max 800 characters | The text prompt describing the image you want to generate. Supports English and Chinese; you can provide detailed and creative descriptions to guide the image generation process. |
| size | No | string | 1328*1328 | 1664*928 (16:9), 1472*1104 (4:3), 1328*1328 (1:1), 1104*1472 (3:4), 928*1664 (9:16) | Output image resolution as width*height. When omitted, the gateway applies 1328*1328 (square). |
| negative_prompt | No | string | — | Max 500 characters | Describes elements you do not want in the generated image. Available only with the DashScope-style body (inside "parameters"); the simple prompt/size body does not carry it. |
| prompt_extend | No | boolean | true | true, false | Enables smart prompt rewriting that enriches brief prompts for more detailed results. Set to false when your prompt is already precise or you need lower latency. DashScope-style body only (inside "parameters"). |
| seed | No | integer | random | 0 – 2147483647 | Random seed for reproducible generations; the same seed and prompt yield similar (not always identical) images. DashScope-style body only (inside "parameters"). |
| watermark | No | boolean | false | true, false | When true, adds a "Qwen-Image" watermark to the bottom-right corner of the image. DashScope-style body only (inside "parameters"). |
Served by the Qwen text-to-image engine. Free — no credit cost. Advanced callers may send a full DashScope-style body (model/input/parameters), which is passed through unchanged. Typical generation time ~10–15 seconds (synchronous response).
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Reference image(s). |
Example Request
{
"prompt": "A futuristic city skyline at sunset with flying cars and neon signs"
}
Response
{
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{ "image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/qwen-image/qwen-image-....png" }
]
}
}
],
"task_metric": { "FAILED": 0, "SUCCEEDED": 1, "TOTAL": 1 }
},
"usage": { "height": 1328, "image_count": 1, "width": 1328 }
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key for authentication |
Response Handling
Common status codes for Generate Image.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
PixelForge 1.0 API Pricing
PixelForge 1.0 API Documentation
https://gateway.pixazo.ai/pixelforge-relighting-api/v1/relighting/generate
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
Image Edit Request - Pixelforge Relighting API
Request Code
POST https://gateway.pixazo.ai/pixelforge-relighting-api/v1/relighting/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"prompt": "Professional studio lighting with soft shadows",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
]
}
import requests
url = "https://gateway.pixazo.ai/pixelforge-relighting-api/v1/relighting/generate"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"prompt": "Professional studio lighting with soft shadows",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
async function generateRelitImage() {
const url = 'https://gateway.pixazo.ai/pixelforge-relighting-api/v1/relighting/generate';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
prompt: 'Professional studio lighting with soft shadows',
image_urls: [
'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png'
]
};
const response = await fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
});
const result = await response.json();
console.log(result);
}
generateRelitImage();
curl -X POST "https://gateway.pixazo.ai/pixelforge-relighting-api/v1/relighting/generate" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"prompt": "Professional studio lighting with soft shadows",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
]
}'
Output
{
"request_id": "pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.
Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.
Webhook Headers
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (to enable) | — | HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed). |
X-Webhook-Mode | No | terminal | terminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates. |
Example: enable webhook
X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal
Callback Payload
Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):
{
"request_id": "pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-relighting-api",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-relighting-api_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": "pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-relighting-api",
"error": "Description of the error",
"output": null,
"created_at": "...",
"updated_at": "...",
"completed_at": "..."
}
Delivery semantics
- terminal mode (default) — exactly one
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries. - HTTPS required — plain
http://URLs are rejected.
Request Parameters - Image Edit Request
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description of desired lighting effect. Max 800 characters. |
| image_urls | Yes | array | — | — | Array of reference image URLs (1-10 images). Must be publicly accessible. Supports JPEG, PNG, WEBP. |
| image_size | No | string/object | "square_hd" | "square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9" or custom {"width": 1280, "height": 720} | Output size. Options: "square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9" or custom {"width": 1280, "height": 720} |
| num_inference_steps | No | integer | 50 | 1–150. | Number of refinement steps the model runs while generating. Higher values refine detail and quality but increase processing time; lower values are faster. |
| guidance_scale | No | number | 4 | 1–20. | Controls how closely the output follows your prompt (prompt adherence). Higher values stick more strictly to the prompt; lower values allow more creative variation. |
| num_images | No | integer | 1 | 1–4. | Number of images to generate. Range: 1-4. |
| enable_safety_checker | No | boolean | true | true, false | Turns on automatic filtering of unsafe or explicit (NSFW) content. Leave enabled unless you have a specific reason to disable it. |
| output_format | No | string | "png" | — | Output format: "jpeg" or "png". |
| negative_prompt | No | string | " " | — | Elements to exclude from generation. |
| acceleration | No | string | "regular" | — | Speed optimization: "none" or "regular". |
| loras | No | array | [] | — | A list of style add-ons (LoRAs) to apply, up to 3. Each entry needs a 'path' (the add-on's location) and an optional 'scale' for its strength (0.0-2.0). |
| webhook | No | string | — | — | Webhook URL for async notifications. |
| webhook_events_filter | No | array | ["*"] | — | Event types: ["start"], ["complete"], ["*"]. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | — | JPG, PNG, WEBP | Image(s) to relight. |
Minimum Request
{
"prompt": "Professional lighting",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/upscaler_019ed0c8-bb34-7854-afbc-b2a164758a15b/output.png"
]
}
Full Request (all options)
{
"prompt": "Professional studio lighting with soft shadows",
"image_urls": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
],
"image_size": "square_hd",
"num_inference_steps": 50,
"guidance_scale": 4,
"num_images": 1,
"enable_safety_checker": true,
"output_format": "png",
"negative_prompt": " ",
"acceleration": "regular",
"loras": [
{
"path": "https://.../files/lighting-lora.safetensors",
"scale": 1.0
}
],
"webhook": "https://your-domain.com/webhook",
"webhook_events_filter": [
"*"
]
}
Response
{
"request_id": "pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key |
Response Handling
Common status codes for Image Edit Request.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'pixelforge-relighting-api' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "pixelforge-relighting-api",
"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/pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response (Completed)
{
"request_id": "pixelforge-relighting-api_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "COMPLETED",
"model_id": "pixelforge-relighting-api",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/pixelforge-relighting-api_019dxxxx-xxxx/output.ext"
],
"media_type": "application/octet-stream"
},
"created_at": "2026-03-31T10:00:00.000Z",
"updated_at": "2026-03-31T10:00:15.000Z",
"completed_at": "2026-03-31T10:00:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
PixelForge 1.0 API Pricing
⚡ Performance
Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.