# AI Image Upscaler: Upscale Images 2x, 3x, 4x, Real-ESRGAN (`tidelane/ai-image-upscaler`) Actor

Upscale photos, product images, AI art and old pictures 2x, 3x or 4x with Real-ESRGAN. Sharper details and less noise than normal resizing. Paste image URLs, get PNG, JPG or WebP download links. Keeps transparency. Pay only for the pixels you upscale.

- **URL**: https://apify.com/tidelane/ai-image-upscaler.md
- **Developed by:** [Tidelane Data](https://apify.com/tidelane) (community)
- **Categories:** AI, E-commerce, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 100,000 input pixels

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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: Upscale Images 2x, 3x, 4x, Real-ESRGAN

Make small or blurry images bigger and sharper. This Actor upscales photos, product images, AI art, screenshots and old pictures **2x, 3x or 4x** with **Real-ESRGAN** (model `realesr-general-x4v3`), which restores edges and texture and removes JPEG noise instead of just stretching pixels like normal resizing.

- ✅ **2x, 3x or 4x** larger in width and height
- ✅ **PNG, JPG or WebP** output with adjustable quality
- ✅ **Keeps transparency** (PNG and WebP), keeps grayscale images grayscale, applies EXIF rotation
- ✅ **Batch processing:** paste hundreds of image URLs; one broken link never stops the others
- ✅ **Fair price:** you pay per input pixel, so small images cost very little, and images that fail cost nothing
- ✅ **Private:** your images are processed inside the Actor and stored only in your own Apify storage. No third-party API

### What can you use it for?

- **E-commerce:** enlarge supplier product photos to meet marketplace minimum sizes (Amazon, eBay, Shopify, Etsy)
- **AI art and print:** upscale Midjourney, Stable Diffusion or DALL-E images for posters and print on demand
- **Marketing:** make old logos, banners and thumbnails crisp for high-resolution screens
- **Photo restoration:** improve scans and old low-resolution photos
- **Automation:** call it from Make, Zapier, n8n or your own code via the Apify API, for example after every image upload

### How to use it

1. Paste direct image links into **Image URLs** (JPG, PNG, WebP, BMP, TIFF or GIF; for GIFs the first frame is used).
2. Choose the **Upscale factor** and **Output format**.
3. Click **Start**. Each result has a download link in the `outputUrl` field, and the files are also in the run's key-value store.

#### Input example

```json
{
    "imageUrls": [
        "https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg",
        "https://example.com/products/shoe.png"
    ],
    "scale": "4",
    "outputFormat": "png"
}
```

#### Output example

Real output for the first image above:

```json
{
    "imageUrl": "https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg",
    "outputUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/upscaled-1-d5fce8d9a7.png?signature=<signature>",
    "outputKey": "upscaled-1-d5fce8d9a7.png",
    "scale": 4,
    "inputWidth": 179,
    "inputHeight": 179,
    "outputWidth": 716,
    "outputHeight": 716,
    "format": "png",
    "outputBytes": 617561,
    "processingSeconds": 0.55,
    "model": "Real-ESRGAN realesr-general-x4v3"
}
```

The `outputUrl` is a signed link that works without logging in, so you can pass it straight to another tool. A run summary with the status of every image is saved as `OUTPUT` in the key-value store.

### Pricing

You pay per **100,000 input pixels**, rounded up per image (a 512 × 512 image counts as 3 units). The price is the same for 2x, 3x and 4x. Images that fail to download, are not images, or are larger than your **Max input size** are not charged. Set a run spending limit to cap the cost of a run.

Paid Apify plans pay less: 10% off on Starter, 20% on Scale and 30% on Business and higher plans. Example: a 1000 × 1000 photo counts as 10 units, $0.015 on the Free plan.

### Speed and limits

- A 1 megapixel image (for example 1000 × 1000 px) usually takes 8 to 30 seconds with the default 2 GB memory. Small images take about a second.
- Inputs up to 8 megapixels work with the default memory; use 4 GB for up to 16 megapixels.
- WebP output allows at most 16,383 px per side; use PNG or JPG for bigger results.

### FAQ

**Is this the same as Photoshop's "Super Resolution" or online upscalers?** It uses the same kind of AI (a neural network trained to rebuild detail). Real-ESRGAN is one of the most widely used open models for this.

**Why does the result look slightly painted on some photos?** AI upscalers rebuild texture they cannot see in the small image. For faces and very fine textures, try 2x instead of 4x.

**Can I upload files instead of URLs?** Use any public or signed link, for example from Google Drive (direct download link), Dropbox (`?dl=1`), S3, or an Apify key-value store.

**What about the license?** Real-ESRGAN and the `realesr-general-x4v3` weights are published under the BSD-3-Clause license, which allows commercial use. You need the rights to the images you upscale.

Found a problem or need a feature (face enhancement, batch ZIP download)? Open an issue on the Actor page.

***

#### Impressum

Levi Griesinger, Tidelane Data\
Besigheimer Straße 18\
74369, Löchgau, Deutschland\
E-Mail: LeviGriesinger@gmail.com

# Actor input Schema

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

Direct links to JPG, PNG, WebP, BMP, TIFF or GIF images, one per line. Each image is processed separately; a broken link does not stop the others.

## `scale` (type: `string`):

How many times larger the result should be in width and height. 4x gives the most detail.

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

PNG is lossless and keeps transparency. JPG and WebP are much smaller. Transparent areas become white in JPG.

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

Compression quality for JPG and WebP (1-100). Ignored for PNG.

## `maxInputMegapixels` (type: `integer`):

Larger input images are skipped and not charged. Protects you from accidental huge images. 4 MP is about 2300 x 1700 px. The default 2 GB memory handles inputs up to 8 MP; use 4 GB for larger ones.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"
  ],
  "scale": "4",
  "outputFormat": "png",
  "quality": 92,
  "maxInputMegapixels": 4
}
```

# Actor output Schema

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

All results of the run as dataset items.

## `summary` (type: `string`):

Summary per input with status (ok, error and the reason).

# 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": [
        "https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidelane/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": ["https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("tidelane/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": [
    "https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"
  ]
}' |
apify call tidelane/ai-image-upscaler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidelane/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/aXz9dUNGnYXd9rfXg/builds/jkeyfy6xK3cs9h7Qc/openapi.json
