Skip to main content
nightmareai avatar

Real Esrgan Image Upscaler API

nightmareai/real-esrgan-upscaler

High-quality image upscaler with optional face enhancement

upscale
A4000,RTX4000
0.000676

Model Input

Input

Input image

Min: 0 - Max: 10

Factor to scale image by

Run GFPGAN face enhancement along with upscaling

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Loading
Generated in 1.32 seconds
Logs (2 lines)

Model Example Requests

Examples

Example output 1Example output 2

Real Esrgan Image Upscaler API

Real Esrgan Image Upscaler is a upscaler AI model by nightmareai. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at about $0.000676 per image.

POST https://queue.modelrunner.run/nightmareai/real-esrgan-upscaler

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/nightmareai/real-esrgan-upscaler \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://media.modelrunner.ai/tYBmOm016sV3htCp",
    "scale": 6,
    "face_enhance": false,
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/nightmareai/real-esrgan-upscaler/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/nightmareai/real-esrgan-upscaler/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("nightmareai/real-esrgan-upscaler", {
  input: {
    "image": "https://media.modelrunner.ai/tYBmOm016sV3htCp",
    "scale": 6,
    "face_enhance": false
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/nightmareai/real-esrgan-upscaler",
    headers=headers,
    json={
      "image": "https://media.modelrunner.ai/tYBmOm016sV3htCp",
      "scale": 6,
      "face_enhance": false
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

NameTypeRequiredDescription
imagestring (uri)yesInput image
scalenumbernoFactor to scale image by Default: 4.
face_enhancebooleannoRun GFPGAN face enhancement along with upscaling Default: false.

Machine-readable: OpenAPI schema · llms.txt

Use Real Esrgan Image Upscaler from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Real Esrgan Image Upscaler becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint nightmareai/real-esrgan-upscaler.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run nightmareai/real-esrgan-upscaler on ModelRunner to generate upscaler”. MCP setup guide.

Model Details

Model Details

**RealESRGAN_x4plus_anime_6B** is a specialized super-resolution model built to upscale images and illustrations with exceptional clarity, fidelity, and visual consistency. Based on the **Real-ESRGAN** architecture, it extends the power of generative adversarial networks (GANs) to real-world anime content, restoring fine details such as line work, shading, and color gradients that are often lost in compression or low-resolution sources.

Unlike generic image upscalers, RealESRGAN_x4plus_anime_6B is trained specifically on anime-style data, allowing it to accurately reproduce the distinct aesthetic of hand-drawn and cel-shaded visuals without introducing artifacts or distortions. It handles both simple character portraits and complex scenes with nuanced lighting and color dynamics.

Users can optionally enable **face enhancement** through the **GFPGAN integration**, which intelligently reconstructs facial features—making characters appear sharper, expressive, and true to the original art style. This makes the model particularly effective for upscaling fan art, digital illustrations, screenshots, or animation frames that feature close-up faces.

RealESRGAN_x4plus_anime_6B is optimized for fast inference and seamless integration with both **UI-based workflows** and **API-based applications**, offering a robust solution for artists, editors, and developers who need automated yet high-quality anime upscaling. It preserves the spirit of the original artwork while delivering 4× resolution improvements, making it ideal for digital restoration, animation enhancement, and high-definition content creation pipelines.

Max recommended input image resolution is 1440p