---
title: Real-ESRGAN API — 4x AI Image Upscaler | ModelsLab
description: Real-ESRGAN API: 4x upscaling in photo and anime modes with no GPU to run. One REST call, $0.0047 per upscale, plans from $21/month.
url: https://modelslab.com/real-esrgan
canonical: https://modelslab.com/real-esrgan
type: website
component: Seo/RealEsrgan
generated_at: 2026-10-16T17:28:14.192143Z
---

Imagen

Real-ESRGAN API for AI Image Upscaling
---

Last updated Sep 23, 2026 · By ModelsLab Engineering

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](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
- Chain it after image generation: pass the output URL as init\_image

Real-ESRGAN models: photo vs anime
---

Pick the model with `model_id`. All four run on the same endpoint at the same price; `scale` defaults to 2 and is capped at 8.

| model\_id | Trained for | Use it on |
|---|---|---|
| RealESRGAN\_x4plus | Real-world photos with noise and JPEG artifacts | Photos, AI-generated images, screenshots |
| RealESRGAN\_x4plus\_anime\_6B | Anime and line art | Illustration, manga, flat-shaded 2D art |
| RealESRGAN\_x2plus | 2x photo upscaling | Images that only need to double in size |
| realesr-general-x4v3 | General scenes (default) | Mixed inputs when you do not set model\_id |

Real-ESRGAN vs running it on Replicate
---

On Replicate, nightmareai/real-esrgan is billed by GPU time at the rate of the hardware it runs on. On ModelsLab each upscale is a flat $0.0047 against your plan, with no per-upscale charge on the $149 Open Source Unlimited plan, and the same key covers image generation, editing and video. More on the switch: [Replicate alternatives](https://modelslab.com/replicate-alternative).

Run Real-ESRGAN without installing it (GitHub → API)
---

The GitHub release (xinntao/Real-ESRGAN) needs Python, PyTorch, CUDA drivers and a GPU. The API runs the same model family: send an image URL as `init_image` and get a hosted URL back. Docs: [super-resolution API](https://docs.modelslab.com/image-editing/super-resolution).

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)

500M+

API Requests Processed

400K+

Registered Users

5K+

Discord Community Members

300+

Available AI APIs

500

GPUs in Our Own Datacenter

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        "init_image": "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      init_image: '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    "init_image": "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.

![4x image upscaling](https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/8741a716-a81d-419a-c14f-88155af00c00/768)

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

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

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

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

![Example of AI outpainting result](https://images.modelslab.sh/?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.

[Get Started](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 | Always-on upscale workers | Depends on hosting | 5–60s on serverless |
| GDPR + auto-deletion | Yes | Your responsibility | Read the docs |
| Pricing | $0.0047 per upscale on a monthly plan | 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 ](https://modelslab.com/register)

Why teams pick the ModelsLab Real-ESRGAN API
---

Key advantages that set us apart

Real-ESRGAN x4plus, x4plus\_anime\_6B, x2plus and general-x4v3 on one endpoint

GFPGAN face enhancement via face\_enhance=true

scale from 2 to 8 in one request

Plans from $21/month (3,250 calls); no per-upscale charge on the $149 Open Source Unlimited plan

Same API key as image generation, editing and video

Webhook callbacks for async jobs

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)

Related developer APIs
---

[### AI Image Upscaler

Other upscaling models, including Ultra Resolution](https://modelslab.com/image-upscaler) [### 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)

Plans from $21 a month
---

Basic is $21/month and Standard $47/month; self-hosted image models cost $0.0047 per image from that allowance. Open Source Unlimited is $149/month with no per-image charge on self-hosted models. Every plan covers Flux, SDXL and 10,000+ community models. Cancel anytime.

100% refund policy on monthly & yearly plans — cancel anytime

MonthlyYearly 2 Months Free

 [Contact Sales](https://calendly.com/support-lael/30min?month=2024-11)

Best Value

### Open Source Unlimited

Mission-Critical

$149 /month

Get API Key100% refund policy · cancel anytime

Unlimited Open Source Models

100% refund policy

24x7 Support

15 parallel generations

Access to all APIs

Unlimited generations on all open-source models

For mission critical workloads

Add Team Members

Priority GPU Clusters

Most Popular

### Standard

Production

$47 /month

Get API Key100% refund policy · cancel anytime

Moderate Traffic

100% refund policy

Priority Developer Support

10 concurrent API requests

For Production workloads

API access to all models

Prototype

### Basic

Prototype

$21 /month

Get API Key100% refund policy · cancel anytime

Moderate Traffic

100% refund policy

Developer Support via Discord/Email

5 concurrent API requests

API access to all models

Shared GPU

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)


Real-ESRGAN is an open-source image upscaling model from Tencent ARC Lab (2021). It is trained on degraded real-world images with sensor noise and JPEG compression, so it restores detail on real photos instead of producing a crisp but artificial result.


POST https://modelslab.com/api/v6/image_editing/super_resolution with `key`, `init_image` (an image URL), `model_id` and `scale`. `model_id` is one of RealESRGAN_x4plus, RealESRGAN_x4plus_anime_6B, RealESRGAN_x2plus or realesr-general-x4v3 (the default). `scale` defaults to 2 and is capped at 8. Set `face_enhance` to true to restore faces.


Use RealESRGAN_x4plus for photos, AI-generated images and screenshots. Use RealESRGAN_x4plus_anime_6B for anime, line art and flat-shaded illustration: it keeps clean edges where the photo model over-smooths.


Each upscale is $0.0047, counted against your plan: Basic is $21/month for 3,250 API calls and Standard is $47/month for 10,000. Real-ESRGAN is self-hosted, so the $149/month Open Source Unlimited plan has no per-upscale charge. ModelsLab is paid-only.


On Replicate, nightmareai/real-esrgan is billed by GPU time at the hardware rate of the machine it runs on. On ModelsLab the same model is a flat $0.0047 per call against a monthly plan, on the same API key as image generation, editing and video.


Yes. xinntao/Real-ESRGAN on GitHub runs locally with Python and a CUDA GPU. The API runs the same model family without the install, the CUDA drivers or the GPU.


Yes. Generate at 1024px with the image API, then pass the output URL as `init_image` with `scale` 4 to get a 4096px image.

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/chatbot-api) [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)

## Frequently Asked Questions

### What is Real-ESRGAN?
Real-ESRGAN is an open-source image upscaling model from Tencent ARC Lab (2021). It is trained on degraded real-world images with sensor noise and JPEG compression, so it restores detail on real photos instead of producing a crisp but artificial result.

### Which endpoint runs Real-ESRGAN?
POST https://modelslab.com/api/v6/image_editing/super_resolution with `key`, `init_image` (an image URL), `model_id` and `scale`. `model_id` is one of RealESRGAN_x4plus, RealESRGAN_x4plus_anime_6B, RealESRGAN_x2plus or realesr-general-x4v3 (the default). `scale` defaults to 2 and is capped at 8. Set `face_enhance` to true to restore faces.

### Should I use the photo or the anime model?
Use RealESRGAN_x4plus for photos, AI-generated images and screenshots. Use RealESRGAN_x4plus_anime_6B for anime, line art and flat-shaded illustration: it keeps clean edges where the photo model over-smooths.

### How much does the Real-ESRGAN API cost?
Each upscale is $0.0047, counted against your plan: Basic is $21/month for 3,250 API calls and Standard is $47/month for 10,000. Real-ESRGAN is self-hosted, so the $149/month Open Source Unlimited plan has no per-upscale charge. ModelsLab is paid-only.

### How is this different from running Real-ESRGAN on Replicate?
On Replicate, nightmareai/real-esrgan is billed by GPU time at the hardware rate of the machine it runs on. On ModelsLab the same model is a flat $0.0047 per call against a monthly plan, on the same API key as image generation, editing and video.

### Can I run Real-ESRGAN from GitHub instead?
Yes. xinntao/Real-ESRGAN on GitHub runs locally with Python and a CUDA GPU. The API runs the same model family without the install, the CUDA drivers or the GPU.

### Can I upscale Stable Diffusion or Flux outputs?
Yes. Generate at 1024px with the image API, then pass the output URL as `init_image` with `scale` 4 to get a 4096px image.


---

*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-10-16*