# AI Image Upscaler x4 – Anime & Photo (Real-ESRGAN) (`kumo-data-tools/ai-image-upscaler-anime-photo`) Actor

Upscale images 4x (or 2x) with Real-ESRGAN: a dedicated anime/illustration model for clean line art and a photo model for real-world pictures. PNG, JPG or WebP out, transparency kept. Pay per 512x512 input tile; failed images are free.

- **URL**: https://apify.com/kumo-data-tools/ai-image-upscaler-anime-photo.md
- **Developed by:** [Kumo Data Tools](https://apify.com/kumo-data-tools) (community)
- **Categories:** Automation, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 photo tiles

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 x4 – Anime & Photo (Real-ESRGAN)

Make small images **4x larger** (or 2x) and sharper with **Real-ESRGAN**, the widely used open-source super-resolution model. Pick the model that fits your images:

- 🎨 **Anime / illustration** – Real-ESRGAN's anime model: clean line art and flat colors for anime, manga, illustrations, game sprites and stickers.
- 📷 **Photo / general** – Real-ESRGAN's general model for photos, product shots and real-world images. Fast.
- 🧩 **Up to 2 MP input** – images are processed in overlapping tiles, so seams are not visible and memory stays bounded (about 2.4 GB at the 2 MP limit with the anime model, within the default 4 GB).
- 🪟 **Transparency kept** – PNG and WebP output keep the alpha channel.
- 💸 **Fair pricing** – pay per 512×512 block of the *input* image; failed images are free.
- 🤖 **API-ready** – one dataset item per image with a direct link to the result.

### How to use

1. Paste direct image links into **Image URLs** (PNG, JPEG, WebP, GIF, BMP, TIFF; up to 100 per run).
2. Choose **Model**: `anime` or `photo`.
3. Optional: **Scale** 4x (default) or 2x, **Output format** PNG / JPG / WebP.
4. Run. Each result is saved in the run's key-value store and linked from the dataset item.

Leave **Image URLs** empty to try a free bundled sample.

### Pricing

Billed per **tile = each started 512×512 block of the input image** (262,144 input pixels):

| Model | Price per tile | Examples |
|---|---|---|
| Photo / general | **$0.01** | 512×512 → 2048×2048: $0.01 · 1024×768 → 4096×3072: $0.03 |
| Anime / illustration | **$0.05** | 512×512 → 2048×2048: $0.05 · 800×600 → 3200×2400: $0.10 |

Failed images (bad link, not an image, too large) are not charged. Each run also has Apify's standard start fee: $0.00005 per run up to 1 GB of memory, plus $0.00005 for each extra GB. Set **Max total charge** to cap your spend – images that would exceed it are skipped and reported.

More memory = more CPU = faster runs: 4 GB (default) uses 1 CPU core, 8 GB uses 2, 16 GB uses 4. The per-tile price is the same; only the small start fee grows with memory.

### Input

| Field | Default | Notes |
|---|---|---|
| `imageUrls` | – | Up to 100 per run; 30 MB and 2 megapixels (~1414×1414) each |
| `model` | `photo` | `photo` or `anime` |
| `scale` | 4 | 4 or 2 (x2 = model at x4, then high-quality resize) |
| `outputFormat` | `png` | `png`, `jpg`, `webp` |
| `quality` | 92 | JPG / WebP quality, 50–100 |

### Output

```json
{
  "url": "https://example.com/small.png",
  "status": "ok",
  "model": "anime",
  "scale": 4,
  "inputWidth": 512, "inputHeight": 512,
  "outputWidth": 2048, "outputHeight": 2048,
  "tiles": 1,
  "bytes": 3104422,
  "imageUrl": "https://api.apify.com/v2/key-value-stores/…/records/image-0.png"
}
```

`status` is `ok`, `error` (with `message`, not charged) or `skipped` (max total charge reached, not charged).

### FAQ

**Which model should I use?** Drawn images with outlines and flat colors → `anime`. Photos and anything with natural texture → `photo`.

**Will it invent details?** Like every AI upscaler it reconstructs plausible edges and textures; it does not add new objects. Small text and faces in very low-resolution images may not be recovered exactly.

**Are larger inputs supported?** Up to 2 megapixels per image. For bigger images, crop or resize first.

**How is my data handled?** Images are downloaded into your run, upscaled on Apify's CPU (no external AI service), and saved only in your Apify storage under Apify's retention settings. We keep no copies. Only process images you have the right to use.

### Notes

- Models: [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) `realesr-general-x4v3` and `RealESRGAN_x4plus_anime_6B` by Xintao Wang et al., BSD 3-Clause License, official release weights, unmodified. Network code follows Real-ESRGAN (BSD-3) and BasicSR (Apache 2.0). Full notices: THIRD_PARTY_NOTICES.md.
- The bundled sample image is our own drawing.
- Not affiliated with the Real-ESRGAN authors or Tencent ARC.

# Actor input Schema

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

Direct links to images (PNG, JPEG, WebP, GIF, BMP, TIFF), up to 100 per run, 30 MB and 2 megapixels (about 1414x1414) each. Leave empty to try the free bundled sample.

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

`anime` = Real-ESRGAN anime model: clean lines and flat colors for anime, manga, illustrations, game art. `photo` = Real-ESRGAN general model for photos and real-world images (faster).

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

4 = four times the width and height. 2 = run the model at x4 and resize to x2 (same price, sharper than a plain x2).

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

PNG is lossless and keeps transparency (largest files). WebP keeps transparency and is much smaller. JPG is smallest, no transparency.

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

Compression quality for JPG and WebP output (ignored for PNG).

## Actor input object example

```json
{
  "model": "photo",
  "scale": "4",
  "outputFormat": "png",
  "quality": 92
}
```

# Actor output Schema

## `images` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("kumo-data-tools/ai-image-upscaler-anime-photo").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("kumo-data-tools/ai-image-upscaler-anime-photo").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 '{}' |
apify call kumo-data-tools/ai-image-upscaler-anime-photo --silent --output-dataset

```

## MCP server setup

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

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/DSeQG2srkY6K50me7/builds/JUnX3h6BiQYvUn2TW/openapi.json
