Skip to main content
Glama

Upscale / restore an image with Replicate

replicate_upscale_image

Upscales images to higher resolution using models like real-esrgan or gfpgan, with optional face restoration for photos.

Instructions

Upscale an image to higher resolution. Optional face restoration for photos.

DISPLAY REQUIREMENT — after this tool returns successfully, embed the upscaled image inline using one of the three blocks (iframe / / markdown) printed by the tool. Place it BEFORE descriptive prose. URLs expire ~24h.

Args:

  • image (string URL): URL of the source image.

  • model (string, default "real-esrgan"): Curated key (real-esrgan, clarity-upscaler, swinir, gfpgan) or "owner/name".

  • scale (1-10, optional): Upscale factor. Default 4 for real-esrgan; 2 for gfpgan; 2 for clarity-upscaler.

  • extra_input (object, optional): Model-specific extras (e.g. {face_enhance: true} for real-esrgan).

  • download (boolean, default true): Download upscaled file locally.

Returns: PredictionResult with urls + local_paths to the upscaled image.

Examples:

  • image="", scale=4 → real-esrgan

  • image="", model="gfpgan", scale=2 → restoration

  • image="", model="clarity-upscaler", scale=2

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesURL of the image to upscale.
modelNoUpscaler. Curated: real-esrgan, clarity-upscaler, swinir, gfpgan, clarity-pro. Or "owner/name".real-esrgan
scaleNoUpscale factor (1–10). Model-dependent; default 4 for real-esrgan.
downloadNo
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).
extra_inputNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are sparse, but description adds important behaviors: display requirement, URL expiry, download option, timeout handling, and model-specific defaults.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with sections and examples, though slightly verbose. Purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers inputs well but lacks detail on output structure (PredictionResult) and error handling. No output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Description adds meaning beyond schema by explaining default scale values per model, extra_input example, and timeout behavior. Schema coverage is 67%, so description compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool upsamples images with optional face restoration, distinguishing it from sibling tools like replicate_generate_image or replicate_inpaint.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Examples provide use cases but no explicit guidance on when to choose this over other image tools like replicate_inpaint or replicate_remove_background.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sena-labs/replicate-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server