/gemini-media:gemini-upscalefrom Gemini Media
Upscales photos to 1K-8K+ using the gemini-media MCP server with tiled re-rendering and defect correction. Best for print, wallpapers, or large screens.
Ships in Gemini Media. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill takes an image to a target long edge, from 1K up to 8K or beyond:
tile_image plans a single tile, re-rendered at 1K, 2K or 4K. stitch_tiles still checks the framing, matches color and returns the exact target size.That first pass already fills every output pixel with model-rendered detail. A second pass re-renders a few regions, and only to fix visible defects.
What it is and isn't. This is generative enhancement. The model draws plausible pores, hair strands, fabric weave and foliage that were never in the file. Expect a sharper, more detailed image that is not a faithful record:
Say this plainly to the user. Refuse or warn for evidence, forensics, archival restoration, documents and product labels.
Choices. If the user has not said, ask once: "What size: 1K, 2K, 4K or 8K (long edge)?" A print or wallpaper usually wants 8K, a web or social image 2K. Default to nb2 (Nano Banana 2.1). pro costs about twice as much per tile.
Plan pass 1. Call gemini-media:tile_image with image (the photo) and longEdge (1024, 2048, 4096 or 8192; any value 1024-16384 works while the output stays within 70 megapixels, so the largest is about 8,360 px for a square image, 9,660 for 4:3, 10,240 for 3:2, and 16,384 only for panoramas about 4:1 or wider). Leave grid and imageSize out: the tool picks the cheapest plan that covers the target and explains it in planNote. The result lists the tiles, a reference image (first pass only), the job, and the cost of editing every tile.
Budget. Estimate the whole run before spending anything:
tile_image reports;Tell the user the total and get approval (see Cost and approvals).
Edit every tile with gemini-media:edit_image, issuing the calls in parallel if your client can:
image: the tile's crop.uri;referenceImages: [reference.uri] on the first pass only;aspectRatio: the tile's aspectRatio;imageSize: the plan's imageSize (1K, 2K or 4K);model: the plan's model;prompt: the tile prompt below (the refinement prompt on later passes).Stitch. Call gemini-media:stitch_tiles with the job and tiles: [{tile, image: <edit result uri>}, ...]. Read the report:
Fix pass (only for visible defects). Run it if the preview or the details show something wrong, such as two different iris colors or garbled hands, teeth or text. Call tile_image with image set to the stitched file.uri and 1-4 regions around the defects (Choosing regions below). Edit each crop on its own, without referenceImages, using the refinement prompt, then stitch again. The server carries the original and the output size over from pass 1. At 8K this pass replaces content but adds no resolution, and tile_image says so.
More passes add resolution only when pass 1 did not fill the output, that is when you see the warning "interpolated beyond about N px" (for example a panorama at longEdge 16384, or tiles below 4K). Then use 4-8 tight regions.
Deliver (Delivering below).
The tools live on the gemini-media MCP server. Harnesses name MCP tools differently (mcp__gemini-media__tile_image, gemini-media.tile_image, or plain tile_image); match on the part after the server name.
| Tool | Role | Cost |
|---|---|---|
gemini-media:tile_image | Cuts a grid (pass 1) or regions (later passes) into crops shaped to the model's supported ratios. Saves the crops, a job file and, on the first pass, a reference copy of the original (at most 2048 px). Warns when a region is too large to gain detail. | Free, local |
gemini-media:edit_image | Re-renders one crop at 4K. | ~$0.12 per tile on nb2, ~$0.25 on pro |
gemini-media:stitch_tiles | Aligns each tile with the image, corrects scale and shift, matches broad color, blends overlaps and saves a PNG. Reports placed and rejected tiles and returns previews. | Free, local, 10-30 s at 8K |
gemini-media:get_usage | Spend so far, budget left. | Free |
Tiles that are rejected or left out keep the underlying pixels: the interpolated original in pass 1, the previous pass's result later. Nothing turns black or blank.
The server sends image first and the references second. So image 1 is the crop to re-render and image 2 is the full original. Use this text and append only the clauses that match what the crop shows:
Image 1 is a crop of the photo in image 2. Re-render image 1 as a sharp, high-resolution
photograph of exactly the same crop: same framing, edges, composition and geometry; nothing
added, removed, moved, re-centered or zoomed. Image 2 is the authority for identity, anatomy,
color and lighting. Reconstruct plausible photographic detail at this resolution while keeping
expression, pose, contours, clothing, genuine imperfections and the original focus falloff
(out-of-focus areas stay soft). Clean up compression artifacts and noise. Avoid invented
objects, marks or text, beautification, relighting, halos, ringing, over-sharpening,
embossed, crosshatched or repeating texture and synthetic grain.
Clauses, each added only when that material is visible in the crop:
The same prompt goes to every tile in a pass, except for the material clauses. Keep the wording identical across tiles so neighbors render alike. More guidance and a worked example: references/tiling-guide.md.
On refinement passes, send the crop alone. The crop already carries the identity, colors and light from pass 1. In live tests, sending a whole-photo reference next to a close-up made the model redraw the whole photo in 4 of 5 tiles, and stitch_tiles rejected them all. Use this text plus the same clauses, with "image 2" replaced by a description: for example "Both eyes have the same dark brown iris color", or "Keep exactly the letters shown".
Re-render this photo crop as a sharp, high-resolution photograph of exactly the same crop:
same framing, edges, composition and geometry; nothing added, removed, moved, re-centered or
zoomed. Keep the person's identity, anatomy, expression, color and lighting exactly.
Reconstruct plausible photographic detail at this resolution while keeping genuine
imperfections and the original focus falloff. Avoid invented objects or marks,
beautification, relighting, halos, ringing, over-sharpening, embossed, crosshatched or
repeating texture and synthetic grain.
Look at the stitched preview, then pass regions as fractions of the image (x, y, width, height from the top-left, 0-1) with a short label:
tile_image warns about such regions. A fix region can be larger when the defect needs it, for example both eyes.tile_image adds 20% context around each region and grows it to a supported aspect ratio. Draw regions tight around the feature.| Field | Meaning | Do |
|---|---|---|
placed, match 0.8-1 | Tile aligned. shift/scale show the correction applied. | Nothing. |
placed with a note "part of the tile differs" | One area of the tile changed structure, for example a moved hand or an invented object. | Look at that tile in a detail crop; retry it if the change is visible. |
rejected | Different framing or shape, or content that does not match the photo. The area keeps the prior pixels. | Retry at most twice, with the same inputs and this sentence first: "Keep exactly the field of view of image 1: its edges must cut through at the same places. Do not zoom out and do not reveal anything outside image 1." (In testing this fixed a tile the model had zoomed out.) If it keeps failing, deliver without it and say so. |
unedited | You did not pass that tile. | Intended only when the area needs no detail. |
| Warning "interpolated beyond about N px" | The tiles carry less detail than the output size. | Tell the user, or rerun with grid: 4 or a smaller longEdge. |
After retrying, call stitch_tiles again with every tile, the retried ones included. Each call rebuilds the image from scratch.
Inspect the whole-image preview and the 100% crops (grid corners in pass 1, region centers later). Look for:
Use details to ask for 100% crops anywhere else. At most 2 targeted retries per defect.
tile_image returns the cost of editing every tile once. Regions in a fix pass cost the same per tile. Example on nb2 at 4K, about $0.12 per tile:
| Target | Typical plan | Pass 1 |
|---|---|---|
| 1K | 1 tile at 1K | about $0.04 |
| 2K | 1 tile at 2K | about $0.05 |
| 4K | 1 tile at 4K | about $0.12 |
| 8K | 2x2 or 3x3 tiles at 4K | about $0.50-1.12 |
Allow one or two retries, plus about $0.12 per region if a fix pass is needed. pro is about twice that.
Tell the user the total before the first edit. One approval covers the run. If an edit_image call still fails with [confirmation], retry it with approvedCostUsd set to that call's quoted amount; the run approval covers it. Never set approvedCostUsd without the user's approval of the run.
[budget] means a cap was hit mid-run. Stop and report how many tiles are done. The job file and finished edits stay on disk: once the budget allows, edit the remaining tiles and stitch with all of them.
Do not "test" on a few tiles and then redo them all. Tiles are independent, so every finished tile counts.
Tool errors read [kind] message followed by Hint: .... Follow the hint.
| Kind | Do |
|---|---|
invalid from tile_image | Fix the argument: grid 1-4, padding 0.05-0.5, regions inside the image, longEdge 1024-16384 and at most 70 MP. A transparent image must be flattened onto a background first, and a file much larger than its pixels need (heavy metadata) re-saved without it. |
invalid from stitch_tiles | Use the job uri from tile_image and tile numbers from its list. If the tiled image changed, run tile_image again. |
safety on a tile | Usually a close crop of a person. Retry once with a neutral prompt (drop adjectives about the body); if it repeats, leave that tile out and say so. |
quota, unavailable | Send fewer edits in parallel and retry once. tile_image and stitch_tiles run one at a time per server: if they report the server busy, call them one after another. |
timeout | The edit may still be billed. Retry once at most. |
auth, permission, budget | Stop and tell the user (gemini-media-mcp doctor for credentials). |
Never loop on an error that costs money.
Report:
uri;nativeLongEdge) versus interpolation;gemini-media:get_usage or the sum of the edits);Call the added detail "reconstructed" or "AI-generated", never "recovered". Each tile Google returns carries its SynthID watermark.
get_usage shows the budget covers the estimate. Never set approvedCostUsd yourself. Retry at most twice per tile. Finish with the delivery report, including rejected tiles.pro) rather than relying on the upscale to invent legible lettering.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/gemini-imageGenerates and edits images with Google's Nano Banana models through the gemini-media MCP server - text-to-image, photo edits and retouching, multi-reference composition, product shots, posters, logos and infographics with legible text, stickers and icons, variations, and search-grounded visuals of current events or real places. Use when the user wants to create, draw, design, mock up, restyle, relight, extend or combine pictures, or needs keyframes for a video, even if they never mention Gemini. Not for charts plotted from data, SVG or code-drawn graphics, upscaling past 4K (gemini-upscale), video clips (gemini-video) or audio./gemini-media-productionPlans and produces multi-asset media projects with the gemini-media MCP server by chaining Nano Banana images, Veo or Gemini Omni video, Gemini TTS voiceover and Lyria music into one deliverable - product promos, social ads, short story or explainer videos, trailers, podcast intros. Covers shot lists, consistent characters across shots, an up-front budget with cost estimates and approval, parallel video jobs, and assembly with ffmpeg. Use when a request needs two or more media types or several shots combined, even if the user just says "make a promo video". For a single image, clip, voiceover or track, use gemini-image, gemini-video, gemini-speech or gemini-music instead.npx claudepluginhub mordor-forge/gemini-media-mcp --plugin gemini-mediaOther plugins' skills for the same job