---
name: upscale-batch
description: Batch-upscale, restore or enhance many images (or videos) with Kenerate upscale_image / upscale_video, picking the right model per job (phota-enhance for old photos, image-upscaler 4K/8K, kenerate-upscale exact megapixels, clarity, recraft-creative), with a cost estimate up front, then downloads the results and makes before/after comparison sheets with 100% crops and a report. Use when the user wants to upscale, enhance, sharpen, restore or increase the resolution of many photos or clips, or prepare images for print.
compatibility: Needs the Kenerate MCP server and Python 3.9+ with Pillow and ffmpeg for the comparisons.
metadata:
  author: kenerate
  version: "1.0"
  kenerate-tools: "upload_media upscale_image upscale_video estimate_cost wait_for_generation tool_guide"
---

# Upscale batch

Rules: [references/KENERATE.md](references/KENERATE.md) (models and voices: [references/MODELS.md](references/MODELS.md), or the free `pick_model` / `pick_voice` tools).

## Ask the user
The files (Kenerate urls, or public links → `upload_media`), what they're for (web, 4K screen, print size), and
whether they're old or damaged photos.

## 1. Pick models (check `tool_guide("upscale_image")` for current options)
| Job | Call |
|---|---|
| Old, blurry, damaged photos | `upscale_image(model="phota-enhance")`, then optionally image-upscaler |
| Clean 4K / 8K | `upscale_image(model="image-upscaler", resolution="4k")` (`ultimate` for the highest quality) |
| Exact print size | `upscale_image(model="kenerate-upscale", megapixels=<preset>)` |
| Portraits for print | `upscale_image(model="clarity", creativity=0)` (lower = more faithful) |
| Skin / fabric texture | `upscale_image(model="recraft-creative")` |
| Fast / cheap | `upscale_image()` (default real-esrgan, 2048 px) |
| Video | `upscale_video(video_url, resolution="1080p")`: 720p 6, 1080p 9, 2k 15, 4k 24 credits per second |

## 2. Price and run
`estimate_cost("upscale_image", {...})` for one file, multiply by the count (for video, estimate each file). Show the
total and confirm. Start every job, then `wait_for_generation("image-upscale" | "video-upscale", id)` for each one.

## 3. Download and compare (local)
```
python <skill-dir>/scripts/compare.py --pair "<original url>::<upscaled url>" --pair "..." \
  --name <project> --out-dir kenerate-out/upscale-batch
python <skill-dir>/scripts/compare.py --manifest pairs.json   # [{"before": "...", "after": "...", "label": "hero"}]
```
Each pair gets a side-by-side, a 100% centre crop against plain bicubic, the scale factor and a sharpness ratio. The
upscaled files are saved in the output folder. `--download-only` skips the comparisons.

## If something fails
A failed job is refunded. `ok: false` in the report means the output isn't bigger than the input (wrong model or the
input was already large). Retry on approval with another model.
