# AI Image Upscaler – Real-ESRGAN 2x & 4x (`fast_data_asap/ai-image-upscaler`) Actor

Upscale and enhance images 2x or 4x with Real-ESRGAN AI super-resolution for $15 per 1,000 images. Paste image URLs, get sharp PNG, JPG or WebP files with download links. Pay only for successful images.

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

## Pricing

from $12.00 / 1,000 upscaled images

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 – Real-ESRGAN 2x & 4x

**$15 per 1,000 images.** Make images **2x or 4x larger and sharper** with Real-ESRGAN AI super-resolution. Paste image URLs, get high-resolution PNG, JPG or WebP files with direct download links.

### What you get

| Field | Description |
|---|---|
| `outputUrl` | Direct download link to the upscaled image |
| `inputWidth`, `inputHeight`, `outputWidth`, `outputHeight` | Sizes before and after |
| `status` | `ok` or `failed` (with `error`) |
| `processingSeconds` | Time taken for the image |

All files are also in the run's key-value store, ready to download in bulk.

### Use cases

- Product photos for e-commerce and marketplaces
- Old, small or compressed images for print and presentations
- AI-generated images that need higher resolution
- Batch processing via API, Make, Zapier, n8n or AI agents (Apify MCP)

### Inputs

- **Image URLs**: direct links to JPG, PNG or WebP images (max 30 MB each)
- **Upscale factor**: 2x or 4x
- **Output format**: PNG (keeps transparency), JPG or WebP
- **Max input size**: up to 1 megapixel input (about 1000 x 1000 px, becoming 4000 x 4000 px at 4x). Larger images are scaled down first.

### How much does it cost?

$15 per 1,000 upscaled images ($0.015 each). Failed images are free.

### FAQ

**Is there an image upscaler API?** Yes. Run this Actor via the Apify API or MCP to upscale images in bulk, an alternative to Topaz, Upscale.media or Let's Enhance APIs.

**What is the maximum input size?** Images are downscaled to 1 megapixel before upscaling by default (adjustable), so a 4x result is up to about 16 megapixels.

**Which formats are supported?** JPG, PNG, WebP and most other common formats as input; PNG, JPG or WebP as output. Transparency is kept for PNG and WebP.

**Am I charged for failed images?** No. You only pay for images that were upscaled and saved.

**Can I use the results commercially?** The model (Real-ESRGAN) is BSD-licensed. You need the rights to the images you upload.

### Use it with Claude, ChatGPT and other AI agents

1. Add the Apify MCP server to your assistant (e.g. in Claude: Settings → Connectors → add `https://mcp.apify.com`, then sign in with Apify).
2. Ask in plain language. The assistant finds this Actor, runs it and works with the results.

Or connect only this Actor: `https://mcp.apify.com?tools=fast_data_asap/ai-image-upscaler`

Example prompts:

- "Upscale these 10 product photos 4x and give me the download links."
- "Make this logo twice as large as a PNG with transparency: https://..."

You can also run it via the Apify API, on a schedule, or connect it to Make, Zapier, n8n and Google Sheets.

#### Free n8n workflow

[Bulk-upscale product images listed in a Google Sheet](https://github.com/ichkifokkus/data-recipes/tree/main/5-bulk-image-upscale) – import-ready n8n workflow using this Actor. More in [Data Recipes](https://github.com/ichkifokkus/data-recipes).

#### Pay per call with x402 – no account needed

AI agents can run this Actor and pay per call with **x402** (USDC stablecoin payments over HTTP) through Apify's agentic payments – no Apify account or API key required. You pay the same pay-per-event prices listed above. Details: [Apify x402 integration](https://docs.apify.com/platform/integrations/x402).

### Notes

- You only pay for images that were upscaled successfully. Failed downloads are listed but not charged.
- Model: Real-ESRGAN general x4 v3 by Xintao Wang et al., BSD-3-Clause license.
- Only process images you have the rights to use.

# Actor input Schema

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

Direct links to JPG, PNG or WebP images.

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

How much larger the output should be.

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

File format of the upscaled images. PNG keeps transparency.

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

Compression quality for JPG and WebP (1-100).

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

Larger inputs are scaled down to this size before upscaling (1 MP is about 1000 x 1000 px, which becomes 4000 x 4000 px at 4x).

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"
  ],
  "scale": "4",
  "outputFormat": "png",
  "quality": 92,
  "maxInputMegapixels": 1
}
```

# Actor output Schema

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

No description

## `files` (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://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fast_data_asap/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://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("fast_data_asap/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://raw.githubusercontent.com/xinntao/Real-ESRGAN/master/inputs/0014.jpg"
  ]
}' |
apify call fast_data_asap/ai-image-upscaler --silent --output-dataset

```

## MCP server setup

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