Pixelforge 3.0 API, Pixelforge 2.0 API Free, Pixelforge 1.0 API: Pricing, Documentation
by Pixazo
Pixelforge provides specialized AI capabilities for image generation and advanced relighting, allowing users to change lighting conditions in existing images. Through Pixazo's 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 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
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 — exactly one POST when the request reaches a terminal status. It is not retried: if your endpoint is unreachable or returns a non-2xx, that notification is lost and you must fall back to polling
/v2/requests/status/{request_id}, which stays authoritative either way. - Respond quickly — return 2xx promptly. Because there is no retry, a slow or erroring handler loses the callback outright.
- Treat it as an optimisation, not a guarantee — the webhook saves you from polling in the common case; the status endpoint is the source of truth.
- 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 — exactly one POST when the request reaches a terminal status. It is not retried: if your endpoint is unreachable or returns a non-2xx, that notification is lost and you must fall back to polling
/v2/requests/status/{request_id}, which stays authoritative either way. - Respond quickly — return 2xx promptly. Because there is no retry, a slow or erroring handler loses the callback outright.
- Treat it as an optimisation, not a guarantee — the webhook saves you from polling in the common case; the status endpoint is the source of truth.
- 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 — exactly one POST when the request reaches a terminal status. It is not retried: if your endpoint is unreachable or returns a non-2xx, that notification is lost and you must fall back to polling
/v2/requests/status/{request_id}, which stays authoritative either way. - Respond quickly — return 2xx promptly. Because there is no retry, a slow or erroring handler loses the callback outright.
- Treat it as an optimisation, not a guarantee — the webhook saves you from polling in the common case; the status endpoint is the source of truth.
- 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 — exactly one POST when the request reaches a terminal status. It is not retried: if your endpoint is unreachable or returns a non-2xx, that notification is lost and you must fall back to polling
/v2/requests/status/{request_id}, which stays authoritative either way. - Respond quickly — return 2xx promptly. Because there is no retry, a slow or erroring handler loses the callback outright.
- Treat it as an optimisation, not a guarantee — the webhook saves you from polling in the common case; the status endpoint is the source of truth.
- 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 2.0 API Documentation
POST https://gateway.pixazo.ai/content-safety/v1/image-moderation
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 Moderation - Content Safety
Analyze an image for objectionable content across four harm categories (Hate, SelfHarm, Sexual, Violence). The response returns a per-category severity (0 Safe, 2 Low, 4 Medium, 6 High) and a single flagged boolean. Synchronous — the verdict is returned in one call (typically under 1 second).
Request Code
POST /content-safety/v1/image-moderation HTTP/1.1
Host: gateway.pixazo.ai
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
Content-Type: application/json
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
import requests
url = "https://gateway.pixazo.ai/content-safety/v1/image-moderation"
headers = {
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY",
"Content-Type": "application/json",
}
payload = {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"}
resp = requests.post(url, headers=headers, json=payload)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/content-safety/v1/image-moderation", {
method: "POST",
headers: {
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg" }),
});
const data = await res.json();
console.log(data);
curl -X POST "https://gateway.pixazo.ai/content-safety/v1/image-moderation" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
-H "Content-Type: application/json" \
-d '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"}'
Output
{
"flagged": false,
"categories": [
{ "category": "Sexual", "severity": 0 },
{ "category": "Violence", "severity": 0 },
{ "category": "Hate", "severity": 0 },
{ "category": "SelfHarm", "severity": 0 }
],
"severity_threshold": 2,
"ms": 414
}
Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| image_url | string | Conditional | — | Public http(s) URL of the image to analyze. Must return an image/* content-type and be ≤ 4 MB (50×50 to 2048×2048 px). Provide either image_url or image_b64. |
| image_b64 | string | Conditional | — | Base64-encoded image bytes, as an alternative to image_url (same size limits). Provide either image_url or image_b64. |
| categories | array<string> | No | all four | Restrict analysis to a subset of ["Hate", "SelfHarm", "Sexual", "Violence"]. Omit to analyze all four. |
| severity_threshold | integer | No | 2 | Minimum severity (0, 2, 4, 6) counted as flagged. 2 = Low and up (strict), 4 = Medium/High only, 6 = High only. Clamped to 0–6. |
Severity levels returned per category: 0 Safe, 2 Low, 4 Medium, 6 High.
Example Request
{
"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
"categories": ["Sexual", "Violence"],
"severity_threshold": 4
}
Example Response
{
"flagged": false,
"categories": [
{ "category": "Sexual", "severity": 0 },
{ "category": "Violence", "severity": 2 }
],
"severity_threshold": 4,
"ms": 512
}
Response Fields
| Field | Type | Description |
|---|---|---|
flagged | boolean | true = at least one category's severity is ≥ severity_threshold, so the image should be blocked or sent for review. false = every category is below the threshold (safe to allow). Use the per-category severity values to decide how to handle a flagged image. |
categories | array | One entry per analyzed harm category. |
categories[].category | string | The harm category: Hate, SelfHarm, Sexual, or Violence. |
categories[].severity | integer | How strongly that category was detected — 0, 2, 4, or 6 (see Severity Levels below). |
severity_threshold | integer | The threshold applied to this request (minimum severity counted as flagged). Defaults to 2; override per request. |
ms | integer | Server-side processing time, in milliseconds. |
What Each Category Detects
Every image is analyzed against these four harm categories.
| Category | Covers |
|---|---|
| Sexual | Nudity & pornography, sexual acts and imagery, vulgar content, prostitution, abuse, and child exploitation/grooming (including forced or assault sexual content). |
| Violence | Physical actions intended to hurt, injure, or kill; weapons & guns; gore, injury, and death; bullying & intimidation; domestic violence & physical abuse; terrorism; stalking. |
| Hate | Attacks or discriminatory content targeting identity attributes — race, ethnicity, nationality, gender identity/expression, sexual orientation, religion, appearance/body size, disability — plus harassment, bullying, and hate symbols. |
| SelfHarm | Self-injury, suicide, and related acts; eating disorders; and bullying/intimidation that promotes self-harm. |
Severity Levels
Each category returns one of four severity levels. flagged is true when any category's severity is at or above severity_threshold.
| Severity | Level | Meaning |
|---|---|---|
| 0 | Safe | No objectionable content detected in this category; content is appropriate. |
| 2 | Low | Content may be inappropriate in some contexts; low risk. |
| 4 | Medium | Content is inappropriate and should generally be filtered. |
| 6 | High | Content is highly inappropriate or harmful and should be blocked. |
Example: Sexual: 4 with severity_threshold: 2 → flagged: true (4 ≥ 2). The same image with severity_threshold: 6 → flagged: false (4 < 6).
What Each Level Means Per Category (images)
| Category | Low (2) | Medium (4) | High (6) |
|---|---|---|---|
| Sexual | Suggestive/racy poses, non-graphic nudity in artwork, body art. | Erotic or soft-nude content, obscured/partial sexual activity. | Explicit sexual acts & organs, CSAM, non-consensual acts. |
| Violence | Weapons or bladed tools in display or use, light injury, non-realistic violence. | Moderate gore; domestic violence & physical abuse; use of force/coercion to intimidate an individual; a weapon used against a target. | High gore, graphic injury/death, dismemberment, terrorism. |
| Hate | Stereotyping, biased sentiment, certain hate symbols in context. | Insults, mocking, dehumanization, promotion of exclusion of an identity group. | Hate-speech/hate-crime imagery, glorified extremist/hate symbols. |
| SelfHarm | Scars, self-harm tools/injury in recovery, emaciation. | Mocking survivors; self-harm shown as a solution; moderate gore. | Explicit self-harm or suicide acts, high gore. |
Request Headers
| Header | Required | Description |
|---|---|---|
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key |
| Content-Type | Yes | Must be application/json |
Response Handling
| Status | Meaning |
|---|---|
| 200 OK | Analysis complete. Body contains flagged and per-category severity. |
| 400 Bad Request | Invalid JSON, missing both image_url and image_b64, or invalid categories. |
| 401 Unauthorized | Missing or invalid subscription key. |
| 403 Insufficient Balance | Wallet balance is too low to cover the request. |
| 422 Unprocessable | The image could not be fetched or is not a valid/supported image (bad URL, non-image content-type, > 4 MB, or corrupt). |
| 429 Too Many Requests | Rate limit exceeded. Retry after a short delay. |
| 503 Service Unavailable | Moderation backend temporarily unavailable. Retry. |
Limitations & Best Practices
- Strong on graphic / explicit content — gore, weapons, visible injury, and explicit sexual imagery are detected reliably.
- May under-detect implied or staged scenes — a threatening pose or an intimidation scene without visible weapons, gore, or injury can score below the flag threshold even when a human reads it as harmful. Treat a low or zero score as “no graphic violation detected,” not a guarantee that the image is safe.
- Tune the threshold — lower
severity_threshold(to0or2) to catch borderline / suggestive content; raise it to flag only clear violations. - For high-stakes moderation, pair the API with human review of flagged and borderline content.
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/....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 (longer prompts are truncated to the first 800) | The text prompt describing the image you want to generate. 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). |
Served by the PixelForge text-to-image engine. Advanced callers may send a DashScope-style body (model/input/parameters); only the prompt text in input.messages[0].content and parameters.size are used, and the model value is ignored. Other parameters, such as negative_prompt, prompt_extend, seed and watermark, are not supported and are ignored. Typical generation time ~10–40 seconds (synchronous response).
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 0 | Not supported | Image input is not supported on this endpoint; requests that include an image return 400 InvalidParameter. |
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/....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. InvalidParameter, DataInspectionFailed, Throttling and InternalError errors return JSON with code, message and request_id. Failed requests are not charged.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request — InvalidParameter (for example a missing prompt, an unsupported size, or image input) or DataInspectionFailed (the prompt was rejected by the content safety filter) |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Too Many Requests — retry shortly (Throttling: the image service is busy) |
| 500 | Internal Server Error |
| 502 | Bad Gateway — InternalError: image generation failed; retry |
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.