# AI Image Upscaler (Real-ESRGAN 2x/4x, Face Restore) (`himanshu-data/ai-image-upscaler`) Actor

Upscale photos, product shots, art and anime 2x or 4x with Real-ESRGAN on fast GPUs. Optional face restoration, PNG/JPEG/WebP output, bulk URLs. No GPU or setup needed. Pay per image, failed images are free.

- **URL**: https://apify.com/himanshu-data/ai-image-upscaler.md
- **Developed by:** [Himanshu Agrawal](https://apify.com/himanshu-data) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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 (Real-ESRGAN 2x/4x, Face Restore)

Make images **2x or 4x larger and sharper** with Real-ESRGAN running on fast GPUs. Paste image links, pick photo, anime or denoise mode, and get high-resolution PNG or JPEG files back. No GPU, no install, no sign-up anywhere else. **Failed images are never charged.**

### What you can use it for

- **E-commerce:** sharpen supplier and product photos for Shopify, Amazon or Etsy listings.
- **Print and posters:** enlarge photos and artwork to print resolution.
- **Old and low-res photos:** restore faces in family photos and group shots.
- **Anime and illustrations:** a dedicated model keeps lines clean.
- **Automation:** call it from Make, n8n, Zapier or the API to upscale images in bulk.

### Input

| Field | What it does |
|---|---|
| Image URLs | Public links to jpg, png or webp images, one per line. |
| Upscale factor | 2x or 4x. |
| Image type | Photo / general, Anime / illustration, or Noisy or compressed photo. |
| Restore faces | Extra face restoration for portraits. |
| Output format | PNG (full quality) or JPEG (smaller files). |

```json
{
  "imageUrls": ["https://example.com/product.jpg"],
  "scale": "4",
  "model": "photo",
  "faceEnhance": false,
  "outputFormat": "png"
}
```

### Output

One row per upscaled image. `outputUrl` is a permanent download link stored in your run.

```json
{
  "inputUrl": "https://example.com/product.jpg",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/.../records/upscaled-0001.png",
  "outputWidth": 4096,
  "outputHeight": 4096,
  "scale": 4,
  "model": "photo",
  "faceEnhance": false,
  "format": "png",
  "seconds": 6.2
}
```

### Pricing

Pay per image upscaled: **$0.012 per image** on paid Apify plans (less on Scale and Business). Failed images and skipped links are free. Set a spending limit per run and the Actor stops cleanly when it is reached.

Free Apify plan: up to 3 images per run, so you can try it before upgrading.

### Tips

- Upscale the original file, not a screenshot of it.
- Outputs are capped at 16 megapixels: large inputs are upscaled by a smaller factor automatically (for example a 3000x2000 photo is upscaled 1.6x to 4800x3200).
- Use **JPEG** output for web use; PNG files at 4x can be large.

### FAQ

**Who owns the output?** You do, subject to the rights you have in the input image.

**Are my images stored?** Results are saved only in your own Apify run storage. Inputs are processed and not kept.

# Actor input Schema

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

One public image link per line (jpg, png, webp). Up to a few thousand per run.

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

2x doubles width and height, 4x makes them four times larger.

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

Photo works for most images. Anime is tuned for drawings and illustrations. Denoise is better for noisy or compressed photos.

## `faceEnhance` (type: `boolean`):

Extra face restoration for portraits and group photos.

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

PNG keeps full quality. JPEG gives much smaller files.

## Actor input object example

```json
{
  "imageUrls": [
    "https://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg"
  ],
  "scale": "4",
  "model": "photo",
  "faceEnhance": false,
  "outputFormat": "png"
}
```

# 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://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("himanshu-data/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://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("himanshu-data/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://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg"
  ]
}' |
apify call himanshu-data/ai-image-upscaler --silent --output-dataset

```

## MCP server setup

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