# AI Image Upscaler 4x: Upscale Images to 4K & 8K in Bulk (`deapi/image-upscaler-4x`) Actor

AI image upscaler and photo enhancer: upscale images 4x to high resolution 4K and 8K, up to 8192 px. Bulk AI upscaling and super resolution from image URLs: JPG, PNG, WebP, BMP, GIF, TIFF in; PNG, JPG or WebP out. Transparency kept. About $0.004 per 1 MP photo.

- **URL**: https://apify.com/deapi/image-upscaler-4x.md
- **Developed by:** [deAPI](https://apify.com/deapi) (community)
- **Categories:** AI, Developer tools, E-commerce
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.24 / 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 4x: Upscale Images to 4K & 8K in Bulk

**AI image upscaler** and **photo enhancer**: upscale images **4x** — four times the width and four times the height, 16x the pixels — straight from image links, one picture or thousands. **JPG, PNG, WebP, BMP, GIF and TIFF** in; **PNG, JPG or WebP** out, up to **8192 px** on a side. Transparent PNGs stay transparent. No GPU, no AI provider key, nothing to install.

**deAPI AI tools**

- Transcribing audio or video files? → [Audio & Video Transcription: MP3, MP4 & Podcast to Text](https://apify.com/deapi/audio-video-to-text)
- Transcribing YouTube? → [YouTube Transcript AI: Subtitles, SRT & Speakers](https://apify.com/deapi/youtube-transcript-ai)

### What does AI Image Upscaler 4x do?

Paste links to images and the Actor downloads each one, checks it, and runs it through an AI super-resolution model that enlarges it 4x and redraws the detail a plain resize cannot: sharper edges, cleaner texture, less blur and fewer compression artefacts. Every upscaled image is saved to your Apify storage and comes back as a download link, with its new size and what was billed.

It works as an image upscaling API too: send links, get back upscaled files as structured data.

### Why use it?

- **True 4x AI upscaling** — 1024 x 768 becomes 4096 x 3072; 1920 x 1080 (Full HD) becomes 7680 x 4320 (8K).
- **Bulk** — paste a list of URLs or feed the output of another Actor; images run in parallel.
- **Every common format** — JPG/JPEG, PNG, WebP, BMP, GIF and TIFF, up to 25 MB per file.
- **Transparency kept** — logos, stickers and product cut-outs stay transparent in PNG and WebP output.
- **Phone photos come out upright** — the camera's rotation tag is applied before upscaling.
- **Damaged files are caught, not billed** — every image is fully decoded before anything is spent.
- **Priced at cost** — about $0.004 for a 1-megapixel photo, about $0.01 for the largest (JPG or WebP; PNG a little more).

### What data can you get?

| Data | Details |
|---|---|
| 🖼️ **Upscaled image** | A download link (`upscaledImageUrl`) to the file in your run's key-value store. |
| 📐 **New size** | `outputWidth`, `outputHeight` and file size in MB. |
| 🗂️ **Format** | JPG, WebP or PNG — your choice. |
| 🔎 **Original** | Format, width and height of the picture you linked. |
| ✂️ **What was adjusted** | Whether it was scaled down to fit, kept its transparency, or was an animation (first frame used). |
| 💵 **Billing** | The 100,000-pixel units billed for the image. |

### How to upscale an image

1. Paste one or more links into **Image URLs** — each link must open the picture itself.
2. Pick an **Output format**: JPG (default, small files for photos), WebP (small files, keeps transparency) or PNG (lossless, keeps transparency, larger files and a small surcharge).
3. Click **Start**. When the run finishes, open the **Upscaled images** view and click any link to download, or export the dataset as JSON, CSV or Excel, or read it from the [Apify API](https://docs.apify.com/api/v2).

#### Formats and sizes

| | Supported |
|---|---|
| **Input formats** | JPG / JPEG, PNG (with transparency), WebP, BMP, GIF (first frame of an animation), TIFF |
| **Output formats** | PNG, JPG, WebP |
| **Input file size** | up to 25 MB and 40 megapixels (16 MP for transparent images) |
| **Scale** | always 4x width and 4x height |
| **Largest output** | 8192 px on a side, about 58.7 megapixels (for example 8192 x 7168) |
| **Largest input upscaled as it is** | 2048 px on a side and 3.67 megapixels; transparent images 2.1 MP (PNG output) or 0.7 MP (WebP output) |
| **Larger inputs** | first scaled down to fit, keeping their proportions, then upscaled 4x — the row says `downscaledToFit: true` |
| **Smallest input** | 16 px on a side; pictures under 128 px are upscaled too |

| You send | You get |
|---|---|
| 256 x 256 icon | 1024 x 1024 |
| 640 x 480 photo | 2560 x 1920 |
| 1024 x 768 | 4096 x 3072 |
| 1280 x 720 (HD) | 5120 x 2880 (5K) |
| 1920 x 1080 (Full HD) | 7680 x 4320 (8K) |
| 2048 x 1536 | 8192 x 6144 |
| 4000 x 3000 camera photo | scaled to 2048 x 1536 first → 8192 x 6144 |

#### Which links work

| Link | Works |
|---|---|
| `https://example.com/photo.jpg` (or .png, .webp, .bmp, .gif, .tif) | ✅ direct image link |
| Image CDNs with resizing parameters, e.g. `...photo.jpg?w=1200` | ✅ |
| Web pages that *show* an image, share pages, galleries | ❌ use the direct link of the image itself |
| Images behind a login | ❌ the link must be public |
| SVG, HEIC, AVIF, RAW, PDF | ❌ convert to JPG or PNG first |

#### How fast is it?

A typical photo is ready in 10–30 seconds; the largest pictures take one to two minutes. Several images run in parallel.

### Input

| Field | Type | Description |
|---|---|---|
| `imageUrls` | array of URLs (strings or `{"url": ...}`) | Direct links to the images. Required. |
| `outputFormat` | `jpg` · `webp` · `png` | Format of the upscaled files. Default `jpg`. PNG adds a per-pixel surcharge. |
| `maxConcurrency` | integer 1–10 | Images processed at the same time. Default 5. No effect on price. |

```json
{
    "imageUrls": ["https://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg"],
    "outputFormat": "png"
}
```

### Output

```json
{
    "url": "https://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg",
    "status": "success",
    "upscaledImageUrl": "https://api.apify.com/v2/key-value-stores/.../records/0001-PIA12235-small-4x.png",
    "kvsKey": "0001-PIA12235-small-4x.png",
    "outputFormat": "png",
    "outputWidth": 2560,
    "outputHeight": 1792,
    "outputMB": 2.45,
    "inputFormat": "JPEG",
    "inputWidth": 640,
    "inputHeight": 448,
    "upscaledFromWidth": 640,
    "upscaledFromHeight": 448,
    "scale": 4,
    "downscaledToFit": false,
    "transparencyKept": false,
    "transparencyFlattened": false,
    "firstFrameOnly": false,
    "billedPixelUnits": 3,
    "billedPngUnits": 3,
    "error": null
}
```

Every link you submit gets a row. Images that could not be upscaled have `status: "failed"` and an `error` explaining why; images left out by a run cost limit or a free-plan allowance, and repeats of a link already in the input, have `status: "skipped"`. Neither is charged.

### How much does it cost?

**$0.00124 per image + $0.00024 per started 100,000 pixels of the picture sent for upscaling** — your original, after any scaling down to fit, not the 16x larger result. **PNG output adds $0.00016 per 100,000 pixels**, because a lossless 4x PNG is about six times the size of a JPG to store.

The price follows the size of the picture, because the cost of AI upscaling does: a small thumbnail costs a fraction of a cent, a picture at the 3.67-megapixel maximum about a cent. Pixels are counted on the picture as it is upscaled, after any scaling down to fit — so a 12-megapixel 4000 x 3000 photo costs the same as the 2048 x 1536 (3.1 MP) version it is upscaled from. Pictures under 128 px on a side are padded to 128 px for upscaling and billed at that size. JPG and WebP cost the same.

| You send | You get | JPG / WebP | PNG |
|---|---|---|---|
| 512 x 512 | 2048 x 2048 | **$0.0020** | $0.0024 |
| 800 x 600 | 3200 x 2400 | **$0.0024** | $0.0032 |
| 1024 x 768 | 4096 x 3072 | **$0.0032** | $0.0044 |
| 1024 x 1024 | 4096 x 4096 | **$0.0039** | $0.0056 |
| 1920 x 1080 | 7680 x 4320 | **$0.0063** | $0.0096 |
| 4000 x 3000 (scaled to 2048 x 1536) | 8192 x 6144 | **$0.0089** | $0.0140 |
| 2048 x 1792 | 8192 x 7168 | **$0.0101** | $0.0160 |
| 100 product photos of 1000 x 1000 | 4000 x 4000 each | **$0.36** | $0.52 |

Images that fail — unreachable, not an image, damaged, too large — are **never charged**, and neither are images skipped by a run cost limit or a free-plan allowance.

Set **maximum cost per run** to cap your spend: the Actor checks each image before it upscales it and skips anything the remaining budget cannot cover.

**Free plan:** 10 images per run and 20 per calendar month (resets at 00:00 UTC on the 1st), within a daily capacity shared by all free users. Any paid Apify plan removes the free-plan limits.

### Use cases

| Use case | Why upscale |
|---|---|
| **E-commerce product photos** | Marketplace zoom generally needs 1000 px or more on the longest side; 4x gets small supplier images well past that. |
| **Print and print-on-demand** | Posters, canvas and merchandise need far more pixels than a web image has. |
| **Real estate and listings** | Sharper listing photos from old or compressed originals. |
| **AI-generated images** | Take a 1024 x 1024 generation to 4096 x 4096 for print or wallpapers. |
| **Old photos and scans** | Bring small scans and archive pictures up to a usable size. |
| **Web design and marketing** | Hero images, banners and backgrounds for 4K and retina screens. |
| **Datasets and pipelines** | Upscale the image URLs another scraper collected, in the same workflow. |

### Tutorial: upscale images with the API

#### 1. One image in the Console

Open the Actor, keep the prefilled NASA image (640 x 448) and click **Start**. In about fifteen seconds the **Upscaled images** view shows the 2560 x 1792 result with a preview; click the link to download the JPG.

#### 2. A batch for an online shop

Paste your product image URLs into **Image URLs**, one per line, set **Output format** to WebP and start. Every row has the new width and height and a download link; export the view as CSV to map the new files back to your products.

#### 3. From Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("deapi/image-upscaler-4x").call(run_input={
    "imageUrls": [
        "https://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg",
    ],
    "outputFormat": "png",
})
store = client.key_value_store(run["defaultKeyValueStoreId"])
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["status"] == "success":
        record = store.get_record(row["kvsKey"])
        with open(row["kvsKey"], "wb") as handle:
            handle.write(record["value"])
        print(row["kvsKey"], row["outputWidth"], "x", row["outputHeight"])
```

#### 4. From JavaScript or cURL

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('deapi/image-upscaler-4x').call({
    imageUrls: ['https://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg'],
    outputFormat: 'webp',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].upscaledImageUrl);
```

```bash
curl -X POST "https://api.apify.com/v2/acts/deapi~image-upscaler-4x/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"imageUrls": ["https://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg"], "outputFormat": "jpg"}'
```

The synchronous endpoint waits at most 5 minutes. For large batches, start the run with `POST /v2/acts/deapi~image-upscaler-4x/runs` and read the dataset when it finishes, or use the Python and JavaScript clients above, which wait for you.

#### 5. Upscale what another Actor scraped

Chain it after a product or image scraper with an Apify [integration](https://docs.apify.com/platform/integrations): pass the scraped image URLs into `imageUrls` (plain strings or objects with a `url` field both work), then send the results on with a webhook, Make, Zapier, n8n or Google Drive.

### Image upscaling API and integrations

Every Apify Actor has a [REST API](https://docs.apify.com/api/v2), a [scheduler](https://docs.apify.com/platform/schedules), [webhooks](https://docs.apify.com/platform/integrations/webhooks) and official [JavaScript and Python clients](https://docs.apify.com/api/client/js). It also runs from Make, Zapier, n8n and as a tool for AI agents through the Apify MCP server.

### FAQ

#### How do I upscale an image to 4K?

A 4K picture is 3840 x 2160. Any image of 960 x 540 or more becomes 4K or larger with this Actor, because it is enlarged 4x: 960 x 540 becomes 3840 x 2160, 1280 x 720 becomes 5120 x 2880.

#### Can I upscale an image to 8K?

Yes. 1920 x 1080 becomes 7680 x 4320 — 8K UHD. The largest output is 8192 px on a side.

#### Is there an image upscaling API? Do I need an API key?

The Actor is the API: call it with your Apify token from Python, JavaScript, cURL or any HTTP client, as in the tutorial above. You do not need an account or a key with any AI provider.

#### Can I upscale images in bulk?

Yes — paste as many links as you like, or pass a list from another Actor. Images run in parallel (5 at a time by default, up to 10) and each one gets its own row and file.

#### Which image formats are supported?

JPG/JPEG, PNG, WebP, BMP, GIF and TIFF in; PNG, JPG and WebP out. For an animated GIF the first frame is upscaled. SVG is a vector format and needs no upscaling; HEIC, AVIF and RAW files must be converted to JPG or PNG first.

#### Does it keep transparent backgrounds?

Yes, with PNG or WebP output: the transparent areas are kept and enlarged with the picture. With JPG output, which cannot store transparency, transparent areas become white.

#### What is the largest image I can upscale?

Any image up to 25 MB and 40 megapixels (16 MP if transparent) is accepted. Pictures up to 2048 px on a side and 3.67 megapixels are upscaled exactly as they are; larger ones are scaled down to that size first and then upscaled 4x, so the result is at most 8192 px on a side. Images that are already very large usually gain less from 4x AI upscaling.

#### Why is my result smaller than four times my original?

Because the original was larger than 2048 px on a side or 3.67 megapixels, so it was scaled down to fit before upscaling. The row shows `downscaledToFit: true` and the size it was upscaled from in `upscaledFromWidth` and `upscaledFromHeight`.

#### Can I upscale 2x or 8x?

Every result is 4x. For 2x, scale the 4x result down by half — still sharper than enlarging the original 2x. For 8x, run the 4x result through again only if it is at most 2048 px on a side; larger pictures are scaled down to fit first.

#### Can it fix blurry or low-resolution photos?

It sharpens soft, small and compressed pictures as it enlarges them and removes much of the blockiness of heavy JPEG compression. It cannot recover detail lost to strong motion blur or a missed focus.

#### How do I increase image resolution for print?

Print size is pixels divided by DPI. At 300 DPI a 1920 x 1080 image prints at about 16 x 9 cm; upscaled to 7680 x 4320 it prints at about 65 x 37 cm (25.6 x 14.4 in).

#### Is it free to try?

Yes. On the Apify free plan you can upscale 10 images per run and 20 per calendar month, charged against the free monthly platform credit.

#### Does it work on illustrations, anime and AI art?

Yes, it upscales photos, illustrations, digital art, renders and screenshots alike. It is a general-purpose upscaler: it sharpens and redraws detail, but it does not restore damaged faces or colourise old photos.

#### Can I upload an image from my computer?

The Actor needs a link. Put the image anywhere that gives a direct public link — your website, a cloud bucket, or an Apify key-value store record — and paste that link.

#### How long are the upscaled files kept?

They are stored in the run's key-value store in your own Apify account, under your plan's data retention. Download them, or copy them to your own storage with an integration, if you need them for longer.

#### Why did an image fail?

Usually because the link opens a web page rather than the image itself, the image is behind a login, the file is damaged or incomplete, or it is in a format that is not supported. Failures are never charged; the reason is in the row's `error` field.

### Support / feedback

Found a bug, hit an image that will not upscale, or want a feature? Open a ticket in this Actor's **Issues** tab on its Apify Store page and include the image URL and run ID where you can.

# Actor input Schema

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

Direct links to the images to upscale — each link must open the picture itself, without a login. **Formats: JPG/JPEG, PNG (transparency kept), WebP, BMP, GIF (first frame) and TIFF**, up to **25 MB** and **40 megapixels** per file (16 MP for transparent images), at least 16 px on a side. Every image is enlarged **4x in width and height** (16x the pixels): 512 x 512 becomes 2048 x 2048, 1024 x 768 becomes 4096 x 3072, 1920 x 1080 becomes 7680 x 4320. The largest output is **8192 px** on a side and about 58.7 megapixels, so pictures over 2048 px on a side or 3.67 MP are first scaled down to that size, keeping their proportions (transparent pictures: 2.1 MP for PNG output, 0.7 MP for WebP output). Pictures under 128 px are upscaled too. Plain strings or objects with a `url` field both work. **Free plan: 10 images per run and 20 per calendar month (resets 00:00 UTC on the 1st), within a daily capacity shared by all free users. Paid plans remove the free-plan limits.**

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

File format of the upscaled images. **PNG** is lossless and keeps transparency — best for graphics, logos, screenshots, illustrations and print. **WebP** keeps transparency in files several times smaller — best for websites and online shops (transparent WebP output is limited to 0.7 MP before upscaling). **JPG** gives the smallest files for photos; transparent areas become white. PNG costs more: its files are about six times larger to store, so it adds a per-pixel surcharge.

## `maxConcurrency` (type: `integer`):

How many images are processed at the same time. It has no effect on price.

## Actor input object example

```json
{
  "imageUrls": [
    "https://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg"
  ],
  "outputFormat": "jpg",
  "maxConcurrency": 5
}
```

# Actor output Schema

## `images` (type: `string`):

One row per image link: a download link to the upscaled file (upscaledImageUrl), its format, width, height and size, the original's format and dimensions, whether it was scaled down to fit or kept its transparency, and what was billed. Every link you submit produces a row. Images that could not be upscaled carry status 'failed' with an 'error' field and are not charged. Images left out because a free-plan allowance or a run cost limit was reached carry status 'skipped' with the reason in 'error', and are not charged either.

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

The upscaled image files, stored in the run's key-value store under keys like 0001-photo-4x.png.

# 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://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("deapi/image-upscaler-4x").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://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("deapi/image-upscaler-4x").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://images-assets.nasa.gov/image/PIA12235/PIA12235~small.jpg"
  ]
}' |
apify call deapi/image-upscaler-4x --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deapi/image-upscaler-4x"
        }
    }
}
```

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/S7RZItoZJ9oFgdlgs/builds/dwjBqnsFKICx01MF4/openapi.json
