Happy Horse 1.0 is now on ModelsLab

Try Now
Skip to main content
Imagen

Real-ESRGAN API for AI Image Upscaling

Upscale images 4x with Real-ESRGAN via REST API. Detail restoration, noise reduction, face enhancement, and batch processing on dedicated GPU infrastructure.

What is the Real-ESRGAN API?

Real-ESRGAN as a developer API

Real-ESRGAN (Real-World Enhanced Super-Resolution GAN) is a deep-learning model for upscaling photos and AI-generated images while preserving fine detail. It is the industry default for 4x super-resolution on real-world inputs that include compression artifacts, sensor noise, and low-detail regions.

The ModelsLab Real-ESRGAN API exposes the model as a single REST endpoint so developers can ship upscaling features inside SaaS apps, e-commerce catalogs, and creative tools without provisioning a GPU, downloading the model weights, or managing CUDA dependencies.

When to use the Real-ESRGAN API

Real-ESRGAN is the right choice when you need realistic upscaling on photos, AI-generated outputs, or scanned media. It outperforms generic bicubic upscaling and traditional deconvolution methods on textured surfaces, hair, and small text. For purely anime/illustration content, Real-ESRGAN-Anime is also exposed via the same endpoint.

  • 4x super-resolution on photos, screenshots, and AI-generated images
  • Specialized face enhancement on portraits via GFPGAN integration
  • Noise reduction and JPEG artifact removal during upscaling
  • Real-ESRGAN-Anime variant for illustration and 2D art
  • Batch processing for product catalogs and image archives
  • Sub-second cold start, dedicated GPU infrastructure

Trusted by

Google logo
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
Google logo
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
Google logo
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
Google logo
Salesforce logo
Amazon logo
IBM logo
Adobe logo
Sony logo
1B+

Images Processed Monthly

500K+

Active Developers

5K+

Discord Community Members

300+

Available AI APIs

Real-ESRGAN API quick start

Upscale an image 4x in three lines of code using the super_resolution endpoint.

Python — 4x photo upscale

Python
1import requests
2
3response = requests.post(
4 "https://modelslab.com/api/v6/image_editing/super_resolution",
5 json={
6 "key": "YOUR_API_KEY",
7 "url": "https://example.com/low-res.jpg",
8 "scale": 4,
9 "model_id": "RealESRGAN_x4plus",
10 "face_enhance": False
11 }
12)
13
14print(response.json()["output"][0])

JavaScript — face-enhanced portrait

JavaScript
1const response = await fetch(
2 'https://modelslab.com/api/v6/image_editing/super_resolution',
3 {
4 method: 'POST',
5 headers: { 'Content-Type': 'application/json' },
6 body: JSON.stringify({
7 key: 'YOUR_API_KEY',
8 url: 'https://example.com/portrait.jpg',
9 scale: 4,
10 model_id: 'RealESRGAN_x4plus',
11 face_enhance: true,
12 }),
13 },
14);
15
16const data = await response.json();
17console.log(data.output[0]);

cURL — anime upscaling

bash
1curl -X POST 'https://modelslab.com/api/v6/image_editing/super_resolution' \
2 -H 'Content-Type: application/json' \
3 -d '{
4 "key": "YOUR_API_KEY",
5 "url": "https://example.com/anime.png",
6 "scale": 4,
7 "model_id": "RealESRGAN_x4plus_anime_6B"
8 }'

Real-ESRGAN super-resolution capabilities

Enhance image resolution by 4x while preserving fine detail and reducing compression artifacts.

4x image upscaling

Enhance resolution by 4x while preserving detail and sharpness. Real-ESRGAN transforms low-resolution images into high-quality assets suitable for print, displays, and professional use without losing critical visual information.

Noise reduction and artifact removal

Remove compression artifacts, grain, and sensor noise during upscaling. The model intelligently identifies and eliminates unwanted visual noise while enhancing genuine image details for cleaner, more professional results.

Face enhancement (GFPGAN)

Dedicated face restoration for portrait upscaling with natural results. Pass face_enhance=true to invoke the GFPGAN face-restoration pass for sharper eyes, teeth, and skin texture without artificial smoothing.

Anime / illustration mode

Switch to the Real-ESRGAN-Anime variant by passing model_id=RealESRGAN_x4plus_anime_6B. Optimized for line art, flat shading, and 2D illustration where the photo-trained model would over-smooth.

Batch processing

Upscale hundreds of images in a single API call by submitting an array of URLs. Process entire image libraries efficiently with automated batch operations, perfect for e-commerce catalogs, photo archives, and large-scale content workflows.

4x image upscaling
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result
Example of AI outpainting result

From web images to print-ready assets — Real-ESRGAN handles resolution enhancement at scale via REST API.

Real-ESRGAN API vs alternatives

How a hosted Real-ESRGAN API compares to running the model locally or using generic upscalers.

CapabilityModelsLab Real-ESRGAN APISelf-hosted Real-ESRGANGeneric upscaler API
Setup timeMinutes (sign up + API key)Hours (CUDA + weights)Minutes
Real-ESRGAN model variantsx4plus, x4plus_anime, x2plusWhatever you downloadOften single model
GFPGAN face enhancementface_enhance flagCustom pipelineRarely
Batch upscalingArray of URLsBuild it yourselfVaries
Cold-start latencyNone — dedicated GPUDepends on hosting5–60s on serverless
GDPR + auto-deletionYesYour responsibilityRead the docs
PricingPer-image, from $0.002GPU + DevOps costPer-second or subscription

Comparison based on public Real-ESRGAN, Replicate, and self-hosted GPU pricing as of 2026.

How Real-ESRGAN image upscaling works

Enhance your images in three simple steps.

STEP 01
STEP 01

Step 1: Submit your image URL

POST to the super_resolution endpoint with the source image URL, scale (2x or 4x), and optional model_id (photo or anime variant). JPEG, PNG, and WebP are all supported.

STEP 02
STEP 02

Step 2: Real-ESRGAN enhances resolution

The API loads the appropriate Real-ESRGAN variant on a warm GPU, runs super-resolution, optionally applies GFPGAN face restoration, and removes compression artifacts in a single pass.

STEP 03
STEP 03

Step 3: Download the upscaled result

Receive a hosted URL to the 4x-upscaled image within seconds. Output is delivered as a PNG or JPEG depending on your input, ready to ship to your CDN or storage layer.

Why teams pick the ModelsLab Real-ESRGAN API

Key advantages that set us apart

Real-ESRGAN x4plus, x4plus_anime, and x2plus variants on one endpoint
GFPGAN face enhancement via face_enhance=true flag
Sub-second processing on dedicated GPU infrastructure
Batch upscaling for e-commerce and archive workflows
No cold starts — same speed on the first and the millionth call
JPEG, PNG, WebP input; PNG or JPEG output
GDPR-compliant — images deleted after processing
Python, JavaScript, Go, PHP code samples in the docs
OpenAPI spec for codegen integration
Webhook callbacks for batch jobs
Pay-per-image pricing — no subscription required
24/7 developer support, SLA-backed uptime for enterprise

Our Popular Use Cases

Real-ESRGAN upscaling powers:

Upscale supplier photos for high-resolution product detail pages and print catalogs. Transform low-resolution images into professional assets that showcase product details clearly.

E-commerce product images

Real-ESRGAN API — frequently asked questions

Real-ESRGAN (Real-World Enhanced Super-Resolution GAN) is an open-source AI model for image upscaling, originally released by Tencent ARC Lab in 2021. Unlike standard ESRGAN, it is trained on real-world images that include sensor noise and JPEG compression, so it produces clean, natural-looking upscales on real photos rather than crisp-but-artificial outputs.

POST a source image URL, scale factor (2 or 4), and optional model_id to the super_resolution endpoint. The API loads Real-ESRGAN on a warm GPU, runs inference, and returns a hosted URL to the upscaled image. Typical response time is 1–3 seconds per image at 4x scale.

x4plus is trained on real photographic data and is the right choice for photos, AI-generated images, and screenshots. x4plus_anime_6B is fine-tuned for line art, flat shading, and 2D illustration — it preserves clean edges where the photo model would over-smooth.

Real-ESRGAN is specifically optimized for real-world photos and AI outputs. Generic upscalers often use bicubic or simple deep models that smooth detail. Real-ESRGAN preserves textures (hair, skin, fabric, foliage) and removes JPEG artifacts simultaneously — a strict superset of what generic upscalers offer.

Single 1024×1024 image upscaled to 4096×4096 typically completes in 1–3 seconds. Batch jobs of 100+ images run concurrently on the GPU pool with no per-job startup cost. There are no cold starts on the dedicated infrastructure.

Pricing starts at $0.002 per image upscale, billed per call. There is no monthly minimum or subscription required. Volume pricing is available for high-throughput workloads — contact sales for batch pricing on 100k+ images per month.

Yes — that is one of the most common use cases. Generate at 1024px on the image-generation API, then pipe the output URL into the Real-ESRGAN endpoint at scale=4 to get a 4096px final asset. The whole pipeline runs in under 10 seconds end-to-end.

Yes. Pass face_enhance=true to invoke the GFPGAN face-restoration pass alongside Real-ESRGAN. This dramatically improves portraits — especially eyes, teeth, and skin texture — without artificial over-smoothing.

Input: JPEG, PNG, WebP. Maximum input size 4096×4096 pixels. Maximum output (after 4x scale) 16384×16384. Animated formats (GIF, APNG) are not supported on the upscaling endpoint — use a frame extraction pipeline first.

Yes. Source and output images are processed and removed from infrastructure after the result is delivered. ModelsLab does not retain images, embeddings, or metadata beyond the time required to deliver the result. A signed DPA is available for enterprise customers.

Related developer APIs

Your Data is Secure: GDPR Compliant AI Services

ModelsLab GDPR Compliance Certification Badge

GDPR Compliant

AI Image API Pricing Starting at $0.0047 Per Image

ModelsLab offers a free tier with pay-as-you-go pricing, a Standard plan at $47/month for 10,000 API calls, and a Premium plan at $199/month with unlimited calls. All plans include access to Flux, SDXL, Stable Diffusion 3, and 10,000+ community models. Cancel anytime.

Coming Soon

We are making some changes to our pricing, please check back later.

Get Expert Support in Seconds

We're Here to Help.

Want to know more? You can email us anytime at support@modelslab.com

View Docs
Plugins

Explore Plugins for Pro

Our plugins are designed to work with the most popular content creation software.

API

Build Apps with
ML
API

Use our API to build apps, generate AI art, create videos, and produce audio with ease.