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

Upscale and sharpen images in bulk with Real-ESRGAN AI. Image links or any dataset field, 2x, 3x, 4x or an exact target size, outputs up to 64 MP, transparency kept, PNG, JPEG or WebP and a ZIP. $0.017 per image; failed and skipped images are free.

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

## Pricing

from $10.50 / 1,000 image upscaleds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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: Batch 2x, 3x, 4x Real-ESRGAN

**AI Image Upscaler** enlarges and sharpens images in bulk with **Real-ESRGAN**, a proven open-source super-resolution model. Give it a list of image links (or any Apify dataset, such as a product scraper's output) and get back 2x, 3x or 4x larger images, or images resized to an exact target size like 2048 or 3840 pixels, with transparency kept.

Unlike single-image upscalers, it processes hundreds of images per run, outputs up to 64 megapixels, and saves every result as a download link plus an optional ZIP.

✅ **Pay per result: $0.017 per image** ($17 per 1,000), plus Apify platform usage · 🆓 **Failed and skipped images are never charged** · 🔑 No API key, no GPU, images are never sent to a third-party AI service

[▶ Try it with one click](#how-to-use-it) · [📄 Real example output](#output-example-from-a-real-public-run) · [💲 Pricing](#how-much-does-it-cost-to-upscale-images) · [🔌 API & integrations](#integrations-api-ai-agents-make-zapier) · [❓ FAQ](#faq) · [🛟 Support](#support-reliability-and-feature-requests)

### What does AI Image Upscaler do?

- 🔍 **AI super-resolution**: Real-ESRGAN (realesr-general-x4v3) restores edges, texture and text instead of just blurring pixels like bicubic resizing
- 📦 **Batch processing**: paste many links, upload a text file of links, or read image links straight from a dataset field (dotted paths such as `images.0.url` work)
- 📐 **2x, 3x, 4x or an exact size**: set *Target longest side* (for example 2048 for marketplaces or 3840 for 4K) and every image is scaled to fit; images already that big are skipped for free
- 🖼️ **Big outputs**: up to 64 MP per image by default (for example 7200 x 4800), not a 1 to 2 MP preview
- 🫥 **Transparency kept**: PNG and WebP outputs keep the alpha channel; colour profiles and EXIF rotation are respected
- 💾 **PNG, JPEG or WebP**, adjustable quality, and an optional **ZIP of all results**
- 🛡️ **Predictable runs**: very large inputs are resized to a sensible model size first (adjustable), and the run stops cleanly at your *Max cost per run*

### Use cases

- **E-commerce teams**: upscale supplier and marketplace product photos to meet minimum image sizes (1000 px+ minimums on Shopify, Etsy and other marketplaces) in bulk
- **Print and merch sellers**: enlarge artwork and photos for posters, mugs and print-on-demand
- **Real estate and travel listings**: sharpen small or compressed property and venue photos
- **Content and social teams**: rescue low-resolution images for blogs, thumbnails and ads
- **Archives and design**: enlarge scans, old photos and illustrations
- **Data pipelines**: chain after any scraper to upgrade every image it collected

### Why choose this upscaler?

| | This Actor | Typical single-image AI upscalers |
|---|---|---|
| Images per run | **Hundreds** (links, text file or dataset) | Often one per run |
| Output size | Up to **64 MP**, 2x, 3x, 4x or exact target size | Often capped at 1 to 2 MP |
| Transparency (PNG/WebP alpha) | ✅ kept | Often flattened |
| Skips images that are already big enough | ✅ free | Rare |
| ZIP of all results | ✅ | Rare |
| Price | **$0.017 per image**, Silver $0.013, Gold $0.0105 | $0.02 per image and up, plus usage |
| Failed images | **Free** | Varies |

Honest note: Real-ESRGAN is a fast, faithful restoration model. It sharpens what is in the photo; it does not invent new detail the way slow diffusion models can.

### How to use it

1. Click **Try for free**. The input is already filled in with two small public images (a 500 x 333 photo and a transparent 500 x 375 PNG). Press **Start**: it finishes in under a minute and costs about $0.04 plus a few cents of platform usage.
2. Replace the links with your own, or upload a text file with one link per line. To upscale a scraper's images, put its dataset ID in *Read image links from a dataset* and the field name in *Dataset field with the image link*.
3. Choose the *Upscale factor* (2x, 3x, 4x) or a *Target longest side* in pixels.
4. Pick the output format and, if you like, *Also create a ZIP of all results*.
5. Open the results table: every row has the upscaled image link, sizes and timing. Export as JSON, CSV or Excel.

#### Input example

```json
{
  "images": [
    { "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg" },
    { "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/500px-PNG_transparency_demonstration_1.png" }
  ]
}
```

Other options: `scale` (`"2"`, `"3"`, `"4"`), `targetLongestSide`, `skipIfAlreadyLarge`, `outputFormat` (`png`, `jpeg`, `webp`), `quality`, `createZip`, `datasetId`, `datasetImageField`, `maxImages`, `maxInputMegapixels`, `maxOutputMegapixels`, `maxDownloadMb`.

#### Output example (from a real public run)

First row of the [public example run](https://console.apify.com/view/runs/59Eao2L3phg1MxRXS):

```json
{
  "sourceUrl": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg",
  "inputWidth": 500,
  "inputHeight": 333,
  "inputFormat": "jpeg",
  "status": "ok",
  "charged": true,
  "outputUrl": "https://api.apify.com/v2/key-value-stores/DjDo7b6s8PJrJjlpg/records/0001-camponotus-flavomarginatus-ant-x4.png?signature=1O4XFi9ItAvXqwMrmSAtR",
  "outputKey": "0001-camponotus-flavomarginatus-ant-x4.png",
  "outputWidth": 2000,
  "outputHeight": 1332,
  "scale": 4,
  "outputFormat": "png",
  "outputMegapixels": 2.66,
  "outputSizeKb": 2075.9,
  "inputDownscaledFirst": false,
  "modelInputWidth": 500,
  "modelInputHeight": 333,
  "alphaPreserved": false,
  "model": "Real-ESRGAN realesr-general-x4v3",
  "processingSeconds": 4.6
}
```

Full results: [JSON](https://api.apify.com/v2/datasets/apCujpBKZShbK9mnX/items?format=json\&clean=1) · [CSV](https://api.apify.com/v2/datasets/apCujpBKZShbK9mnX/items?format=csv\&clean=1) · [Upscaled image](https://api.apify.com/v2/key-value-stores/DjDo7b6s8PJrJjlpg/records/0001-camponotus-flavomarginatus-ant-x4.png?signature=1O4XFi9ItAvXqwMrmSAtR) (2000 x 1332 PNG from a 500 x 333 original).

| Field | Meaning |
|---|---|
| `status` | `ok`, `skipped` (already big enough, free) or `failed` (with `error`, free) |
| `outputUrl` | Download link of the upscaled image |
| `inputWidth`, `inputHeight`, `outputWidth`, `outputHeight`, `scale` | Sizes in pixels and the final scale factor |
| `modelInputWidth`, `modelInputHeight`, `inputDownscaledFirst` | Size fed to the AI model (large inputs are resized to *Max model input* first) |
| `alphaPreserved` | Whether transparency was kept |
| `outputSizeKb`, `outputMegapixels`, `processingSeconds` | File size, image size and time taken |

### How much does it cost to upscale images?

Pay-per-event pricing: you pay per image successfully upscaled, the same price at every output size. Apify platform usage (compute) is billed to your account as well, like most AI image Actors.

| Event | Price | Notes |
|---|---|---|
| **Image upscaled** | **$0.017** | Bronze $0.0155, Silver $0.013, Gold and above $0.0105 |
| Run start | $0.0005 per GB of memory | Default 4 GB = $0.002 per run |

**Platform usage (measured on Apify at the default 4 GB):** about 45 seconds of run time per megapixel of model input, which is roughly 0.05 compute units per megapixel. A 500 x 333 image took about 5 seconds; a 1800 x 1200 photo (resized to the default 2 MP model input, output 7200 x 4800) took 84 seconds. Apify's Free plan includes $5 of monthly credit.

**Worked examples (Free/Starter event prices, default memory, usage not included):**

| Job | Calculation | Event charges |
|---|---|---|
| One-click example (2 small images) | 2 × $0.017 + $0.002 start | **$0.036** |
| 1,000 product photos to 2048 px | 1,000 × $0.017 + $0.002 | **$17.00** |
| Same job on the Gold plan | 1,000 × $0.0105 + $0.002 | **$10.50** |
| 300 images, 120 already over the target (skipped) | 180 × $0.017 + $0.002 | **$3.06** |

**Never charged:** images that fail (404, not an image, web page instead of an image, too big to download) and images skipped because they already reach your target size. Cap spending with **Max cost per run**: the Actor stops cleanly at the limit.

### Integrations (API, AI agents, Make, Zapier)

**API**: upscale and get results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/chris_elder~ai-image-upscaler/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"images":[{"url":"https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg"}],"scale":"4"}'
```

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
## Upscale every image collected by a previous scraper run
run = client.actor("chris_elder/ai-image-upscaler").call(run_input={
    "datasetId": "<SCRAPER_DATASET_ID>", "datasetImageField": "imageUrl",
    "targetLongestSide": 2048, "outputFormat": "jpeg", "createZip": True,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["status"], row.get("outputUrl"))
```

**AI agents (MCP)**: add `https://mcp.apify.com/?tools=chris_elder/ai-image-upscaler` to Claude, Cursor, VS Code or any MCP client, and your agent can upscale image links on request.

**Make, Zapier, n8n**: use the Apify app's **Run Actor** action with `chris_elder/ai-image-upscaler`, then send the image links to Google Drive, Dropbox, Shopify or your CMS. **Webhooks** fire when a run finishes, so you can chain it after any scraper.

### Limits and good to know

- Real-ESRGAN works best on photos, product shots, illustrations and screenshots with mild blur or JPEG artefacts. Heavily damaged or tiny faces will not be reconstructed like a dedicated face restorer would.
- The model upscales 4x natively. 2x and 3x are made from the 4x result; scales above 4x (for example a 500 px image to 3840 px) use the 4x AI pass plus high-quality Lanczos resizing for the rest.
- *Max model input* defaults to 2 MP (up to 8): larger originals are resized to that size before the AI pass, then upscaled. Raise it for more detail on big photos; runs take longer.
- Output is capped at 64 MP by default (adjustable to 100 MP). JPEG output turns transparent areas white.
- Images are processed one at a time on CPU (the next one downloads in the background). More memory gives more CPU and faster runs.
- Animated GIFs are upscaled as their first frame. Downloads over 50 MB are skipped by default.

### Is it legal?

The Actor downloads only the image links you give it (or the links in your dataset), one request per image, and processes them on Apify's servers. It doesn't crawl websites, log in or bypass protection. Make sure you have the right to modify and reuse the images (your own photos, supplier images you are licensed to use, public-domain or openly licensed images). See Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### FAQ

**How is this different from resizing in an image editor?** Normal resizing interpolates pixels, so enlarged images look soft. Real-ESRGAN is trained to restore sharp edges and texture and to clean JPEG artefacts while enlarging.

**Can I upscale the images from another scraper?** Yes. Put that run's dataset ID in *Read image links from a dataset* and the field that holds the image URL (for example `imageUrl`, `images` or `media.0.url`). Lists of links in one field are all processed.

**How big can the output be?** Up to 64 MP by default, for example 8000 x 8000 or 9200 x 6900. Set *Target longest side* for an exact size.

**Do I pay for images that are already large enough?** No. With a target size set and *Skip images that already reach the target* on (the default), those images get a `skipped` row and are not charged.

**Is my image sent to an external AI service?** No. The open-source model runs inside the Actor on Apify.

**What happens if an image fails?** You get a row with `status: "failed"` and the reason, and you are not charged for it. The run carries on.

### Support, reliability and feature requests

- **Failed images are free.** You pay only for images upscaled.
- **Tested on real images before every release** (small and large JPEGs, transparent PNGs, a 28 MP scan, exact-size targets, broken links and web pages).
- **Issues answered within 2 business days.** Open an issue on the **Issues** tab with a sample image link.
- **Feature requests welcome**: open an issue titled "Feature request: ...".
- Built by GPT Shop Ltd with AI-assisted development; every release is reviewed and tested before it ships.

### More tools from GPT Shop Ltd

- [Audio & Video Transcriber](https://apify.com/chris_elder/audio-video-transcriber): Whisper speech to text with SRT and VTT subtitles, podcast feeds included
- [Bulk File Downloader](https://apify.com/chris_elder/bulk-file-downloader): download many files or images to storage or a ZIP
- [Image to Text OCR](https://apify.com/chris_elder/image-to-text-ocr): bulk text extraction from images in 100+ languages
- [Bulk Website Screenshot](https://apify.com/chris_elder/bulk-website-screenshot): full-page screenshots of many URLs
- All tools: [apify.com/chris_elder](https://apify.com/chris_elder)

# Actor input Schema

## `images` (type: `array`):

Direct links to the images to upscale (JPEG, PNG, WebP, GIF, BMP, TIFF). One per row, or upload a text file of links. Up to thousands per run.

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

How much larger the output should be. 4x turns 500 x 333 into 2000 x 1332.

## `targetLongestSide` (type: `integer`):

Instead of a fixed factor, upscale every image so its longest side is exactly this many pixels (for example 2048 for marketplaces, 3840 for 4K). Overrides the upscale factor.

## `skipIfAlreadyLarge` (type: `boolean`):

With a target size set, images that are already that big are skipped and not charged.

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

PNG is lossless and keeps transparency. JPEG is smallest (transparent areas become white). WebP is small and keeps transparency.

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

Compression quality for JPEG and WebP (50 to 100).

## `createZip` (type: `boolean`):

Adds one download link with every upscaled image in a ZIP archive.

## `datasetId` (type: `string`):

ID of an Apify dataset, for example the output of a product or listing scraper. Links are read from the field below.

## `datasetImageField` (type: `string`):

Field name in the dataset items. Dotted paths and lists work, for example images or media.0.url.

## `maxImages` (type: `integer`):

Stop after this many images.

## `maxInputMegapixels` (type: `number`):

Larger images are first resized down to this size before the AI pass (2 MP x 4 = up to 32 MP output). Raise it for more detail on big photos; bigger inputs take longer (more platform usage). Up to 8.

## `maxOutputMegapixels` (type: `number`):

Safety cap on the final image size. 64 MP is about 9200 x 6900.

## `maxDownloadMb` (type: `integer`):

Images bigger than this are skipped (not charged).

## Actor input object example

```json
{
  "images": [
    {
      "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg"
    },
    {
      "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/500px-PNG_transparency_demonstration_1.png"
    }
  ],
  "scale": "4",
  "skipIfAlreadyLarge": true,
  "outputFormat": "png",
  "quality": 92,
  "createZip": false,
  "datasetImageField": "imageUrl",
  "maxImages": 500,
  "maxInputMegapixels": 2,
  "maxOutputMegapixels": 64,
  "maxDownloadMb": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `files` (type: `string`):

No description

## `zip` (type: `string`):

No description

## `summary` (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 = {
    "images": [
        {
            "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg"
        },
        {
            "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/500px-PNG_transparency_demonstration_1.png"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chris_elder/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 = { "images": [
        { "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg" },
        { "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/500px-PNG_transparency_demonstration_1.png" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("chris_elder/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 '{
  "images": [
    {
      "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/500px-Camponotus_flavomarginatus_ant.jpg"
    },
    {
      "url": "https://thumb.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/500px-PNG_transparency_demonstration_1.png"
    }
  ]
}' |
apify call chris_elder/ai-image-upscaler --silent --output-dataset

```

## MCP server setup

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