# SeedVR2 AI Image Upscaler | Upscale Photos 2x-4x, Restore JPEG (`ratatoskr/seedvr2-image-upscaler`) Actor

Upscale images 2x, 3x or 4x with SeedVR2, ByteDance's AI restoration model: sharper detail, JPEG blocks and blur cleaned up, up to 32 megapixels. PNG, JPEG or WebP, transparency kept. One row per image with a download link; failed images are free.

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

## Pricing

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

## SeedVR2 AI Image Upscaler | Upscale Photos 2x-4x, Restore JPEG

Upscale photos and product images 2x, 3x or 4x with SeedVR2, the image restoration model ByteDance released in 2025. It enlarges each image and repairs it at the same time, so JPEG blocks, blur and noise turn into real texture and clean edges. Send a list of image links and you get every result back as a PNG, JPEG or WebP file of up to 32 megapixels, with one row per image that links to it. Transparent PNG and WebP images stay transparent.

- **$0.02 an image** for results up to 4 megapixels, less on higher Apify plans. A larger result adds a small charge per extra megapixel, and an image that fails costs nothing.
- **A few seconds an image:** about 3 to 5 seconds for a 2-megapixel result, around 25 seconds for a 4K square. Up to four images run at once.

It suits online shops with small supplier photos, old and scanned photos, thumbnails collected by a scraper, and AI-generated images that need to be larger for print or a banner.

### Why this upscaler

Many upscalers are built on Real-ESRGAN, a model from 2021. It sharpens edges well, but where an image is damaged it smooths the surface into flat patches. This Actor runs SeedVR2, a diffusion model from 2025 that was trained to restore images, and the difference shows most in the texture of small, heavily compressed photos:

![Two heavily compressed photos enlarged 4x three ways: a plain resize stays blocky, Real-ESRGAN smooths the moon's surface and the strawberries' skin, SeedVR2 brings back craters and seeds](https://api.apify.com/v2/key-value-stores/WqYZXvrnSKNGW0UXT/records/seedvr2-before-after.jpg?signature=1ylpYFpV9TqHYzDie6kpV)

*Two photos 330 and 400 pixels wide, saved as low-quality JPEGs and enlarged 4x, crops at 100%. Earthrise by Bill Anders, NASA; strawberries by Ken Hammond, USDA; both public domain.*

The price per image covers the whole run, Apify's compute included, and every row tells you what its image cost.

### Input

| Field | What it does | Default |
|---|---|---|
| `imageUrls` | The images, one link per line: JPEG, PNG, WebP, GIF (first frame), AVIF or TIFF, up to 25 MB each. Google Drive links (shared with anyone who has the link), Dropbox links, data URIs and plain base64 work too. | an example photo |
| `scale` | `2`, `3` or `4`: how much larger each side gets. | `4` |
| `targetLongEdge` | Enlarge until the longer side has this many pixels, for example `3840` for 4K, instead of using `scale`. It goes up to 4x; an image already that long is skipped and not charged. | empty |
| `outputFormat` | `png` (lossless, keeps transparency), `jpg`, or `webp` (keeps transparency). | `png` |
| `quality` | JPEG and WebP quality, 1 to 100. | `95` |
| `maxOutputMegapixels` | The largest result, 1 to 32. An image that would come out larger is enlarged less to fit. | `16` |
| `skipIfLongEdgeAtLeast` | Pass over any image whose longer side already has this many pixels, without charge. | empty |
| `datasetId` | Read image links from another Actor's dataset, such as the results of a product or real estate scraper. Leave `imageUrls` empty to use only the dataset. | empty |
| `urlField` | The field holding the link in that dataset, such as `imageUrl` or `images[0].url`. Left empty, the first of `imageUrl`, `image`, `images`, `photo`, `thumbnail` and `url` is used. | empty |
| `seed` | Fixes the model's randomness, so the same image comes back nearly identical. | a new one each run |
| `maxItems` | Stop after this many images. Every image in the list counts, repeated and failed ones included. | `100` |

Automation tools can send `imageUrl`, `url`, `urls`, `images` or `startUrls` instead of `imageUrls`. If the input has a field this Actor doesn't know, the run stops before any image is charged and names the field you probably meant.

```json
{
  "imageUrls": ["https://example.com/product-small.jpg", "https://example.com/old-photo.png"],
  "scale": "4",
  "outputFormat": "png"
}
```

### Output

One row per image in the run's dataset; the **Upscaled images** view shows each result next to its original. A 330 x 330 photo of Earthrise upscaled 4x gives this row:

```json
{
  "index": 0,
  "inputUrl": "https://api.apify.com/v2/key-value-stores/WqYZXvrnSKNGW0UXT/records/earthrise-330.jpg?signature=9a76K1mXf1yCupL4exOT",
  "status": "ok",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/KsqZgO88Ia1VMrdwI/records/upscaled-0001.png?signature=1HeE0Fw2GySacv2y57sIp",
  "width": 1320,
  "height": 1320,
  "megapixels": 1.74,
  "inputWidth": 330,
  "inputHeight": 330,
  "factor": 4,
  "format": "png",
  "bytes": 852881,
  "transparent": false,
  "model": "SeedVR2",
  "seed": 594258230,
  "durationMs": 4632,
  "chargedUsd": 0.018,
  "note": null,
  "error": null
}
```

- `index` is the image's place in your list, counted from 0, and `inputUrl` the link you gave. A pasted image shows its type and a short fingerprint instead, such as `data:image/png (sha256 1a2b3c4d5e6f)`.
- `status` is `ok` when the image was upscaled and charged. It is `skipped` when the image was already large enough or repeats an earlier one in the list, and `error` when it could not be upscaled; neither is charged.
- `outputUrl` downloads the result without an API token. The files are also in the run's key-value store, named `upscaled-0001.png` onwards by list position.
- `width`, `height` and `megapixels` describe the result, `inputWidth` and `inputHeight` the original, and `factor` the enlargement used.
- `format` and `bytes` describe the file. `transparent` says whether the original had transparent pixels.
- `chargedUsd` is what this image cost on your Apify plan (the run above was on Bronze, where an image is $0.018).
- `note` explains a result smaller than asked, such as `enlarged 4x, the most this upscaler does: the long edge is 1320 pixels, not the 2048 asked`, or names the earlier image a repeated link matches.
- `error` gives the reason an image was skipped or failed, for example `the link answers 403: the file is not public`.
- `model` is `SeedVR2`, `seed` the seed used, and `durationMs` the time for this image from download to saved result.

### Was the run complete?

Each run writes an `OUTPUT` record to its key-value store, so a scheduled job can check the outcome in one request:

```
GET https://api.apify.com/v2/actor-runs/<run id>/key-value-store/records/OUTPUT
Authorization: Bearer <your Apify token>
```

`complete` is `true` when every image was upscaled or skipped. Each image is listed as a part with its `status`: `read-whole` when done, `failed` with its `reason`, or `cut-by-limit`, `stopped-by-charge-limit` or `stopped-by-time-limit`. A run where some images failed still succeeds and keeps its results, and its status message starts with `Partly failed:` followed by the reasons.

### Pricing

You pay per image delivered, at your Apify plan's price:

| Event | Free | Bronze | Silver | Gold and up |
|---|---|---|---|---|
| Image upscaled (result up to 4 megapixels) | $0.02 | $0.018 | $0.015 | $0.012 |
| Extra megapixel (each started megapixel above 4) | $0.004 | $0.004 | $0.0034 | $0.003 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

What runs cost on the Free plan:

| Run | Cost |
|---|---|
| One photo enlarged to 1320 x 1320 (1.7 megapixels) | $0.02005 |
| One photo enlarged to a 4K square, 3840 x 3840 (14.7 megapixels, so 11 extra) | $0.06405 |
| 100 images with results up to 4 megapixels | $2.00005 |

Skipped, repeated and failed images cost nothing. If you set a maximum cost per run, the Actor only upscales what fits under it and marks the rest `stopped-by-charge-limit`.

### FAQ

**How is this different from resizing an image?** A resize spreads the same pixels over a larger area. SeedVR2 adds plausible fine detail such as fur, foliage, fabric and edges, and removes compression blocks. That detail is invented by the model, so the result isn't suited to forensic or evidence work.

**Which images work best?** Photos and AI-generated images that are small, soft or compressed. Large text stays readable, but text only a few pixels high can come back as different letters, so check labels and prices on product photos.

**What sizes can I send?** Anything with a shorter side of 32 pixels or more, up to 32 megapixels. Very small images, under 128 pixels a side, are enlarged a little before the model sees them. Results go up to 16 megapixels by default and 32 with `maxOutputMegapixels`.

**What happens to transparency, colour and metadata?** PNG and WebP results keep the transparent areas. A JPEG has no transparency, so transparent areas become white. Results are saved in sRGB with the original's DPI; camera EXIF data is not copied.

**Can I send iPhone photos?** HEIC files can't be read here. Save the photo as JPEG or PNG first (the iPhone's export, or most photo apps, do this).

**What if a link fails?** The row's `error` says why: a web page instead of an image (use the image's own address), a file that isn't public (for Google Drive, share it with anyone who has the link), a site refusing downloads for a while (HTTP 429), or a file over 25 MB.

**How long do the results stay?** In the run's key-value store, for as long as your Apify plan keeps a run's storage. Download what you want to keep.

**Where are my images processed?** On fal.ai's GPU service, which runs the model; the results are saved in your own run's storage, and this Actor keeps no other copy. By running it you confirm you are 18 or older and that your images follow fal.ai's [Acceptable Use Policy](https://fal.ai/legal/acceptable-use-policy). Upscale only images you have the right to use.

### For AI agents and automation

One request upscales a list and returns one row per image:

```
POST https://api.apify.com/v2/acts/ratatoskr~seedvr2-image-upscaler/run-sync-get-dataset-items
Authorization: Bearer <your Apify token>
Content-Type: application/json

{"imageUrls": ["https://example.com/a.jpg"], "scale": "4", "outputFormat": "jpg"}
```

Check `status` first: only `ok` rows have a new image at `outputUrl`, and `error` explains the others in one line. In n8n, Make and Zapier the Apify app runs it, and binary images can go into `imageUrls` as data URIs. Through Apify's MCP server it works as a tool for AI agents.

# Actor input Schema

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

Links to the images to upscale, one per line: JPEG, PNG, WebP, GIF (first frame), AVIF or TIFF, up to 25 MB each. Google Drive links (files shared with anyone who has the link) and Dropbox links work, and so do data URIs and plain base64, the way n8n, Make and Zapier pass files on. Clear the example and leave this empty to upscale only the images of the dataset below.

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

How much larger each side gets: 4x turns a 500 x 375 photo into 2000 x 1500. A larger result than "Max output size" is enlarged less, to fit it.

## `targetLongEdge` (type: `integer`):

Enlarge every image until its longer side is this many pixels (at most 4x), for example 3840 for 4K. An image already this long is skipped and not charged. Leave empty to use the enlargement above.

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

PNG is lossless and keeps transparency; JPEG is about a quarter of the size; WebP keeps transparency at a fraction of PNG's size.

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

1 to 100. 95 keeps the restored detail; PNG ignores it.

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

The largest result: 16 megapixels is about 4600 x 3500. An image that would come out larger is enlarged less, to this size. Up to 4 megapixels is in the image price, each started megapixel above it is an extra event (see Pricing).

## `skipIfLongEdgeAtLeast` (type: `integer`):

Images at least this long on their longer side are passed over and not charged; their row links the original.

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

The id of a dataset to read image links from, such as the results of a product or real estate scraper. Read after the links above.

## `urlField` (type: `string`):

Where each item keeps its image link, for example imageUrl or images\[0].url. Leave empty to take the first of imageUrl, image, images, photo, thumbnail and url.

## `seed` (type: `integer`):

The same seed gives the same result for the same image. Leave empty for a new one each run.

## `maxItems` (type: `integer`):

Stop after this many images (100 if left empty). Every image in the list counts, including repeated, skipped and failed ones.

## Actor input object example

```json
{
  "imageUrls": [
    "https://api.apify.com/v2/key-value-stores/WqYZXvrnSKNGW0UXT/records/earthrise-330.jpg?signature=9a76K1mXf1yCupL4exOT"
  ],
  "scale": "4",
  "outputFormat": "png",
  "quality": 95,
  "maxOutputMegapixels": 16,
  "maxItems": 100
}
```

# Actor output Schema

## `images` (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://api.apify.com/v2/key-value-stores/WqYZXvrnSKNGW0UXT/records/earthrise-330.jpg?signature=9a76K1mXf1yCupL4exOT"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("ratatoskr/seedvr2-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://api.apify.com/v2/key-value-stores/WqYZXvrnSKNGW0UXT/records/earthrise-330.jpg?signature=9a76K1mXf1yCupL4exOT"],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("ratatoskr/seedvr2-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://api.apify.com/v2/key-value-stores/WqYZXvrnSKNGW0UXT/records/earthrise-330.jpg?signature=9a76K1mXf1yCupL4exOT"
  ],
  "maxItems": 100
}' |
apify call ratatoskr/seedvr2-image-upscaler --silent --output-dataset

```

## MCP server setup

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