P-Image API - AI Image Editing & Transformation APIs
by Pruna AI
P Image by Pruna AI provides advanced AI-powered image editing and transformation capabilities. Through Pixazo's API, developers can integrate intelligent image editing features that enable precise modifications, creative transformations, and image-to-image generation. The API supports versatile editing workflows for content creators, designers, and developers seeking high-quality AI image processing.

Models Version
Get $5 Free Credit on First Payment
No strings attached — add funds and get $5 bonus instantly
P Image Upscale Image to Image (Image Upscaler) API Documentation
https://gateway.pixazo.ai/p-image-upscale/v1
Authentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your API subscription key |
P Image Upscale Request - P Image Upscale API
Request Code
POST https://gateway.pixazo.ai/p-image-upscale/v1/p-image-upscale/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY
{
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
}
import requests
url = "https://gateway.pixazo.ai/p-image-upscale/v1/p-image-upscale/generate"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/p-image-upscale/v1/p-image-upscale/generate';
const headers = {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
image: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/p-image-upscale/v1/p-image-upscale/generate" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
--data-raw '{
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
}'
Output
{
"request_id": "p-image-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-image-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - P Image Upscale Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| image | Yes | string (URI) | Input image URL to upscale. Must be publicly accessible. |
| upscale_mode | No | string | Upscale mode: "target" (scales to fixed megapixel resolution) or "factor" (multiplies each side by factor). Default: "target". |
| target | No | integer | Target resolution in megapixels (1-8). Used when upscale_mode is "target". Default: 4. |
| factor | No | number | Scaling factor applied to each side (1-8). Used when upscale_mode is "factor". Output capped at 8 MP. Default: 2. |
| enhance_details | No | boolean | Enhance fine textures and small details. May increase contrast. Default: false. |
| enhance_realism | No | boolean | Improve realism. Recommended for AI-generated images. Default: true. |
| output_format | No | string | Output format: "webp", "jpg", or "png". Default: "jpg". |
| output_quality | No | integer | Output quality (0-100). 100 is best. Not relevant for PNG. Default: 80. |
| disable_safety_checker | No | boolean | Disable safety checker. Default: false. |
Example Request
{
"image": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png",
"upscale_mode": "target",
"target": 4,
"enhance_details": true,
"enhance_realism": true,
"output_format": "jpg",
"output_quality": 90
}
Response
{
"request_id": "p-image-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-image-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
Error Responses
Queue system errors and model validation errors.
Queue System Errors
// 402 — Insufficient balance
{
"error": "Insufficient Balance",
"message": "Your wallet does not have enough balance. Required: $0.01"
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'p-image-upscale' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "p-image-upscale_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "p-image-upscale",
"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/p-image-upscale_019d5176-9030-7fba-9adc-4952048aa80bf"
Response (Completed)
{
"request_id": "p-image-upscale_019d5176-9030-7fba-9adc-4952048aa80bf",
"status": "COMPLETED",
"model_id": "p-image-upscale",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-image-upscale_019d5176-9030-7fba-9adc-4952048aa80bf/output.jpg"
],
"media_type": "image/jpeg"
},
"created_at": "2026-03-31T07:32:03.749Z",
"updated_at": "2026-03-31T07:32:20.000Z",
"completed_at": "2026-03-31T07:32:20.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 (image/jpeg) |
| 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.
P Image Upscale Image to Image (Image Upscaler) API Pricing
| Resolution | Price (USD) |
|---|---|
| 1-4MP | $0.005 |
| 4-8MP | $0.01 |
P Image v1 Image to Image (Image Editing) API Documentation
https://gateway.pixazo.ai/p-image/v1
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 Request - P Image
Request Code
POST https://gateway.pixazo.ai/p-image/v1/p-image-edit/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY
{
"prompt": "The woman dress is changed to black",
"images": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
]
}
import requests
url = "https://gateway.pixazo.ai/p-image/v1/p-image-edit/generate"
headers = {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
"prompt": "The woman dress is changed to black",
"images": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"]
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/p-image/v1/p-image-edit/generate';
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
'Ocp-Apim-Subscription-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
prompt: 'The woman dress is changed to black',
images: ['https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png']
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/p-image/v1/p-image-edit/generate" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--data-raw '{
"prompt": "The woman dress is changed to black",
"images": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"]
}'
Output
{
"request_id": "p-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Webhook (Optional)
Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.
X-Webhook-URL: https://your-server.com/webhook/callback
Request Parameters - Image Request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Yes | — | Text prompt describing the desired image edit. You can refer to images as "image 1", "image 2", etc. |
| images | array of strings (URI) | Yes | — | Input image URLs. For editing tasks, provide the main image as the first image |
| turbo | boolean | No | true | Faster generation with additional optimizations. Turn off for complicated tasks |
| seed | integer | No | — | Random seed for reproducible generation |
| aspect_ratio | string | No | "match_input_image" | Aspect ratio for the generated image. Valid values: "match_input_image", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3" |
| disable_safety_checker | boolean | No | false | Disable safety checker for generated images |
| webhook | string | No | — | Webhook URL for async notifications when generation completes |
| webhook_events_filter | array | No | — | Event types to receive (e.g. ["completed"]) |
Minimum Request
{
"prompt": "The woman dress is changed to black",
"images": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
]
}
Full Request (all options)
{
"prompt": "The woman dress is changed to black",
"images": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
],
"turbo": true,
"seed": 42,
"aspect_ratio": "1:1",
"disable_safety_checker": false,
"webhook": "https://your-webhook.com/callback",
"webhook_events_filter": [
"completed"
]
}
Response
{
"request_id": "p-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "QUEUED",
"polling_url": "https://gateway.pixazo.ai/v2/requests/status/p-image_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 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. Required: $0.01"
}
// 400 — Model not found
{
"error": "Model not found",
"message": "Model 'p-image' not found or is disabled"
}
Error via Status/Webhook
{
"request_id": "p-image_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "ERROR",
"model_id": "p-image",
"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/p-image_019d42ce-8064-789e-5840-890db47729647"
Response (Completed)
{
"request_id": "p-image_019d42ce-8064-789e-5840-890db47729647",
"status": "COMPLETED",
"model_id": "p-image",
"error": null,
"output": {
"media_url": [
"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/p-image_019d42ce-8064-789e-5840-890db47729647/output.jpg"
],
"media_type": "image/jpeg"
},
"created_at": "2026-03-31T07:32:03.749Z",
"updated_at": "2026-03-31T07:32:20.000Z",
"completed_at": "2026-03-31T07:32:20.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 (image/jpeg) |
| 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.
P Image v1 Image to Image (Image Editing) API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.01 |