Upscale / restore an image with Replicate
replicate_upscale_imageUpscales 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
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | URL of the image to upscale. | |
| model | No | Upscaler. Curated: real-esrgan, clarity-upscaler, swinir, gfpgan, clarity-pro. Or "owner/name". | real-esrgan |
| scale | No | Upscale factor (1–10). Model-dependent; default 4 for real-esrgan. | |
| download | No | ||
| timeout_ms | No | Max ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min). | |
| extra_input | No |