# AI Image Upscaler 4x — Real-ESRGAN Photo & Anime Enhancer (`tidewater-data/ai-image-upscaler`) Actor

Upscale images 2x-8x with Real-ESRGAN AI. Sharpen and denoise photos, anime and illustrations up to 4096x4096 (16 MP). Batch URLs, PNG/JPEG/WebP, transparency kept. From $0.006 per image, only successful images are charged.

- **URL**: https://apify.com/tidewater-data/ai-image-upscaler.md
- **Developed by:** [Tidewater Data](https://apify.com/tidewater-data) (community)
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 image upscaleds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AI Image Upscaler 4x — Real-ESRGAN Photo & Anime Enhancer

Upscale images **2x to 8x** and make them sharper, cleaner and print-ready. This tool runs **Real-ESRGAN**, a well-known open-source super-resolution model, so you get real AI detail recovery, not just stretched pixels.

- **Two models:** *Photo* for real-world photos and *Anime* for anime, cartoons, illustrations and line art
- **Up to 16 MP output** (4096 × 4096). Good for print, e-commerce zoom and 4K wallpapers
- **Denoise slider.** Keep the film grain, or remove noise and JPEG artifacts
- **Batch processing.** Paste one URL or thousands
- **Transparency kept.** PNGs with alpha stay transparent
- **PNG, JPEG or WebP output** at any quality
- **Pay only for successful images.** Failed images are never charged

### What can I use it for?

| Use case | Example |
|---|---|
| E-commerce | Make small supplier product photos sharp enough for zoom and marketplaces |
| AI-generated art | Turn 1024 px Midjourney / Stable Diffusion / Flux images into 4K |
| Print | Get old or small photos ready for posters and canvas |
| Anime & illustration | Clean, crisp line art at 4x |
| Real estate & listings | Improve low-resolution listing photos |
| AI agents & automations | Call it from n8n, Make, Zapier, LangChain or an MCP client as an upscaling step |

### How to use

1. Add one or more **image URLs**
2. Pick **Photo** or **Anime**
3. Pick a **scale** (2–8x) or an exact **target width**
4. Click **Start**. Each upscaled image appears in the results table with a download link

#### Input example

```json
{
  "imageUrls": [{ "url": "https://example.com/photo.jpg" }],
  "model": "photo",
  "scale": 4,
  "denoiseStrength": "0.5",
  "outputFormat": "png"
}
```

#### Output example

```json
{
  "inputUrl": "https://example.com/photo.jpg",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/.../records/upscaled-0000-1a2b3c4d5e.png",
  "status": "success",
  "model": "photo",
  "inputWidth": 640,
  "inputHeight": 480,
  "outputWidth": 2560,
  "outputHeight": 1920,
  "format": "png",
  "seconds": 6.1
}
```

The `outputUrl` is a direct link to the upscaled file. You can download it or pass it to your next step.

### Pricing

Pay per result, with no subscription:

- **$0.005 per upscaled image**, plus
- **$0.001 per output megapixel**

| Output size | Approx. cost |
|---|---|
| 1920 × 1080 (Full HD) | $0.007 |
| 2048 × 2048 | $0.009 |
| 3840 × 2160 (4K) | $0.013 |
| 4096 × 4096 (max) | $0.022 |

You can set a **maximum cost per run** in the run options. The tool stops when it reaches that limit.

### Use it from code or an AI agent

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("tidewater-data/ai-image-upscaler").call(run_input={
    "imageUrls": [{"url": "https://example.com/photo.jpg"}],
    "scale": 4,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["outputUrl"])
```

**JavaScript / Node.js**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('tidewater-data/ai-image-upscaler').call({
    imageUrls: [{ url: 'https://example.com/photo.jpg' }],
    model: 'anime',
    scale: 4,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => i.outputUrl));
```

**No-code:** use the Apify app in **Make**, **Zapier** or **n8n** to upscale every new image from a form, a Google Drive folder or a product feed.

It also works as a tool in the **Apify MCP server**, so Claude, Cursor and other MCP clients can upscale images directly.

### Limits & tips

- Inputs up to 30 MB and 12 MP. Output is capped at about 16 MP. If you ask for more, the scale is reduced to fit and the aspect ratio is kept
- Processing takes a few seconds to about a minute per image, depending on size
- For faces in very low-quality photos, results are good but not miraculous. Real-ESRGAN restores general detail, not identity
- Choose **JPEG/WebP** when file size matters, and **PNG** when you need lossless output or transparency

### FAQ

**Is this better than resizing in Photoshop?** Yes. Normal resizing (bicubic/Lanczos) only interpolates pixels. Real-ESRGAN is a neural network trained to rebuild edges, textures and fine detail.

**Can I use the results commercially?** The Real-ESRGAN models are released under the BSD-3-Clause license. You are responsible for having the rights to the images you upload.

**Do you keep my images?** Images are only stored in your own run storage, under your Apify data-retention settings.

**How do I increase image resolution without losing quality?** Use an AI upscaler instead of normal resizing. Pick the **Photo** model, set the scale to 4x, and the model rebuilds sharp edges and texture instead of blurring them.

**Is it cheaper than desktop upscaler apps or enhancer subscriptions?** For batch work, usually yes. There is no subscription: a Full HD result costs under one cent, a 4K result about one cent, and failed images are free.

**Can I upscale Midjourney, Stable Diffusion or Flux images?** Yes. Upscale a 1024 × 1024 image 4x to get a 4096 × 4096 file for print, posters or 4K wallpapers. Use **Anime** for illustration styles and **Photo** for photorealistic ones.

**Does it fix blurry, grainy or pixelated photos?** It helps a lot with small, soft, noisy and JPEG-compressed images. Raise the denoise setting to clean grain and artifacts, or lower it to keep natural texture. It cannot recover detail that is completely missing, such as a face that is only a few pixels wide.

**Can I process thousands of images?** Yes. Add as many URLs as you need in one run, schedule runs, or trigger them from the API.

### Credits

The models are from [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) by Xintao Wang et al. (BSD-3-Clause).

# Actor input Schema

## `imageUrls` (type: `array`):

Public URLs of the images to upscale (JPEG, PNG, WebP, BMP, TIFF). One result per image.

## `model` (type: `string`):

'photo' for real-world photos (Real-ESRGAN general x4v3). 'anime' for anime, cartoons, illustrations and line art.

## `scale` (type: `integer`):

How many times larger the output should be (2–8). Output is capped at ~16 MP (4096×4096); larger requests are reduced to fit.

## `targetWidth` (type: `integer`):

Instead of a scale factor, upscale to this exact width (height keeps aspect ratio). Overrides 'Scale factor'.

## `denoiseStrength` (type: `string`):

0 keeps grain and fine texture, 1 removes noise and JPEG artifacts strongly.

## `outputFormat` (type: `string`):

PNG is lossless and keeps transparency. JPEG/WebP are much smaller.

## `quality` (type: `integer`):

Only used for JPEG and WebP output.

## Actor input object example

```json
{
  "imageUrls": [
    {
      "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg"
    }
  ],
  "model": "photo",
  "scale": 4,
  "denoiseStrength": "0.5",
  "outputFormat": "png",
  "quality": 92
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "imageUrls": [
        {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidewater-data/ai-image-upscaler").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "imageUrls": [{ "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg" }] }

# Run the Actor and wait for it to finish
run = client.actor("tidewater-data/ai-image-upscaler").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "imageUrls": [
    {
      "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg"
    }
  ]
}' |
apify call tidewater-data/ai-image-upscaler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidewater-data/ai-image-upscaler"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/p3EdOXlvZAB6aKsoK/builds/8g21yrV5wCEnDA3l7/openapi.json
