# AI Image Upscaler 4x - Topaz Alternative, Photos & Anime (`kantolabs/ai-image-upscaler`) Actor

Upscale images 2x or 4x with Real-ESRGAN AI: sharper photos, product shots and anime art, transparency kept, JPEG/PNG/WEBP download links. $0.01 per image; failed images are free.

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

## Pricing

from $10.00 / 1,000 images

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 - Real-ESRGAN 4x for Photos, Products & Anime

**Enlarge images 2x or 4x with AI** and get back sharper detail, cleaner edges and less blur and
JPEG noise than any normal resize. Paste image links, get public download links to the upscaled
files. Transparency is kept, and there are two models: one for **photos and real-world images**, one
for **anime, cartoons, illustrations and line art**.

It runs **Real-ESRGAN**, the widely used open-source super-resolution model (BSD-3 licence), inside
the Actor - no third-party AI API, no account, no watermark, no subscription.

**From $0.01 per image**, and failed images are free.

### What does AI Image Upscaler do?

AI Image Upscaler downloads each image you link to, enlarges it 2x or 4x with the Real-ESRGAN neural network (a model for photos and one for anime, cartoons and line art), keeps transparency, and saves the result as JPEG, PNG or WEBP with a public download link. You get one dataset row per image with the input and output sizes.

### Use cases

- **Ecommerce** - turn small supplier product photos into sharp 2000+ px images for your store and marketplaces.
- **Print and merch** - enlarge artwork and photos to print resolution.
- **Old and low-res photos** - make thumbnails, scans and screenshots presentable again.
- **Anime, game and illustration art** - the anime model keeps flat colours and clean lines.
- **Before OCR or computer vision** - upscale tiny text and small images first (pairs with [Image to Text OCR](https://apify.com/kantolabs/image-to-text-ocr)).
- **Bulk pipelines** - collect images with [Bulk Image Downloader](https://apify.com/kantolabs/bulk-image-downloader), then upscale them all here; or call it from Make, Zapier, n8n, the API or an AI agent via MCP.

### Who is it for?

- **Ecommerce sellers** turning small supplier photos into sharp store images.
- **Print-on-demand and merch creators** enlarging artwork to print size.
- **Designers and marketers** rescuing low-resolution assets and old photos.
- **Anime, game and illustration artists** who need clean lines kept.
- **Developers** who need an image upscaling API without running a GPU.

### How to use it

1. Click **Try for free**.
2. Paste direct image links into **Image URLs**, one per line.
3. Pick **Scale** (4x or 2x) and **Model** (`general` for photos, `anime` for drawn art).
4. Click **Start**, then open or download the upscaled images from the result links.

### Input

| Field | What it does | Default |
|---|---|---|
| `imageUrls` | Direct image links, one per line (JPEG, PNG, WEBP, GIF first frame, BMP, TIFF; up to 40 MB) | two sample images |
| `scale` | `4` or `2` | `4` |
| `model` | `general` (photos) or `anime` (illustrations, cartoons, line art) | `general` |
| `outputFormat` | `jpeg`, `png` (lossless) or `webp` | `jpeg` |
| `quality` | JPEG / WEBP quality, 50-100 | `95` |
| `allowLargeImages` | Upscale inputs up to ~2.1 MP (1920x1080) at full size, at the large price | `false` |

```json
{
    "imageUrls": ["https://example.com/product-small.jpg", "https://example.com/logo.png"],
    "scale": "4",
    "model": "general",
    "outputFormat": "png"
}
```

**Image sizes.** The standard price covers inputs up to about **0.3 megapixels** (640x480, 800x400,
550x550...), which come out at up to **2560x1920 at 4x**. Bigger inputs are first reduced to that size

- unless you turn on `allowLargeImages`, which upscales inputs up to **~2.1 MP** (1920x1080) at full size
  (up to 7680x4320 at 4x) at the large price. An image that is already bigger than the result would be is
  refused with an explanation, free of charge.

### Output

Each image is saved in the run's key-value store and gets a public link. Real output from a cloud run:

```json
{
    "imageUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/960px-Fronalpstock_big.jpg",
    "outputUrl": "https://api.apify.com/v2/key-value-stores/2d3YTKxifpnlGRTca/records/0000-960px-Fronalpstock_big-x4.jpg?signature=FqikHLWogeqP3wVIxVUZ",
    "outputKey": "0000-960px-Fronalpstock_big-x4.jpg",
    "model": "general",
    "scale": 4,
    "inputFormat": "JPEG",
    "width": 960,
    "height": 431,
    "networkInputWidth": 960,
    "networkInputHeight": 431,
    "inputReduced": false,
    "outputWidth": 3840,
    "outputHeight": 1724,
    "effectiveScale": 4,
    "tier": "large",
    "hasTransparency": false,
    "inferenceMs": 15684,
    "outputFormat": "jpeg",
    "chargedAs": "large-image-upscaled",
    "error": null
}
```

A transparent PNG with the anime model at 2x came back as a 500x374 RGBA PNG with its alpha channel
intact. A failed download is reported like this, and not charged:

```json
{ "imageUrl": "https://example.com/missing.jpg", "outputUrl": null, "error": "HTTPStatusError: Client error '404 Not Found' for url 'https://example.com/missing.jpg'" }
```

The Console table shows the original and the upscaled image side by side.

### How much does it cost to upscale an image?

Pay per event, only for images that were upscaled and saved:

| Event | When | Price |
|---|---|---|
| Image upscaled | input up to ~0.3 MP (output up to 2560x1920 at 4x) | **$0.01** |
| Large image upscaled | input 0.3-2.1 MP, only with `allowLargeImages` | **$0.06** |

Plus a $0.00005 start fee. 100 product photos at the standard size cost **$1.00**. Set "Maximum
cost per run" and the run stops cleanly when it is reached.

Speed on the default 4 GB memory: about 12 seconds for a standard image and about 80 seconds for a
full 1920x1080 input. Images download in parallel while one is being upscaled.

### Integrations and API

Run it from your own code with the official `apify-client` package (Python shown; JavaScript works the same way):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("kantolabs/ai-image-upscaler").call(run_input={
    "imageUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/330px-Fronalpstock_big.jpg"
    ],
    "scale": "4",
    "model": "general"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

Or get the results in a single HTTP call:

```bash
curl -X POST "https://api.apify.com/v2/acts/kantolabs~ai-image-upscaler/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"imageUrls": ["https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/330px-Fronalpstock_big.jpg"], "scale": "4", "model": "general"}'
```

- **AI agents (MCP)**: add the Apify MCP server to Claude, ChatGPT, Cursor or any MCP client and the agent can call this Actor as a tool.
- **No-code**: Make, Zapier, n8n, Google Sheets, webhooks and Apify Schedules work out of the box.

### Limits

- Runs on CPU: about 12 seconds per standard image and about 80 seconds per full 1920x1080 input.
- The standard price covers inputs up to ~0.3 MP; larger inputs are reduced first unless `allowLargeImages` is on (up to ~2.1 MP at full size).
- Up to 40 MB per file. Links from social networks and stock-photo sites are refused on purpose.
- It sharpens what is there; it does not restore faces or invent text that was never in the image.

### FAQ

**How good is it?** Real-ESRGAN is the reference open-source upscaler used by many desktop and web
tools. It recovers edges and textures and removes compression noise; it does not invent faces or
text that were never there. Tiny text and faces benefit less than landscapes, products and art.

**Which model should I pick?** `general` for photos, product shots, screenshots and scans. `anime`
for anything drawn: anime, cartoons, comics, game art, logos and line art.

**Is my image stored anywhere else?** No. It is downloaded by the run, processed inside the Actor and
saved only in your run's storage.

**Which sites can I use?** Any direct image link you have the right to process. Links from social
networks and stock-photo sites are refused on purpose.

### Related Actors by Kanto Labs

- [Bulk Image Downloader - pages or URLs to ZIP & links](https://apify.com/kantolabs/bulk-image-downloader)
- [Image to Text OCR - photos, screenshots, scanned PDFs](https://apify.com/kantolabs/image-to-text-ocr)
- [Video Frame Extractor - keyframes, scenes & thumbnails](https://apify.com/kantolabs/video-frame-extractor)

# Actor input Schema

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

Direct links to images (JPEG, PNG, WEBP, GIF first frame, BMP, TIFF), one per line. Files up to 40 MB.

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

4x (e.g. 640x480 -> 2560x1920) or 2x. Same price.

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

`general` (Real-ESRGAN general x4v3) for photos, product shots, screenshots and scans. `anime` (Real-ESRGAN AnimeVideo v3) for anime, cartoons, illustrations and line art.

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

JPEG is smallest for photos. PNG is lossless and keeps transparency. WEBP is small and keeps transparency.

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

50-100. Ignored for PNG.

## `allowLargeImages` (type: `boolean`):

Off: images bigger than ~0.3 megapixels (640x480) are first reduced to that size, then upscaled - standard price. On: images up to ~2.1 megapixels (1920x1080) are upscaled at full size and charged at the large-image price; bigger ones are reduced to that size.

## Actor input object example

```json
{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/330px-Fronalpstock_big.jpg"
  ],
  "scale": "4",
  "model": "general",
  "outputFormat": "jpeg",
  "quality": 95,
  "allowLargeImages": false
}
```

# 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": [
        "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/330px-Fronalpstock_big.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kantolabs/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://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/330px-Fronalpstock_big.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("kantolabs/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://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/330px-Fronalpstock_big.jpg"
  ]
}' |
apify call kantolabs/ai-image-upscaler --silent --output-dataset

```

## MCP server setup

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