# AI Image Upscaler - 2x & 4x Resolution Enhancement (`ntriqpro/image-upscale-mcp`) Actor

Make blurry photos crystal clear. Upscale images to 2x or 4x resolution without losing quality.

- **URL**: https://apify.com/ntriqpro/image-upscale-mcp.md
- **Developed by:** [daehwan kim](https://apify.com/ntriqpro) (community)
- **Categories:** MCP servers, AI, Developer tools
- **Stats:** 7 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Image Upscale MCP - AI Super Resolution 2x/4x

AI-powered image upscaling with optional face enhancement. Uses Real-ESRGAN (Real Enhanced Super-Resolution GAN) for high-quality 2x or 4x super resolution.

### What It Does

This MCP (Model Context Protocol) actor provides two tools for intelligent image upscaling:

#### Tool 1: `upscale_image`
Upscale any image by 2x or 4x without additional processing.
- **Input**: Image URL + scale factor (2 or 4)
- **Output**: Base64 upscaled image + metadata (original/upscaled dimensions, processing time)
- **Pricing**: $0.08 per image

#### Tool 2: `enhance_face`
Upscale images with face enhancement (better quality for portraits, profile pictures).
- **Input**: Image URL + scale factor (2 or 4)
- **Output**: Base64 upscaled image + metadata
- **Pricing**: $0.10 per image

### How to Use

#### Basic Upscaling (2x)

```json
{
  "image_url": "https://example.com/photo.jpg",
  "scale": 2
}
````

#### 4x Super Resolution (Default)

```json
{
  "image_url": "https://example.com/photo.jpg"
}
```

#### Face Enhancement for Portrait

```json
{
  "tool_name": "enhance_face",
  "image_url": "https://example.com/portrait.jpg",
  "scale": 4
}
```

### API Response Example

```json
{
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
  "original_size": {
    "width": 512,
    "height": 512
  },
  "upscaled_size": {
    "width": 2048,
    "height": 2048
  },
  "scale": 4,
  "model": "realesrgan-x4plus",
  "processing_time": 3500
}
```

### Technical Details

- **AI Model**: Real-ESRGAN (BSD-3-Clause License)
- **Backend Server**: ai.ntriq.co.kr
- **Supported Scales**: 2x, 4x
- **Input Formats**: URL-based (image must be publicly accessible)
- **Output Format**: Base64-encoded PNG/JPG
- **Processing Time**: 2-6 seconds per image (depending on size and scale)
- **Timeout**: 195 seconds (180s processing + 15s buffer)

### Pricing

| Tool | Price | Use Case |
|------|-------|----------|
| `upscale_image` | $0.08 | General upscaling |
| `enhance_face` | $0.10 | Portraits & faces |

Charged per execution. Free tier: Not available (paid actor).

### Error Handling

- **Missing Image URL**: Returns error 400
- **Invalid Scale**: Only 2 and 4 accepted
- **Server Timeout**: Returns error after 195 seconds
- **Network Error**: Returns detailed error message

### Attribution

Powered by **Real-ESRGAN** (BSD-3-Clause License)

- GitHub: https://github.com/xinntao/Real-ESRGAN
- Paper: Real-ESRGAN: Practical Blind Real-World Super-Resolution with Generative Adversarial Networks

### Requirements

- Public image URL (no authentication required)
- Image size: Recommended max 4MB
- Scale factor: 2 or 4

### Status

Production-ready. Pay-per-event charged by Apify.

### Support

For issues or feature requests, contact the development team.

***

### 🔗 Related Actors by ntriqpro

Extend this actor with the ntriqpro intelligence network:

- [**supply-chain-risk-mcp**](https://apify.com/ntriqpro/supply-chain-risk-mcp) — MCP server for supply chain risk
- [**video-intelligence-mcp**](https://apify.com/ntriqpro/video-intelligence-mcp) — MCP server for video intelligence
- [**content-factory-mcp**](https://apify.com/ntriqpro/content-factory-mcp) — MCP server for content-factory

### ⭐ Love it? Leave a Review

Your rating helps professionals discover this actor. [Rate it here](https://apify.com/ntriqpro/image-upscale-mcp/reviews).

# Actor input Schema

## `standbyTimeout` (type: `integer`):

How long (in seconds) the MCP server stays active waiting for tool calls before shutting down. Default is 300 seconds (5 minutes). Increase for long-running sessions.

## `logLevel` (type: `string`):

Controls how much detail appears in the Actor log. Use 'info' for normal operation, 'debug' for troubleshooting, or 'error' for minimal output.

## Actor input object example

```json
{
  "standbyTimeout": 300,
  "logLevel": "info"
}
```

# Actor output Schema

## `results` (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 = {
    "standbyTimeout": 300,
    "logLevel": "info"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ntriqpro/image-upscale-mcp").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 = {
    "standbyTimeout": 300,
    "logLevel": "info",
}

# Run the Actor and wait for it to finish
run = client.actor("ntriqpro/image-upscale-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "standbyTimeout": 300,
  "logLevel": "info"
}' |
apify call ntriqpro/image-upscale-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ntriqpro/image-upscale-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AI Image Upscaler - 2x & 4x Resolution Enhancement",
        "description": "Make blurry photos crystal clear. Upscale images to 2x or 4x resolution without losing quality.",
        "version": "1.0",
        "x-build-id": "yyEvWVspAp75jedZA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ntriqpro~image-upscale-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ntriqpro-image-upscale-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ntriqpro~image-upscale-mcp/runs": {
            "post": {
                "operationId": "runs-sync-ntriqpro-image-upscale-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ntriqpro~image-upscale-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-ntriqpro-image-upscale-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "standbyTimeout": {
                        "title": "Standby Timeout (seconds)",
                        "minimum": 60,
                        "maximum": 3600,
                        "type": "integer",
                        "description": "How long (in seconds) the MCP server stays active waiting for tool calls before shutting down. Default is 300 seconds (5 minutes). Increase for long-running sessions."
                    },
                    "logLevel": {
                        "title": "Log Level",
                        "enum": [
                            "info",
                            "debug",
                            "error"
                        ],
                        "type": "string",
                        "description": "Controls how much detail appears in the Actor log. Use 'info' for normal operation, 'debug' for troubleshooting, or 'error' for minimal output."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
