A production REST API that upscales any image to 2×, 3×, or 4× resolution using the Real-ESRGAN algorithm. One HTTP POST. PNG output. Under 10 seconds for most images. $0.01 per image — 500 free credits included, no credit card required. The best ESRGAN API for print shops, e-commerce, and stock photo workflows — with SDKs in six languages.
Sign up, grab your key from the dashboard, and POST your image. The endpoint returns a generation id; poll GET /v1/image/upscale/{id} until status=completed, then download the upscaled PNG from output_url.
curl -X POST https://api.pixelapi.dev/v1/image/upscale \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "[email protected]" \ -F "scale=4" # Response: {"id": "uuid", "status": "queued", "operation": "upscale", "credits_used": 10.0} # Poll until completed curl https://api.pixelapi.dev/v1/image/upscale/UUID \ -H "Authorization: Bearer YOUR_API_KEY" # Response: {"generation_id": "uuid", "status": "completed", "output_url": "https://..."}
pip install pixelapi
---
from pixelapi import PixelAPI
client = PixelAPI(api_key="YOUR_API_KEY")
result = client.upscale(image="photo.jpg", scale=4)
result.save("photo_4x.png") # high-res PNG
# Custom output dimensions
result = client.upscale(
image="product.jpg",
target_width=3000,
target_height=4000,
fit_mode="pad_white"
)
result.save("product_hi_res.png")
npm install pixelapi
---
import { PixelAPI } from "pixelapi";
const client = new PixelAPI({ apiKey: process.env.PIXELAPI_KEY });
const result = await client.upscale({ image: "./photo.jpg", scale: 4 });
await result.save("photo_4x.png"); // high-res PNG
// Custom dimensions
const sized = await client.upscale({
image: "./product.jpg",
targetWidth: 3000,
targetHeight: 4000,
fitMode: "pad_white",
});
await sized.save("product_hi_res.png");
composer require pixelapi/pixelapi
---
<?php
use PixelAPI\Client;
$client = new Client(getenv("PIXELAPI_KEY"));
$result = $client->upscale(["image" => "photo.jpg", "scale" => 4]);
file_put_contents("photo_4x.png", $result->getBody());
// Custom dimensions
$result = $client->upscale([
"image" => "product.jpg",
"target_width" => 3000,
"target_height"=> 4000,
"fit_mode" => "pad_white",
]);
file_put_contents("product_hi_res.png", $result->getBody());
gem install pixelapi
---
require "pixelapi"
client = PixelAPI::Client.new(api_key: ENV["PIXELAPI_KEY"])
result = client.upscale(image: "photo.jpg", scale: 4)
File.binwrite("photo_4x.png", result.body)
# Custom dimensions
result = client.upscale(
image: "product.jpg",
target_width: 3000,
target_height: 4000,
fit_mode: "pad_white"
)
File.binwrite("product_hi_res.png", result.body)
go get github.com/pixelapi/pixelapi-go
---
import "github.com/pixelapi/pixelapi-go"
client := pixelapi.New("YOUR_API_KEY")
result, err := client.Upscale("photo.jpg", pixelapi.UpscaleParams{Scale: 4})
if err != nil { panic(err) }
result.Save("photo_4x.png")
// Custom dimensions
result, err = client.Upscale("product.jpg", pixelapi.UpscaleParams{
TargetWidth: 3000,
TargetHeight: 4000,
FitMode: "pad_white",
})
result.Save("product_hi_res.png")
PixelAPI uses a simple per-image credit model with no subscription lock-in. Compare against the main alternatives:
| Provider | Free tier | Per-image API cost | Scale factors | Output |
|---|---|---|---|---|
| PixelAPI | 500 credits, no card | $0.010 | 2× · 3× · 4× | PNG · custom dims |
| Upscale.media | 3 images/month | ~$0.011–$0.14 (volume-tiered) | 2× · 4× | PNG · JPG |
| Let's Enhance / Claid.ai | 10 credits | see letsenhance.io/pricing | 2× · 4× · 8× · 16× | PNG · JPG · WebP |
| Topaz Gigapixel AI | — | Enterprise quote (see topazlabs.com/pricing) | 2× · 4× · 6× | PNG · JPG · TIFF |
| Vance.ai / Unifab.ai | 3 credits | see unifab.ai/pricing | 2× · 4× | PNG · JPG |
Pricing verified from each rival's public pricing page May 2026. PixelAPI per-image price is set at exactly half the cheapest rival's verified per-unit rate, per our published pricing policy.
Controls the upscale multiplier. 4× quadruples each dimension — a 500×500 input becomes 2000×2000. Use 2× for moderate enlargement or when file size matters.
Pass exact pixel dimensions (64–8192 px each) instead of a scale factor. The API picks the right scale internally, then resizes to your exact target. If the target is smaller than the input, only 2 credits are charged (fast CPU path, no upscale model).
stretch — exact target dimensions, may distort if aspect ratios differ.
pad_white — preserve aspect, add white padding to fill target.
pad_transparent — preserve aspect, transparent PNG padding.
POST a file directly via multipart upload, or pass an image_url string for server-to-server workflows where the source image is already hosted. Max file size: 20 MB (JPEG, PNG, WebP).
The upscaled image is returned as a lossless PNG. Sharp edges, fine textures, and natural gradients are reconstructed by the Real-ESRGAN model — not interpolated. Works immediately in Photoshop, Figma, Lightroom, or any print pipeline.
Need exactly 3000×4000 for a print template? Pass target_width=3000&target_height=4000. The API upscales and then trims or pads to your exact spec without a second API call.
fit_mode=pad_transparent adds RGBA alpha-channel padding instead of white. Feed the result directly into a compositing pipeline without extra masking.
The endpoint returns a generation_id immediately. Poll GET /v1/image/upscale/{id} for status. When status=completed, download from output_url. Failed jobs are auto-refunded — you never pay for a broken result.
For portrait photos, old family photos, or any image with faces, use POST /v1/image/enhance. It chains 4× upscaling with face restoration in a single call — sharper faces, reconstructed fine details, all in one request. Costs 14 credits ($0.014) — cheaper than calling both endpoints separately.
curl -X POST https://api.pixelapi.dev/v1/image/enhance \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "[email protected]" \ -F "scale=4" \ -F "face_enhance=true"
The ESRGAN Upscale API is the foundation for these production workflows:
Upscale web-resolution product or editorial images to print-ready resolution (300 DPI). Automate pre-press checks in your pipeline without Photoshop.
Generate zoom-capable, high-resolution product images from supplier JPEGs. Feed directly into Shopify, BigCommerce, or WooCommerce.
Upscale stock library images to meet platform minimum-resolution requirements before licensing or submission.
Combine with Face Restore (or use the /enhance endpoint) to recover old, low-resolution photographs at archival quality.
Upscale images generated by other tools to produce print- or poster-grade output from lower-resolution generations.
Enlarge compressed listing photos for full-bleed print brochures and large-format display boards — automated at scale.
Upscale product images on upload via webhook — automatic hi-res catalog.
No-code trigger to upscale images from Google Drive, Dropbox, or any Zapier source.
Drag-and-drop 4× upscaling inside any Make scenario.
Auto-upscale CMS images so every asset is retina-ready.
API route pattern for on-demand upscaling in your Next.js app.
WordPress plugin pattern for automatic product image enhancement.
Topaz is a desktop app with no public API. PixelAPI gives you a REST endpoint, JSON responses, and SDK support — automation-ready.
Similar upscale quality. PixelAPI is credit-based with no subscription lock-in; Let's Enhance requires a monthly plan for API access.
PixelAPI adds custom target dimensions, fit_mode control, and a combined enhance endpoint missing from Upscale.media.
Vance.ai has migrated to Unifab.ai. PixelAPI offers stable REST endpoints, a dedicated status page, and GST invoicing for Indian businesses.
Also compare: vs BigJPG · vs Claid.ai · vs Deep Image AI · Topaz Gigapixel open-source alternatives
Default 60 requests/minute on the free tier, 600 on paid tiers. Exceeding the limit returns HTTP 429 with a Retry-After header. Recommended strategy: exponential backoff starting at 2s, doubling on each retry up to 30s. Both the Python and Node SDKs handle this automatically.
If target dimensions require more than 4× of the (possibly pre-shrunk) input, the API returns HTTP 400 with a message explaining the maximum achievable dimensions. Credits are never deducted for rejected requests.
# Python SDK — automatic 429 retry with backoff from pixelapi import PixelAPI client = PixelAPI(api_key="...", max_retries=4) result = client.upscale(image="batch_photo.jpg", scale=4) # auto-retries on 429
| HTTP status | Meaning | Action |
|---|---|---|
200 queued | Job accepted, poll for result | Poll GET /v1/image/upscale/{id} |
400 | Invalid parameters | Fix request (check scale vs. target dims) |
402 | Insufficient credits | Top up at pixelapi.dev/pricing |
429 | Rate limit exceeded | Retry after Retry-After seconds |
503 | Queue full | Retry with backoff — credits auto-refunded |
PixelAPI's ESRGAN API delivers production-grade 4× image upscaling at $0.01 per image with a clean REST interface, 500 free trial credits, and SDKs for Python, Node.js, PHP, Ruby, and Go. No credit card required to start — sign up and get 50 free upscales instantly.
POST your image (file upload or image_url) to https://api.pixelapi.dev/v1/image/upscale with your Bearer token. The response contains a generation id. Poll GET /v1/image/upscale/{id} until status=completed, then download from output_url. See the Quick Start above for six language examples.
The scale parameter accepts 2, 3, or 4 (default is 4). You can also pass target_width and target_height for exact pixel dimensions — the API picks the correct internal scale automatically and delivers your requested output size.
High-resolution PNG. Control aspect-ratio handling with fit_mode: stretch for exact pixel dimensions, pad_white for aspect-preserving output with white padding, pad_transparent for transparent-alpha padding ready for compositing.
$0.01 per upscale job (10 credits at $0.001/credit). New accounts get 500 free credits — 50 free upscales — with no credit card. Pure downscale jobs (target smaller than input) cost only 2 credits ($0.002). No monthly subscription; pay only for what you use.
The API accepts JPEG, PNG, or WebP files up to 20 MB. Large inputs are pre-processed automatically to prevent timeouts while preserving output quality. If the requested target dimensions require more than 4× upscaling of the input, the API returns a 400 error with guidance on adjusting the target or input size.
Yes — pass target_width and target_height (both 64–8192 px). The API determines the scale internally, upscales, then resizes to your exact target. Use fit_mode=pad_white or pad_transparent to handle aspect-ratio differences without distortion.
Free tier: 60 requests/minute. Paid tiers: 600 requests/minute. Exceeding the limit returns HTTP 429 with a Retry-After header. The Python and Node SDKs include built-in exponential-backoff retry. For higher limits on batch workloads, email [email protected].
Yes. POST /v1/image/enhance chains 4× upscaling with face restoration in a single API call. Cost: 14 credits ($0.014) — cheaper than calling both endpoints separately. Pass face_enhance=false to skip face restoration and only upscale. See the section above for an example.
pip install pixelapi for Python; npm install pixelapi for Node.js. Both handle authentication, polling, retry-on-429, and binary file return automatically. PHP (Composer), Ruby (Gem), and Go (go get) SDKs are also available. All examples in the Quick Start above are copy-paste ready.