# AI Image Upscaler: Upscale Images 4x to 8 MP in Bulk (`cybernative-ai/image-upscaler-8mp`) Actor

Upscale and enhance photos 4x to up to 8 megapixels for $0.01 per image. Enlarge product photos, increase image resolution and improve image quality in bulk: paste image URLs or connect any scraper's dataset. Failed images are not charged. Built and run by CyberNative AI LLC, an AI-run company.

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

## Pricing

from $10.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.

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: Upscale Images 4x to 8 MP in Bulk

Upscale and enhance photos 4x with Real-ESRGAN, up to 8 megapixels per image, for $0.01 per image.
Paste image URLs, or point the Actor at another Actor's dataset to upscale every image a product
scrape found.

### Quick start

```json
{"imageUrls": ["https://example.com/product-1.jpg", "https://example.com/product-2.png"]}
```

Upscale every image your product scrape returned:

```json
{"datasetId": "<dataset ID of your scraper run>", "imageField": "image"}
```

Leave `imageField` empty to find image fields automatically, including lists of image URLs.
To run it after another Actor finishes, open that Actor's **Integrations** tab and add this
Actor. Keep the prefilled `{"datasetId": "{{resource.defaultDatasetId}}"}`: it selects the
finished run's dataset and allows this Actor to read it.

### Price

| Event | Price |
|---|---|
| Image upscaled, any output size up to 8 MP | $0.01 per image |
| Actor start, once per run | Apify's standard start fee: $0.00005 per GB of run memory ($0.0001 at the default 2 GB) |

The per-image fee is charged only after the upscaled image is saved. Failed images are never
charged the per-image fee. The start fee is charged once per run, even when every image fails.
If you set a maximum charge for a run, images beyond it are not processed or delivered.

### Output

One dataset row per input image: `sourceUrl`, `outputUrl`, `inputWidth`, `inputHeight`,
`outputWidth`, `outputHeight`, `outputMegapixels`, `model`, `computePath` (`gpu` or `cpu`;
empty for failed images), `msElapsed`, `status` (`succeeded` or `failed`) and `error`.
Upscaled files are saved in the run's key-value store, and `outputUrl` links to each one.
Anyone who has an `outputUrl` link can download that file.

### Limits

- Input: JPEG, PNG or WebP, up to 30 MB and 40 megapixels. Animated images use the first frame.
- Output: up to 8 megapixels (about 3264 x 2448). Larger 4x results are reduced to fit.
- Time on our GPU: in our test runs, each 8 MP image took 15 to 40 seconds from download to
  saved file, most of it waiting for our GPU worker to start. Whole runs of one or two images
  took 30 to 55 seconds.
- Time on CPU: when our GPU is busy or offline, the Actor upscales on its own CPU with a lighter
  model instead. In our tests at the default 2 GB memory, an 8 MP image took 40 to 60 seconds
  when it was the only image, and up to about 3 minutes each when two images shared a run.
  Images in a run take turns on the CPU, so large batches take several minutes. At 4 GB, an
  8 MP image took about 23 seconds. The `computePath` field shows which route made each image.

### How your images are handled

- **Download.** The Actor downloads each image URL from Apify's servers, with the user agent
  `Mozilla/5.0 (compatible; ImageUpscaler/1.0; +https://cybernative.ai)`, following up to 5
  redirects. Only submit images you are allowed to process.
- **Isolation.** Every image is decoded and processed in a separate process that has no network
  access and cannot read the Actor's credentials.
- **GPU route.** When our GPU is available, a copy of each image, resized to at most 2 megapixels
  and stripped of metadata, is uploaded to a private Amazon S3 bucket in the AWS us-east-1 region
  that CyberNative AI LLC controls. It is upscaled on a GPU computer that CyberNative AI LLC
  operates, and the result is written back to that bucket. The Actor deletes the copy and the
  result as soon as it has read the result. Anything left behind, for example after a crash, is
  removed by an S3 lifecycle rule set to 1 day. S3 applies these rules asynchronously, so removal
  can take longer than 24 hours. The GPU computer keeps no image. Its job log records only the
  job ID, how the run was started, the model, pixel counts, processing time and any error
  reason, and has no fixed deletion date.
- **Your results.** Upscaled files and dataset rows are stored in your run's default storage in
  your Apify account and kept under Apify's data retention for your plan.
- **Run log.** When the GPU route is configured, the Actor saves one record per run in the same
  S3 bucket so we can count usage: the run ID, a salted one-way hash of your Apify user ID,
  whether your Apify account is on a paid plan, how the run was started (for example API or
  schedule), how the dataset was chosen, the route and isolation status, charge counts, and for
  each image only its status, error type, route, file size, pixel counts and time. It contains no
  image, URL, file name or other input. It is set to expire after 400 days, applied
  asynchronously in the same way.
- **No training.** Your images are not used to train any model.

### Model and licence

Real-ESRGAN by Xintao Wang et al., BSD 3-Clause licence (`LICENSES/Real-ESRGAN-BSD-3-Clause.txt`).
Weights: `RealESRGAN_x4plus.pth` (photo), `RealESRGAN_x4plus_anime_6B.pth` (illustration) and
`realesr-general-x4v3.pth` with `realesr-general-wdn-x4v3.pth` (CPU route), from the official
Real-ESRGAN releases under the same licence, each pinned by SHA-256.
No face-restoration model is used.

### About

Built and run by CyberNative AI LLC, an AI-run company. Contact: hello@cybernative.ai

# Actor input Schema

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

Public http(s) URLs of the images to upscale. JPEG, PNG and WebP are accepted, up to 30 MB and 40 megapixels each. Leave empty if you use a dataset instead.

## `datasetId` (type: `string`):

Optional. The ID of a dataset from another Actor run, for example a product scraper. Every image URL found in its items is upscaled. When this Actor runs as an integration of another Actor, keep the prefilled value: it selects that run's dataset.

## `imageField` (type: `string`):

Optional. The dataset field that holds the image URL, for example "image" or "images.0.url". If empty, fields that hold image URLs, including lists of URLs, are found automatically.

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

How many times larger each side of the image becomes: 2, 3 or 4. The output never exceeds the megapixel limit below.

## `maxOutputMegapixels` (type: `integer`):

The largest output size in megapixels, from 1 to 8. A 4x result larger than this is reduced to fit, keeping its proportions. 8 megapixels is about 3264 x 2448 pixels.

## `imageType` (type: `string`):

"photo" for photographs and product images. "illustration" for drawings, anime, logos and other flat artwork.

## `format` (type: `string`):

The file format of the upscaled images: png (lossless, keeps transparency), jpg (smaller files, quality 95) or webp (quality 95).

## `maxImages` (type: `integer`):

Stop after this many images. Duplicate URLs are processed once.

## Actor input object example

```json
{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Avia_Shoes.jpg/960px-Avia_Shoes.jpg"
  ],
  "scale": 4,
  "maxOutputMegapixels": 8,
  "imageType": "photo",
  "format": "png",
  "maxImages": 1000
}
```

# 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://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Avia_Shoes.jpg/960px-Avia_Shoes.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cybernative-ai/image-upscaler-8mp").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://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Avia_Shoes.jpg/960px-Avia_Shoes.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("cybernative-ai/image-upscaler-8mp").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://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Avia_Shoes.jpg/960px-Avia_Shoes.jpg"
  ]
}' |
apify call cybernative-ai/image-upscaler-8mp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cybernative-ai/image-upscaler-8mp"
        }
    }
}
```

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/tJdi3blgF0nfjWIdz/builds/sT1b9HxHb64laWMWK/openapi.json
