# AI Image Upscaler 2x 4x — $0.015 per Image, No GPU (`kadro/ai-image-upscaler-esrgan`) Actor

Upscale images from URLs 2x or 4x with Real-ESRGAN (BSD-3) on CPU. Tiled processing, results stored in the key-value store.

- **URL**: https://apify.com/kadro/ai-image-upscaler-esrgan.md
- **Developed by:** [Kadro Tools](https://apify.com/kadro) (community)
- **Categories:** AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.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.
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 2x and 4x: Flat $0.015 per Image, No GPU

Enlarge photos and graphics 2x or 4x with the Real-ESRGAN super-resolution model, in batches of up to 500 image URLs, at one flat price per image. Big images are processed in tiles on CPU, so there is no GPU to set up.

### What you get

| Field | Meaning |
|---|---|
| `url` | The image link you gave |
| `outputUrl` | Link to the upscaled file in the key-value store |
| `scale` | 2 or 4 |
| `inputWidth`, `inputHeight` | Original size in pixels |
| `outputWidth`, `outputHeight` | Upscaled size in pixels |
| `seconds` | Processing time for that image |
| `error` | Reason when an image failed, otherwise `null` |

Example row:

```json
{"url": "https://picsum.photos/id/1015/512/512", "outputUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/upscaled-4x-e80ddd14f68a.png?signature=...", "scale": 4, "inputWidth": 512, "inputHeight": 512, "outputWidth": 2048, "outputHeight": 2048, "seconds": 2.84, "error": null}
```

### How to use it in 3 steps

1. Paste direct image links (JPG, PNG, WebP, BMP or GIF, up to 15 MB each, max 500 per run).
2. Choose `scale` 2 or 4 and the output format (`png`, `jpeg` or `webp`).
3. Run it and open the dataset: every row links to the upscaled image.

### Pricing

**$0.015 per image, flat** ($15 per 1,000 images), for input images up to 0.5 megapixels (for example 800x625 or 700x700), at 2x or 4x. Example: 200 photos = $3. Images that fail (broken link, not an image, too large) are free.

### Integrations

- **Apify API and clients**: start the Actor from any language with the Apify API (or the JavaScript and Python clients) and read the dataset when the run ends.
- **Make, n8n and Zapier**: use the official Apify modules, pick `kadro/ai-image-upscaler-esrgan`, pass the input as JSON and map the dataset rows to your next step.
- **Google Sheets**: send the dataset to a sheet with the Apify integration or export it as CSV or Excel from the Console.
- **MCP (Claude, Cursor and other AI agents)**: add the Apify MCP server `https://mcp.apify.com/?actors=kadro/ai-image-upscaler-esrgan` and ask, for example: "Upscale these 10 product photos 4x and give me the download links."

### FAQ

**Why is the input limited to 0.5 megapixels?**
The upscaling runs on CPU. Keeping the input small lets us offer one flat price instead of a surcharge per megapixel. Larger images come back with an `error` and are not charged.

**Does it restore faces or invent detail?**
It is a general-purpose model: it sharpens and adds plausible detail, but it does not recover information that is not in the picture.

**Is 2x cheaper than 4x?**
No. The price is the same, because 2x is produced from the 4x result and reduced.

**Are my images kept private?**
Results are stored in your run's own key-value store, under your account and data retention. The Actor only fetches public http(s) links you give it.

### Limitations

- General-purpose model for photos and graphics. Very noisy or heavily compressed inputs can show artifacts.
- Animated GIFs: only the first frame is used. EXIF orientation is applied; color profiles are not preserved.
- CPU processing: about 3 to 15 seconds for a 512 px image and about 30 seconds for a 0.5 MP image. Images are processed one after another.
- Only public http(s) addresses are allowed; internal or private addresses are blocked.

### Other Kadro tools

- [Bulk Image Converter & Resizer](https://apify.com/kadro/bulk-image-converter-resizer)
- [Bulk Website Screenshot](https://apify.com/kadro/bulk-website-screenshot)
- [Bulk OCR](https://apify.com/kadro/bulk-ocr-image-pdf-to-text)

### Credits and license

Model: Real-ESRGAN `realesr-general-x4v3` by Xintao Wang et al., BSD 3-Clause License (Copyright (c) 2021, Xintao Wang). The official weights (`realesr-general-x4v3.pth`, release v0.2.5.0) were exported to ONNX and the file is checked by SHA-256 at build time. Runtime: ONNX Runtime (MIT), NumPy (BSD), Pillow (HPND). This Actor is not affiliated with the Real-ESRGAN authors.

Found it useful? Please leave a review ⭐ — it helps a lot. Bugs or feature ideas: open an issue, I answer within 24 h.

# Actor input Schema

## `urls` (type: `array`):

Direct links to images (JPG, PNG, WebP, BMP, GIF; max 15 MB each). Max 500 per run. Only public http(s) addresses.

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

2 = double the width and height, 4 = four times. Input limit: 0.5 megapixels (e.g. 800x625).

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

PNG is lossless. JPEG and WebP are smaller (transparency is kept only with PNG and WebP).

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

1-100, only for JPEG and WebP.

## Actor input object example

```json
{
  "urls": [
    "https://picsum.photos/id/1015/512/512"
  ],
  "scale": "2",
  "outputFormat": "png",
  "quality": 92
}
```

# Actor output Schema

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

One row per result.

# 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 = {
    "urls": [
        "https://picsum.photos/id/1015/512/512"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kadro/ai-image-upscaler-esrgan").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 = { "urls": ["https://picsum.photos/id/1015/512/512"] }

# Run the Actor and wait for it to finish
run = client.actor("kadro/ai-image-upscaler-esrgan").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 '{
  "urls": [
    "https://picsum.photos/id/1015/512/512"
  ]
}' |
apify call kadro/ai-image-upscaler-esrgan --silent --output-dataset

```

## MCP server setup

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

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/MSxgZGBP2Vom4AYfx/builds/0oqSDwlmqSbP6LsQp/openapi.json
