Smart Resize API to Resize Images: Pricing, Documentation

by Smart Resize

Smart Resize API to Resize Images leverages the Nano Banana Pro Vision-LLM-guided model to perform composition-aware recomposition that goes beyond simple cropping, understanding image context to resize visuals to multiple target dimensions while maintaining structural integrity. It utilizes adaptive prompting to ensure high-quality, visually balanced outputs across different aspect ratios.

Get API Key
Smart Resize API

Models Version

WELCOME BONUS

Get $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

Smart Resize 1.0 API Documentation

https://gateway.pixazo.ai/smart-resize/v1/smart-resize-request

Authentication

All requests require an API key passed via header.

Header Type Required Description
Ocp-Apim-Subscription-Key string Yes Your API subscription key

Smart Resize generate request - Smart Resize

Request Code

POST /smart-resize-request HTTP/1.1
Host: gateway.pixazo.ai
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
  "target_sizes": [
    "1024x1024",
    "1920x1080"
  ]
}
import requests

url = "https://gateway.pixazo.ai/smart-resize/v1/smart-resize-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
    "target_sizes": [
        "1024x1024",
        "1920x1080"
    ]
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/smart-resize/v1/smart-resize-request';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  image_url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg',
  target_sizes: [
    '1024x1024',
    '1920x1080'
  ]
};

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/smart-resize/v1/smart-resize-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
    "target_sizes": [
      "1024x1024",
      "1920x1080"
    ]
  }'

Output

{
  "images": [
    {
      "file_name": "nano-banana-pro-edit-output.png",
      "content_type": "image/png",
      "url": "[RESPONSE_URL]"
    }
  ],
  "description": ""
}

Request Parameters - Smart Resize generate request

ParameterRequiredTypeDefaultAllowed values / rangeDescription
image_urlYesstringPublicly accessible URL of the source image to resize.
target_sizesYesarray<string>1–10 items, each "<width>x<height>"The list of target dimensions to generate, each written as width×height (e.g. "1920x1080"). One output image is produced per target size (multiplied by num_images_per_size). The service picks the smallest internal preset that fully covers each target, so the result matches the requested size exactly with no upscaling.
promptNostring""Up to 5000 charactersOptional extra instruction sent along with the automatic resize prompt (e.g. "keep the face centred"). Leave empty to preserve the original image content as closely as possible.
num_images_per_sizeNointeger11–4Number of variants to produce for each target size. The response contains target_sizes × num_images_per_size images in total.
resolutionNostring"1K""1K", "2K", "4K"Hint for the minimum resolution tier used internally; a higher tier may be chosen automatically when a target size is too large for this one. It does not change the final output dimensions — those always come from target_sizes.
output_formatNostring"png""jpeg", "png", "webp"Output image format.
safety_toleranceNostring"4""1""6"Safety filtering level. Higher numbers loosen the filter: "1" is the strictest and "6" the most permissive.
seedNointegerRandom seed that controls the generation's randomness; the same seed is applied to every target size. Reuse the same seed with identical settings to reproduce a result, or leave it empty for a different output each time.
sync_modeNobooleanfalsetrue, falseIf on, the finished file is sent back directly (inline data) instead of as a download link, which adds latency for large outputs. Handy for quick tests; for normal use, leave it off to get a download link.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPImage to resize / upscale.

Minimum Request

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
  "target_sizes": [
    "1024x1024"
  ]
}

Full Request (all options)

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
  "target_sizes": [
    "1024x1024",
    "1920x1080"
  ],
  "prompt": "keep face centered",
  "num_images_per_size": 2,
  "resolution": "2K",
  "output_format": "webp",
  "safety_tolerance": "5",
  "seed": 42,
  "sync_mode": false
}

Response

{
  "request_id": "smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Response Fields - Smart Resize generate request

Field Type Description
request_id string Unique identifier for the request to use when polling for results.
status string Current status of the request (e.g., QUEUED, PROCESSING).
polling_url string URL to use for checking the status of the request.

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 Smart Resize generate request.

Code Meaning
200 Success
Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
Too Many Requests
500 Internal Server Error

Error Responses

400 Validation Error

{
  "error": "Invalid target_sizes format",
  "details": "Each item in target_sizes must be in format 'widthxheight'"
}

404 Not Found

{
  "error": "Resource not found",
  "details": "The requested endpoint does not exist"
}

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 for details
ERROR System error occurred — request was not charged

Status Flow

QUEUED → PROCESSING → COMPLETED/FAILED/ERROR

Typical Workflow

  1. Submit image request via /smart-resize-request
  2. Receive request_id in response
  3. Poll /v2/requests/status/{request_id} every 2-3 seconds
  4. When status is COMPLETED, extract image URLs from output.media_url
  5. If FAILED or ERROR, check error field for diagnostic information

Smart Resize check status - Smart Resize

Request Code

POST /smart-resize-request-result HTTP/1.1
Host: gateway.pixazo.ai
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "request_id": "smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
import requests

url = "https://gateway.pixazo.ai/v2/requests/status/smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
headers = {
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
const requestId = 'smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
const url = \`https://gateway.pixazo.ai/v2/requests/status/\${requestId}\`;
const headers = {
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};

fetch(url, {
  method: 'GET',
  headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Output

{
  "images": [
    {
      "file_name": "nano-banana-pro-edit-output.png",
      "content_type": "image/png",
      "url": "[RESPONSE_URL]"
    }
  ],
  "description": ""
}

Request Parameters - Smart Resize check status

ParameterRequiredTypeDefaultAllowed values / rangeDescription
request_idYesstringThe request_id returned from the original /smart-resize-request submission.

Minimum Request

{
  "request_id": "smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Full Request (all options)

{
  "request_id": "smart-resize_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Response

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

Response Fields - Smart Resize check status

Field Type Description
request_id string Unique identifier for the request.
status string Current status of the request (e.g., COMPLETED, FAILED).
model_id string The model used to process the request.
error string/null Error message if the request failed, otherwise null.
output.media_url string[] Array of public URLs for the generated images.
output.media_type string The MIME type of the generated images (e.g., image/png).
created_at string Timestamp when the request was created (ISO 8601).
updated_at string Timestamp when the request was last updated (ISO 8601).
completed_at string Timestamp when the request was completed (ISO 8601).

Request Headers

Header Value
Ocp-Apim-Subscription-Key Your API subscription key

Response Handling

Common status codes for Smart Resize check status.

Code Meaning
200 Success
Bad Request
401 Unauthorized
404 Not Found
Too Many Requests
500 Internal Server Error

Notes & Tips

  1. Poll the status endpoint every 2–3 seconds until status is COMPLETED, FAILED, or ERROR.
  2. Implement exponential backoff for retry logic on 5xx HTTP errors.
  3. Use the seed parameter for consistent results during testing or iterative refinement.
  4. For production use, validate image_url accessibility before submission.
  5. Prefer output_format: webp for smaller file sizes with high quality.
  6. Use sync_mode: true only for small batches or local testing — data URIs increase response size significantly.
  7. Processing time typically takes 10–30 seconds depending on image size and complexity.
  8. The API generates one image per target_size x num_images_per_size, so a single request with two target sizes and two variants per size will produce 4 output images.

Smart Resize 1.0 API Pricing

UsagePrice (USD)
Per output image$0.15
Vision analysis fee (per request)$0.05

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
1,400last 30d
~47 per day
Success rate
64.3%
of completed generations
Generation time
73.1savg
p95 67.3s
Requests
Jul 8max 400Aug 6
Smart Resize 1.0Avg 47/day
Generation Time
Jul 8max 81.4sAug 6
Smart Resize 1.0Avg 73.1s
Error Rate
Jul 8max 100.0%Aug 6
Smart Resize 1.0Avg 35.7%

〰 Uptime

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

Avg. Success Rate (30d)
64.29%
across all generations of this model family
Uptime
Jul 8max 100%Aug 6
SuccessfulAvg 64.29%