Image Upscaler — Real-ESRGAN 2x/4x for Photos and Graphics avatar

Image Upscaler — Real-ESRGAN 2x/4x for Photos and Graphics

Pricing

from $12.56 / 1,000 input megapixel upscaleds

Go to Apify Store
Image Upscaler — Real-ESRGAN 2x/4x for Photos and Graphics

Image Upscaler — Real-ESRGAN 2x/4x for Photos and Graphics

Image Upscaler — Real-ESRGAN Graphics & Photo Modes, 2x/4x: `megapixel-upscaled` previous/checked $0.0157; `photo-quarter-megapixel-restored` previous/checked $0.0144; active Apify record sets fees; usage included; start extra; failed results uncharged.

Pricing

from $12.56 / 1,000 input megapixel upscaleds

Rating

0.0

(0)

Developer

Logan Parker

Logan Parker

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 hours ago

Last modified

Features

Limited permissions

Share

Image upscaler with Real-ESRGAN enlarges supported images 2x or 4x in graphics or photo mode, returning PNG, JPEG or WebP; photo mode uses a larger restoration network and its own input-pixel event. AI agents can call and pay through Apify MCP.

The active Apify pricing record determines your bill; for the previous/checked schedules, megapixel-upscaled previous/checked $0.0157; photo-quarter-megapixel-restored previous/checked $0.0144; usage is included and failed results are free.

Example result

Example record for the minimal input under How to use it, as this Actor's code returned it in a local run on 2026-10-16 (mode and quarterMegapixelsCharged added by the 2026-10-27 release) (the 960 × 720 PNG was 803,103 bytes; outputUrl is shown in its platform form, the store id written as STORE_ID):

{
"url": "https://raw.githubusercontent.com/python-pillow/Pillow/main/Tests/images/flower.jpg",
"ok": true,
"inputWidth": 480,
"inputHeight": 360,
"outputWidth": 960,
"outputHeight": 720,
"mode": "graphics",
"megapixelsCharged": 1,
"quarterMegapixelsCharged": 0,
"key": "upscaled-000-428e5ec346.png",
"outputUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/upscaled-000-428e5ec346.png"
}

How to use it

Start a run in Apify Console, by API or from an agent with an input like this one — it is the input Apify runs every day to test this Actor:

{"urls": ["https://raw.githubusercontent.com/python-pillow/Pillow/main/Tests/images/flower.jpg"], "scale": 2}

Start with the minimal JSON example above, then adjust the fields in the table below. Read the Example result and Output fields sections for the returned record, Errors for failure codes, and Events and prices for result events and the separate platform start.

FieldTypeRequiredDefaultMeaning
urlsarray of stringsyes—Image URLs (PNG, JPEG, WebP, BMP, TIFF, GIF), http or https, 1–20 per run, up to 20 MB each.
modeenum graphics · photonographicsgraphics: the compact network for graphics, screenshots, text, icons and product shots, charged per started input megapixel. photo: the larger network that restores soft, compressed or old photos, charged per started quarter megapixel of input; at scale 4 its 2x result is enlarged again with Lanczos.
scaleinteger, 2 or 4no2Enlargement factor; each side of the image is multiplied by it. 3 is refused as invalid_input.
formatenum png · jpeg · webpnopngOutput format: png lossless with transparency; jpeg quality 92, transparency flattened onto white; webp quality 90 with transparency, at most 16,383 pixels on a side.
maxInputMegapixelsintegerno2Images with more pixels than this (in millions, width × height) are refused as too_large, uncharged, before they are decoded; 1–4.

Every limit above is enforced by the input schema and again in code.

Events and prices

The active Apify pricing record determines your bill; each schedule below is conditional on that exact record being active. A pending record does not authorise its charges. Before submission, while pending, and after activation, use the actual active record, not the requested calendar, to determine the bill.

Observed effective start: 2026-10-28T07:01:55.056Z, confirmed by the pricing record; this stage requests no pricing mutation.

Previous schedule — only if that record is active

apify-actor-start: FREE $0.00005, BRONZE $0.00005, SILVER $0.00005, GOLD $0.00005, PLATINUM $0.00005, DIAMOND $0.00005; megapixel-upscaled: FREE $0.0157, BRONZE $0.0157, SILVER $0.01413, GOLD $0.01256, PLATINUM $0.01256, DIAMOND $0.01256; photo-quarter-megapixel-restored: FREE $0.0144, BRONZE $0.0144, SILVER $0.01296, GOLD $0.01152, PLATINUM $0.01152, DIAMOND $0.01152.

Checked schedule — only if that record is active

EventTitleCharged whenFREE / BRONZESILVERGOLD / PLATINUM / DIAMOND
megapixel-upscaledInput megapixel upscaledOne started megapixel of input image upscaled.$0.0157$0.01413$0.01256
photo-quarter-megapixel-restoredPhoto quarter-megapixel restoredOne started quarter megapixel (250,000 pixels) of input photo restored and enlarged in mode photo.$0.0144$0.01296$0.01152

Platform event in the checked schedule: apify-actor-start: FREE $0.00005, BRONZE $0.00005, SILVER $0.00005, GOLD $0.00005, PLATINUM $0.00005, DIAMOND $0.00005.

The checked start at default memory is (4 events, $0.0002, at the default 4,096 MB).

Worked event subtotal, checked schedule at FREE: if 10 megapixel-upscaled events are charged, 10 × $0.0157 = $0.157 for that event alone. All other charged events and the platform start event add their listed fees; this subtotal is not a run total. The configured maximum-charge floor is $0.05. Platform usage is included; failed results are uncharged.

Call it from an agent

Through Apify's MCP server (https://mcp.apify.com), tool call-actor:

{"actor": "hermeskd/image-upscale", "input": {"urls": ["https://raw.githubusercontent.com/python-pillow/Pillow/main/Tests/images/flower.jpg"], "scale": 2}, "callOptions": {"maxTotalChargeUsd": 0.05, "timeout": 1800}, "waitSecs": 30}

The call returns the run's status and its defaultDatasetId. Read the records with get-dataset-items:

{"datasetId": "<defaultDatasetId from the call>", "limit": 50}

Each record's outputUrl is the enlarged image itself (also readable with get-key-value-store-record and the record's key). As a dedicated tool, add https://mcp.apify.com?tools=hermeskd/image-upscale to your MCP client. In mode graphics, an image under one megapixel finishes inside the 30-second wait at the default memory; a larger one can take longer — call again with waitSecs up to 45, or read the run later. In mode photo, use waitSecs 45 and read the run later if it is still running; its measured times are below. maxTotalChargeUsd caps what the run can charge; when it is reached the remaining URLs come back as charge_limit_reached records and are not charged.

Output fields

One record per input URL, and one image file per successful record in the run's default key-value store.

FieldMeaning
urlThe input URL.
oktrue when the image was enlarged and stored; false with error.
inputWidthInput width in pixels, after EXIF orientation.
inputHeightInput height in pixels, after EXIF orientation.
outputWidthOutput width in pixels: input width × scale.
outputHeightOutput height in pixels: input height × scale.
modegraphics or photo: the network the image went through.
megapixelsChargedStarted input megapixels charged in mode graphics (megapixel-upscaled): width × height / 1,000,000 rounded up, at least 1; 0 in mode photo.
quarterMegapixelsChargedStarted input quarter megapixels charged in mode photo (photo-quarter-megapixel-restored): width × height / 250,000 rounded up, at least 1; 0 in mode graphics.
keyKey of the output image in the run's default key-value store.
outputUrlThe output image's key-value store record URL (API).
error{code, message} when ok is false.

Limits and run time

  • 1–20 URLs per run; files up to 20 MB each; images up to maxInputMegapixels (2 by default, at most 4) — the size is read from the file's header and an image over the cap is refused before its pixels are decoded.

  • Downloads: files download at 2 MB/s or faster — each download has a budget of 30 s plus 1 s per 2 MB of its declared size (or of the 20 MB cap when the server declares none), and stops when no byte arrives for 30 s; at most 2 requests a second go to one host.

  • GitHub release links are refused: github.com's robots.txt says User-agent: * Disallow: /, which covers HermesBot, so a github.com/…/releases/download/… URL comes back robots_disallowed without a request. Give the file's raw.githubusercontent.com address, or put it in your own storage (an Apify key-value store works).

  • Formats read: PNG, JPEG, WebP, BMP, TIFF (first page) and GIF; an animated GIF or WebP is enlarged from its first frame only. EXIF orientation is applied first. Colour goes through the model; an alpha channel is enlarged with Lanczos; a grayscale image comes back grayscale (WebP: RGB). The ICC colour profile is kept; EXIF, XMP and other metadata are not copied.

  • Mode graphics: scale 4 is the model's own output; scale 2 is that output reduced by half with Lanczos (the model's reference method). Images are processed in 512-pixel tiles with 24 pixels of overlap, so memory stays bounded and no seam shows.

  • Mode photo: the network enlarges 2x; scale 4 is that result enlarged 2x again with Lanczos, charged the same. Images are processed in tiles of at most 576 pixels (384 below 4,096 MB), with 64 pixels of context. Photo inference releases its allocations between tiles instead of retaining arenas for each shape. The original 768-pixel-tile measurement differed from a whole-image result by 0.2 levels of 255 on average and by more than one level on under 2% of pixels; smaller tiles do more overlap work.

  • Mode photo, measured (2026-10-27, plans/evidence/upscaler-restoration in this Actor's source): ten scikit-image and Pillow sample photos, each reduced 2x and then left clean, saved as JPEG quality 30, blurred (Gaussian 1.2) or aged (blur, noise and JPEG together), enlarged back and scored against the original by PieAPP (a learned full-reference score, lower is closer; mean of ten) and MUSIQ (a learned no-reference quality score, higher is better):

    Photos reduced 2x, thenPhoto modeGraphics modeBicubic resizing
    blurredPieAPP 0.73 · MUSIQ 68.51.62 · 56.63.84 · 27.0
    aged (blur, noise, JPEG)0.87 · 65.91.34 · 58.93.15 · 32.3
    saved as JPEG quality 300.81 · 66.00.88 · 65.72.30 · 42.8
    left clean0.62 · 67.90.49 · 71.41.01 · 55.9

    At 4x (the same photos reduced 4x, photo mode's 2x result enlarged again with Lanczos):

    Photos reduced 4x, thenPhoto modeGraphics modeBicubic resizing
    blurredPieAPP 1.60 · MUSIQ 52.63.02 · 42.65.23 · 18.5
    aged (blur, noise, JPEG)1.88 · 46.22.48 · 45.94.87 · 19.1
    saved as JPEG quality 301.76 · 47.71.79 · 51.44.03 · 25.3
    left clean1.40 · 50.41.25 · 59.22.89 · 33.0

    Use photo mode for soft, blurry, compressed or old photos. On a clean, sharp photo graphics mode scores as well or better at 2x and better at 4x, so use graphics mode for clean photos at 4x. Like graphics mode it invents plausible detail (texture, small structures) rather than recovering the true one: not for evidence, medical, forensic or measurement use.

  • Mode graphics, what it is for, measured: the model sharpens edges and removes blur, noise and compression artefacts. It invents plausible detail rather than recovering the true one, so against a known original its pixel accuracy (PSNR, higher is closer) is below plain bicubic resizing on photographs and above it on graphics. Measured on 2026-10-16 on one CPU core: each image reduced by the factor with bicubic, then enlarged back by this Actor (PNG) and by bicubic, PSNR against the original with a 4-pixel border left out. Ten photos are the scikit-image and Pillow sample photos (flower, coffee, astronaut, rocket, chelsea, hubble_deep_field and four Pillow test photos: mountains, an aircraft, grass, a cabin in snow); "JPEG inputs" are the same reductions saved as JPEG quality 75 first; the five graphics are Pillow's test-card.png, Pillow's line drawing uncompressed_rgb.png, and generated flat shapes, text and a bar chart.

    Images×4: this Actor − bicubic×4: beats bicubic×2: this Actor − bicubic×2: beats bicubic
    10 photos−1.44 dB on average (−3.53 to +0.16)1 of 10−3.33 dB on average (−6.97 to −0.33)0 of 10
    10 photos, JPEG inputs−1.07 dB (−2.05 to +0.33)1 of 10−2.06 dB (−4.36 to +0.11)2 of 10
    5 graphics and text+1.16 dB (−2.00 to +2.55)4 of 5+1.97 dB (−0.81 to +3.25)4 of 5

    On the test card, the shapes and the chart it is 2.0 to 2.9 dB closer to the original than bicubic at either factor; text gains 3.3 dB at ×2, but text reduced ×4 to about 4 pixels high is past reading and the model makes it worse (−2.0 dB); the thin-line drawing is about even (+0.9 / −0.8 dB). Recommended for graphics, screenshots, text, icons and small product shots. Not for photos where faithfulness to the original pixels matters (evidence, medical, forensic, measurement): use plain resizing there.

  • Typical run time: the model needs about 25 seconds per input megapixel on one CPU core (the default 4,096 MB is one core; 8,192 MB is two and roughly halves it), plus a few seconds for the download, the file and the start: the 480 × 360 example took 6 seconds of work on one core when this release was measured (Apify's cores may be slower). The default run timeout is 1,800 seconds; an image that would not finish in the run's remaining time is answered timeout.

  • Photo mode run time: about 27 seconds for a 0.25-megapixel photo, 52 seconds for 0.5, 127 for 1 and 246 for 2 megapixels on one CPU core in this release's measurements (Apify's cores have been slower). These are the original 768-pixel-tile timings; smaller tiles add overlap work. At 2,048–4,095 MB, photo inputs above 1 megapixel are refused as too_large before decode or inference, with no image charge; use at least 4,096 MB for photos up to the schema’s 4-megapixel maximum. The same cap applies to both scales and all output formats.

  • Memory: in mode graphics 2,048 MB is enough up to 2 megapixels of input; a 4-megapixel input enlarged ×4 to WebP needs up to 1.8 GB, so use 4,096 MB or more for it. The largest output, a 4-megapixel input at ×4, is 64 megapixels.

Errors

Errors are records with ok: false and error.code; none is charged.

error.codeMeaning
download_failedThe URL did not return the file (status, network error, a stall of 30 s, or slower than its download budget).
not_imageNot a supported image (PNG, JPEG, WebP, BMP, TIFF, GIF), an empty body, or a damaged file that cannot be decoded.
too_largeOver maxInputMegapixels or the photo memory cap (1 MP below 4,096 MB), over 20 MB, or an output wider or taller than the format holds (WebP 16,383 pixels, JPEG 65,500).
robots_disallowedrobots.txt forbids fetching the URL.
blocked_hostThe host is on the deny-list, or resolves to a private or local address.
timeoutThe image did not finish within the run's time budget.
internal_errorUnexpected failure; message carries the class.
charge_limit_reachedThe run's maximum total charge cannot pay for this image's megapixels; it was not processed.
mode_unavailableMode photo was asked for on a run whose own pricing lacks photo-quarter-megapixel-restored (for example, an older run started before activation); no image was processed or charged; only Apify’s apify-actor-start event is charged. The current pricing includes the event and photo mode is available.
invalid_inputThe run input passed the input schema but cannot be used (for example scale 3, or no URL at all); the message names the field. One record per input given, or one with url: null when none was given; nothing is processed.

The run fails only when every input failed with an Actor-side code (internal_error, timeout), so a broken Actor is visible. Every other run succeeds — including one where nothing was enlarged because of the caller's own inputs (bad URL, robots, deny-list, not an image, too large, invalid input, the charge limit) or because that run’s pricing lacks the photo event, or where those and Actor-side failures are mixed.

Sources and terms

The source is the caller's image. Process only images you have the right to process; the Actor does not remove watermarks, signatures or provenance labels and does not restore or identify faces. Fetching follows the Hermes fetch policy: robots.txt is obeyed for the user-agent HermesBot (and *), and a disallowed URL is refused without a request; platforms whose terms forbid automated access, and people-search sites, are on a deny-list and refused without a request; private and local addresses are refused, after DNS and on every redirect; the user-agent is HermesBot/1.0 (+https://apify.com/hermeskd); no login, cookies, credentials, CAPTCHA solving, evasion or proxies are used. The enlarged image is returned to the caller in the run's own key-value store.

The models are Real-ESRGAN realesr-general-x4v3 for mode graphics (release v0.2.5.0) and RealESRGAN_x2plus for mode photo (release v0.2.1) of the Real-ESRGAN project, BSD-3-Clause licence, which allows commercial use; both are converted to ONNX when the Actor's image is built and run with onnxruntime (MIT licence); they are never downloaded at run time.

Not affiliated

This Actor is not affiliated with the Real-ESRGAN project or its authors, with the author of the photo upscaler it is compared with, with Microsoft (onnxruntime), with the Pillow project or with scikit-image, whose public sample images the examples use. Real-ESRGAN, onnxruntime and Pillow are used under their open-source licences.

Changelog

  • 1.1 (2026-10-27) — mode photo: RealESRGAN_x2plus restores soft, compressed and old photos while enlarging 2x (4x: its result enlarged again with Lanczos), charged per started quarter megapixel ($0.0144); megapixel-upscaled raised from $0.01 to $0.0157 so a full-megapixel image covers its cost; records carry mode and quarterMegapixelsCharged; new error mode_unavailable for runs without the photo pricing event. The graphics price and photo event took effect on 2026-10-28; photo mode is available.
  • 1.0 (2026-10-26) — store listing rewritten for the people and agents searching for this job: title, description, search-engine title and description, categories, and the README in the order a searcher reads it (what it does, a real result, how to use it, prices, the agent call); megapixel-upscaled price cut from $0.02 to $0.01.
  • 1.0 (2026-10-16) — first release: ×2 and ×4 super-resolution with Real-ESRGAN realesr-general-x4v3 on CPU, PNG, JPEG or WebP out, transparency and grayscale kept, charged per started input megapixel.