# AI Image Upscaler API: Upscale & Enhance Photos 2x, 4x (`magnova/ai-image-upscaler`) Actor

Upscale images 2x, 3x or 4x with Real-ESRGAN AI: sharpen low-res, blurry or compressed photos, product shots and anime art from image URLs or an Apify dataset. Keeps transparency. $0.01 per image, no usage fees.

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

## Pricing

from $7.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 API: upscale and enhance photos 2x, 3x or 4x

**AI Image Upscaler makes small, blurry or compressed images 2x, 3x or 4x larger with the Real-ESRGAN AI model, adding real-looking detail instead of blur.** Give it image URLs or a whole Apify dataset of image links, and get back download links to sharp, high-resolution JPG, PNG or WebP files for **$0.01 per image, with no platform usage fees on top**.

It is built for batches: product catalogs, scraped listings, AI-generated art, old photos, thumbnails and screenshots. Transparent PNGs keep their transparency, and a dedicated model handles anime, cartoons and illustrations.

### What can I use it for?

- **E-commerce:** upscale supplier or marketplace product photos to 2000x2000 for Shopify, Amazon or print.
- **Scraped datasets:** point it at the dataset of any scraper run and upscale every `imageUrl` in one go.
- **AI art and print-on-demand:** enlarge Midjourney, Stable Diffusion or Nano Banana outputs 4x for posters, T-shirts and stickers.
- **Real estate and listings:** sharpen low-resolution listing photos.
- **Anime, manga and illustrations:** clean, crisp line art with the anime model.
- **Restoring old or compressed images:** remove JPEG artifacts and noise with the denoise slider.
- **AI agents and automations:** call it from n8n, Make, Zapier or any MCP client with one URL.

### How do I upscale an image?

1. Paste one or more direct image URLs into **Image URLs** (or pick a dataset).
2. Choose the **upscale factor** (2, 3 or 4) and the **model** (photo or anime).
3. Click **Start**. Each result row links to the upscaled file.

Minimal input:

```json
{
  "images": ["https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/330px-Cat03.jpg"],
  "scale": 4
}
```

Upscale every image in a scraper's dataset:

```json
{
  "dataset": "YOUR_DATASET_ID",
  "imageUrlField": "imageUrl",
  "scale": 2,
  "outputFormat": "webp"
}
```

The Actor auto-detects common fields (`imageUrl`, `image`, `images`, `thumbnailUrl`, `displayUrl`, `photo`, also one level down such as `product.imageUrl`). Use `imageUrlField` with a dot path (`images.0`, `product.mainImage`) when your data is shaped differently.

### Input options

| Field | What it does | Default |
|---|---|---|
| `images` | Direct image URLs (JPG, PNG, WebP, GIF, BMP, TIFF, AVIF, HEIC) | - |
| `dataset` | Apify dataset whose items contain image URLs | - |
| `imageUrlField` | Field holding the URL in each dataset item | auto |
| `scale` | 2, 3 or 4 times larger per side | 4 |
| `model` | `photo` (general) or `anime` (illustrations, cartoons) | photo |
| `denoise` | 0 keeps grain, 1 removes noise and JPEG artifacts strongly | 0.5 |
| `outputFormat` | `auto`, `jpg`, `png` or `webp` | auto |
| `quality` | JPG/WebP quality 50-100 | 92 |
| `maxOutputMegapixels` | Size limit per result (max 36 MP) | 16 |

### Output

Each image becomes one dataset row, and the file itself is saved in the run's key-value store:

```json
{
  "sourceUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/330px-Cat03.jpg",
  "status": "ok",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/.../records/0001-330px-Cat03-upscaled.jpg",
  "outputFormat": "jpg",
  "inputWidth": 330, "inputHeight": 330,
  "outputWidth": 1320, "outputHeight": 1320,
  "scale": 4,
  "model": "photo",
  "denoise": 0.5,
  "hasTransparency": false,
  "outputMegapixels": 1.74,
  "outputSizeBytes": 316262,
  "billedExtraMegapixels": 0,
  "processingSecs": 2.2
}
```

Failed images get `status: "error"` with a plain-English `error` (for example "URL returned a web page, not an image") and are **not charged**. A `SUMMARY` record in the key-value store lists every image and the counts. The dataset's Overview view shows the original and upscaled images side by side.

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

**$0.01 per image** for results up to 4 megapixels (for example 2000x2000 or 2400x1600). That is all you pay: platform compute is included, so there is no separate usage bill.

- 100 images: $1. 1,000 images: $10.
- Higher Apify plans get volume discounts: Silver $0.0085, Gold and above $0.007 per image.
- Results bigger than 4 MP (you allow them with `maxOutputMegapixels`, default 16) add **$0.003 per started extra megapixel**. Example: a 3200x3200 result (10.2 MP) costs $0.01 + 7 x $0.003 = $0.031.
- Unreachable, unreadable, too-large and skipped images are free.
- Set a maximum charge per run and the Actor stops (or shrinks the last result) to stay within it.

Other AI upscalers on the Apify Store charge around $0.02 per image plus platform usage.

### How good is the quality?

The photo model is **Real-ESRGAN general v3**, one of the most used open upscalers (over 100 million runs on public AI APIs). It reconstructs edges, hair, fur, text and textures, and removes JPEG blocks and noise. Because it is not a diffusion model, it stays faithful to your image: it does not invent new faces, objects or text.

The anime model is **Real-ESRGAN anime video v3**, tuned for flat colors and clean lines.

Large inputs are handled automatically: images above about 500x500 pixels are processed at a reduced working size and rebuilt by the model at the target size, which keeps runs fast and prices flat. The output always has the exact width and height you asked for.

### Use with AI agents and MCP

The Actor is ready for AI agents through the Apify MCP server and the Apify API. One field is enough:

```json
{ "images": ["https://example.com/product.jpg"] }
```

The response row includes `outputUrl`, the final width and height, and the format, so an agent can hand the link straight to the next step (upload to a store, send by email, attach to a ticket). It runs pay-per-event with limited permissions and works with agentic payments.

### Integrations

- **n8n / Make / Zapier:** run the Actor with the Apify node or module, then read `outputUrl` from the dataset.
- **Chain after a scraper:** add this Actor as a webhook or integration on your scraper's run and pass its dataset ID.
- **API:** `POST https://api.apify.com/v2/acts/Magnova~ai-image-upscaler/run-sync-get-dataset-items` with the JSON input.

### FAQ

#### How do I upscale an image without losing quality?

Use scale 2 or 4 with the photo model and `outputFormat` png or jpg at quality 92+. Real-ESRGAN adds detail rather than stretching pixels, so edges stay sharp.

#### Can it upscale images in bulk?

Yes. Paste hundreds of URLs or pick a dataset with thousands of items. Images are downloaded while the previous one is being upscaled.

#### Does it keep transparent backgrounds?

Yes. PNG, WebP and GIF transparency is preserved; `auto` format saves those images as PNG.

#### Which image formats are supported?

JPG, PNG, WebP, GIF (first frame), BMP, TIFF, AVIF and HEIC in; JPG, PNG or WebP out.

#### What is the biggest image it can make?

Up to 36 megapixels per image (about 6000x6000). The default limit is 16 MP.

#### Is it a Topaz, Let's Enhance or Upscayl alternative?

It uses the same family of open models as Upscayl, runs in the cloud with no GPU or install, and charges per image instead of a subscription.

#### Is it legal to upscale images?

Upscaling is processing of files you provide. Only use images you own or have the rights to edit. The Actor does not download from social media pages and does not keep your images beyond your run's storage retention.

#### Where are my files stored?

In the run's default key-value store on your Apify account. Links in `outputUrl` work without your token; download them or move them to your own storage, since Apify keeps run storage for your plan's retention period.

### Legal and data

Pure computation on images you supply by URL. The models are Real-ESRGAN by Xintao Wang et al., released under the BSD-3-Clause license. No personal data is collected; images are fetched only from the URLs you provide, and results stay in your own Apify storage.

### Related Actors by Magnova

- [PDF and Image to Text (OCR)](https://apify.com/magnova/pdf-ocr-text-extractor)
- [Audio Noise Remover](https://apify.com/magnova/audio-noise-remover)
- [Lighthouse and Core Web Vitals Audit](https://apify.com/magnova/lighthouse-audit)

# Actor input Schema

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

Direct links to the images to upscale (JPG, PNG, WebP, GIF, BMP, TIFF, AVIF or HEIC). Example: https://example.com/photo.jpg. Use images you own or have rights to.

## `dataset` (type: `string`):

Pick a dataset (for example the output of a scraper run). The Actor reads image URLs from each item: it auto-detects fields like imageUrl, image, images, thumbnailUrl or displayUrl, or use 'Image URL field' below.

## `imageUrlField` (type: `string`):

Field in each dataset item that holds the image URL. Dot paths work, e.g. 'images.0' or 'product.imageUrl'. Leave empty to auto-detect.

## `maxDatasetItems` (type: `integer`):

Read at most this many items from the dataset. Example: 100.

## `scale` (type: `integer`):

How many times larger each side gets: 2, 3 or 4. Example: 4 turns 500x500 into 2000x2000. Automatically lowered if the result would exceed 'Max output megapixels'.

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

'photo' (Real-ESRGAN general v3) for photos, product shots, screenshots and AI art. 'anime' (Real-ESRGAN anime v3) for anime, cartoons, illustrations and line art.

## `denoise` (type: `number`):

0 keeps grain and texture, 1 removes noise and compression artifacts strongly (smoother). Example: 0.5. Ignored by the anime model.

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

'auto' = PNG for images with transparency, WebP for WebP inputs, otherwise JPG. Or force jpg, png or webp.

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

Compression quality for JPG and WebP output, 50-100. Example: 92.

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

Upper limit for each result's size. The price covers up to 4 MP per image; each started megapixel above 4 is billed as an extra megapixel. Example: 16 (4000x4000). Maximum 36.

## `maxFileSizeMb` (type: `integer`):

Skip input images larger than this. Example: 40.

## Actor input object example

```json
{
  "images": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/330px-Cat03.jpg"
  ],
  "maxDatasetItems": 1000,
  "scale": 4,
  "model": "photo",
  "denoise": 0.5,
  "outputFormat": "auto",
  "quality": 92,
  "maxOutputMegapixels": 16,
  "maxFileSizeMb": 40
}
```

# Actor output Schema

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

No description

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

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

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

```

## MCP server setup

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