# AI Image Upscaler 4x — Sharp Photos up to 8K, Bulk URLs (`talvok/image-upscaler`) Actor

Upscale photos 4x or 2x with RealPLKSR, a 2024 super-resolution model trained on real photos: sharper fur, hair and fabric than Real-ESRGAN copies. Outputs up to 8K. Paste a list of links, Google Drive and Dropbox included. Failed images are free.

- **URL**: https://apify.com/talvok/image-upscaler.md
- **Developed by:** [Talvok Studio](https://apify.com/talvok) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 upscaled 100,000 pixels

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 4x — sharp photos up to 8K

Upscale photos **4x or 2x** with **RealPLKSR** (`4xNomos2_realplksr_dysample`), a 2024 super-resolution model trained on
real photographs. It rebuilds fur, hair, eyes and fabric texture instead of smoothing them over, so the result looks
sharper than the Real-ESRGAN models most upscalers run. Paste image links, get download links to the upscaled files.

![Left: a 256×256 photo enlarged 4x with an ordinary resize. Right: the same photo upscaled 4x by this Actor.](https://api.apify.com/v2/key-value-stores/MswenmzygjKuXEpu4/records/before-after-lion.jpg?signature=bSmeNSvJq9vZOtnIn0G6)

*Left: a 256×256 photo enlarged 4x with an ordinary (bicubic) resize. Right: the same photo upscaled 4x by this Actor.
Both show the same 512×512 detail of the 1024×1024 result.*

- **Up to 8K**: any image up to 2.1 megapixels, e.g. 1920×1080 → 7680×4320.
- **Many images in one run**: up to 1,000 links, one result row per image.
- **Google Drive and Dropbox links work**: paste the share link of a file shared with "Anyone with the link".
- **Failed images are free**: you pay only for files that were saved. A broken link never stops the other images.
- **Your colours are kept**: the result takes the colours of your image and only the new detail from the model.
- **Transparency is kept** in PNG and WebP.

### Price

**$0.02 per started 100,000 pixels of the image you send**, the same for 2x and 4x.

| Your image | Result at 4x | Units | Price |
| --- | --- | --- | --- |
| 256×256 | 1024×1024 | 1 | $0.02 |
| 300×300 | 1200×1200 | 2 | $0.04 |
| 512×512 | 2048×2048 | 3 | $0.06 |
| 640×480 | 2560×1920 | 4 | $0.08 |
| 1024×1024 | 4096×4096 | 11 | $0.22 |
| 1280×720 | 5120×2880 | 10 | $0.20 |
| 1920×1080 | 7680×4320 | 21 | $0.42 |

Two rules behind the table: a side shorter than 256 px counts as 256 px (the model works on 256×256 blocks), and an
image larger than 256×256 on both sides costs at least 2 units. Images that fail are not charged. The units of each
image are in its result row (`billedUnits`).

### How long it takes

The model runs on 256×256 blocks of your image; neighbouring blocks overlap by 16 px and are blended, so there are no
seams. With the default memory (4 GB, one CPU) each block takes about 20 seconds: a 256×256 image is one block, a
512×512 image is 9 blocks (about 3 minutes), a 1024×1024 photo is 25 blocks (about 8 minutes). **Set the run memory to
8 GB to go twice as fast at the same price** (two CPUs, about 10 seconds per block). The run's status line shows the
block being worked on.

### How to use it

1. Paste your image links into **Image URLs**, one per line.
2. Pick the **Scale** (4x or 2x) and the **Output format** (JPEG, PNG or WebP).
3. Click **Start**. Each row of the result table has the upscaled image and its download link (`outputUrl`).

### Input

| Field | What it does | Default |
| --- | --- | --- |
| `imageUrls` | Image links, one per line (JPG, PNG, WebP, GIF, AVIF, TIFF). Up to 2.1 MP and 4096 px per side each. | — |
| `scale` | `"4"` or `"2"` | `"4"` |
| `outputFormat` | `"jpeg"` (quality 92), `"png"` or `"webp"` (quality 92) | `"jpeg"` |
| `colorFix` | Keep the colours of the original | `true` |

```json
{
  "imageUrls": ["https://picsum.photos/id/1074/256/256"],
  "scale": "4",
  "outputFormat": "jpeg"
}
```

### Output

One row per image in the dataset, and the file in the run's key-value store.

```json
{
  "inputUrl": "https://picsum.photos/id/1074/256/256",
  "status": "done",
  "error": null,
  "inputWidth": 256,
  "inputHeight": 256,
  "outputWidth": 1024,
  "outputHeight": 1024,
  "scale": 4,
  "format": "jpeg",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/…/records/image-0001.jpg",
  "outputKey": "image-0001.jpg",
  "fileSizeBytes": 412345,
  "billedUnits": 1,
  "seconds": 21.4
}
```

`status` is `done`, `failed` (the reason is in `error`, nothing charged) or `skipped` (the run's spending limit was
reached before that image).

### Use it from the API, a schedule or an AI agent

Start it from the [Apify API](https://docs.apify.com/api/v2) with the input above and read the dataset when the run
finishes, or connect it to Make, Zapier or n8n. AI agents can call it as a tool through the
[Apify MCP server](https://docs.apify.com/mcp).

### Limits

- Up to 2.1 megapixels and 4096 px per side per image, 50 MB per file, 1,000 links per run.
- A link that does not deliver the file within 30 seconds fails (not charged). Sites that answer "too many requests" or a
  server error get two more tries. After 25 links in a row that cannot be downloaded the run stops, so a wrong list does
  not keep you waiting.
- The link must download the image itself: a web page that shows the image is not enough.
- Animated GIF and WebP: the first frame is upscaled.
- The model is made for photos. Drawings, text and screenshots get sharper edges but can look slightly painted.

### Credits

Model: [4xNomos2_realplksr_dysample](https://github.com/Phhofm/models/releases/tag/4xNomos2_realplksr_dysample) by Philip
Hofmann (Helaman), licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Architecture: RealPLKSR from
[neosr](https://github.com/neosr-project/neosr).

# Actor input Schema

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

Links to JPG, PNG, WebP, GIF, AVIF or TIFF images, one per line (up to 1,000 per run). Google Drive and Dropbox share links work too, if the file is shared with "Anyone with the link". Each image can be up to 2.1 megapixels (e.g. 1920×1080) and 4096 px per side.

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

4x makes a 1024×768 image 4096×3072. 2x makes it 2048×1536 (same price: the model always works at 4x, then the result is reduced).

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

JPEG (quality 92) gives the smallest files. PNG is lossless and keeps transparency. WebP (quality 92) keeps transparency and is smaller than PNG.

## `colorFix` (type: `boolean`):

On: the result keeps the colours of your image and gets only the new detail from the model, which on its own makes colours slightly stronger. Turn it off to get the model's raw output.

## Actor input object example

```json
{
  "imageUrls": [
    "https://picsum.photos/id/1074/256/256"
  ],
  "scale": "4",
  "outputFormat": "jpeg",
  "colorFix": true
}
```

# Actor output Schema

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

All rows saved by the run, in the default dataset.

## `files` (type: `string`):

The key-value store holding the upscaled files.

# 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://picsum.photos/id/1074/256/256"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("talvok/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://picsum.photos/id/1074/256/256"] }

# Run the Actor and wait for it to finish
run = client.actor("talvok/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://picsum.photos/id/1074/256/256"
  ]
}' |
apify call talvok/image-upscaler --silent --output-dataset

```

## MCP server setup

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