---
title: Real-ESRGAN API — 4x Image Upscaler | ModelsLab
description: Real-ESRGAN upscaler API. 4x super resolution, noise reduction, detail restoration. REST API, free credits, $0.002 per upscale. Anime + photo modes.
url: https://modelslab.com/real-esrgan
canonical: https://modelslab.com/real-esrgan
type: website
component: Seo/RealEsrgan
generated_at: 2026-07-20T08:02:52.783505Z
---

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.

[Try Real-ESRGAN Free](https://modelslab.com/register) [API Documentation](https://docs.modelslab.com)

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](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/669b27bc-f881-4e16-569d-4ce02f1bc000/768)

![Salesforce logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/8f7d9952-1dee-4108-f1e5-96ff77108e00/768)

![Amazon logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/b4d3bc1b-8c2b-4d98-7c87-ed162ccbf400/768)

![IBM logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/41bf250b-c933-4d8a-6355-07cf4a2fda00/768)

![Adobe logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/9eb124dd-95c4-4889-c838-faa0f6317000/768)

![Sony logo](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/2d67a30b-a490-4b96-ce1d-28d8371da300/768)

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

```
<code>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])</code>
```

### JavaScript — face-enhanced portrait

JavaScript

```
<code>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]);</code>
```

### cURL — anime upscaling

bash

```
<code>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  }'</code>
```

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](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/8741a716-a81d-419a-c14f-88155af00c00/768)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/09738200-f1fc-442c-9852-7d6a9cd56d34.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/851c5561-3239-4915-a66b-46d58d6c377c.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/70d56252-0444-431d-82b9-ad15c260263e.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/7b9995d6-68e1-48ba-bc0c-8e3a8f824faf.png&quality=25)

![Example of AI outpainting result](https://images.stablediffusionapi.com/?image=https://assets.modelslab.ai/generations/878fc33a-be9d-4fef-a8a5-f2f9931cd1d3.jpg&quality=25)

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

[Start Free Trial](https://modelslab.com/register)

Real-ESRGAN API vs alternatives
---

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

| Capability | ModelsLab Real-ESRGAN API | Self-hosted Real-ESRGAN | Generic upscaler API |
|---|---|---|---|
| Setup time | Minutes (sign up + API key) | Hours (CUDA + weights) | Minutes |
| Real-ESRGAN model variants | x4plus, x4plus\_anime, x2plus | Whatever you download | Often single model |
| GFPGAN face enhancement | face\_enhance flag | Custom pipeline | Rarely |
| Batch upscaling | Array of URLs | Build it yourself | Varies |
| Cold-start latency | None — dedicated GPU | Depends on hosting | 5–60s on serverless |
| GDPR + auto-deletion | Yes | Your responsibility | Read the docs |
| Pricing | Per-image, from $0.002 | GPU + DevOps cost | Per-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.

[Try Real-ESRGAN Free ](https://modelslab.com/register)

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:

E-commerce product imagesPhotography enhancementAI-generated content workflowsArchival and restorationGame and texture asset upscalingWeb and mobile optimization

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](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/0fbacb1a-6e34-4254-0a9d-5e75178cf200/768)

Real-ESRGAN API — frequently asked questions
---

### What is Real-ESRGAN?

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.

### How does the Real-ESRGAN API work?

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.

### What is the difference between Real-ESRGAN x4plus and x4plus\_anime?

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.

### Should I use Real-ESRGAN or a generic upscaler API?

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.

### How fast is the Real-ESRGAN API?

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.

### How much does the Real-ESRGAN API cost?

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.

### Can I use Real-ESRGAN to upscale Stable Diffusion or Flux outputs?

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.

### Does the Real-ESRGAN API support face enhancement?

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.

### What input formats and sizes are supported?

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.

### Is the Real-ESRGAN API GDPR-compliant?

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
---

[### Image Generation API

Generate images via Flux, SDXL, and SD models](https://modelslab.com/image-generation-api) [### Stable Diffusion 3 API

Latest Stable Diffusion 3 text-to-image](https://modelslab.com/stable-diffusion-3) [### Flux LoRA Training

Train custom AI image models](https://modelslab.com/flux-lora-training)

Your Data is Secure: GDPR Compliant AI Services
---

![ModelsLab GDPR Compliance Certification Badge](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/28133112-07fe-4c1c-44eb-36948d51ae00/768)

AI Image API Pricing Starting at $0.0047 Per Image
---

ModelsLab offers subscription plans from $21/month (Basic) and $47/month (Standard, 10,000 API calls) to $199/month (Open Source Unlimited). All plans include access to Flux, SDXL, Stable Diffusion 3, and 10,000+ community models. Start free, cancel anytime, 100% refund policy.

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>

Chat with support[View Docs](https://docs.modelslab.com)

Explore Our Other Solutions
---

Unlock your creative potential and scale your business with ModelsLab's comprehensive suite of AI-powered solutions.

[Audio Gen

### AI Audio Generation

Text-to-speech, voice cloning, music generation, and audio processing APIs.

Explore Audio Gen](https://modelslab.com/audio-gen) [Video Fusion

### AI Video Generation & Tools

Create, edit, and enhance videos with AI-powered generation and transformation tools.

Explore Video Fusion](https://modelslab.com/video-generation) [Chat

### Engage Seamlessly with LLM

Access powerful language models for chatbots, content generation, and AI assistants.

Explore Chat](https://modelslab.com/custom-llm) [3D Verse

### Create Stunning 3D Models

Transform images and text into 3D models with advanced AI-powered generation.

Explore 3D Verse](https://modelslab.com/text-to-3d)

Plugins

Explore Plugins for Pro
---

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

[Explore Plugins](https://modelslab.com/pro#plugins) [Learn More](https://modelslab.com/pro)

API

Build Apps with ModelsLab

ML

 API
---

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

[API Documentation](https://docs.modelslab.com) [Playground](https://modelslab.com/models)

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-07-20*