edit-image
Edit existing images with one instruction while keeping identity, pose, angle, and style; restyle Foundry VTT tokens, portraits, props, battlemaps, and overland maps.
Instructions
Edit an existing image with one instruction while keeping identity, pose, angle, and style. Flash for every kind (pro was no better at fixes and re-cropped once). Tokens are prompted light (your instruction as you would type it in the Gemini app, plus a keep-face/hair/angle line and "remove any cast shadow"), put back on a chroma plate keyed to the token's own colours, and cut to alpha on the 512 square in the same call. "give this an updated painterly style" restyles a world token in place; a token from any library or a capture of your own is restyled the same way, its pose and camera kept. Every token and portrait edit is counted by a judge model (heads, eyes, limbs, hands and fingers, tails, tendrils, held objects, and a token's facing) against an optional anatomy line from the book; the result reports anatomy: what it found, each flaw placed in the picture, and for a token the rotation that brings its front to the top. Props (kind "prop") get object-only wording (no figures added) and come back cut at the source file's exact pixel size, ready for the same tile slot. Battlemaps (kind "battlemap") restyle a bought map with the layout locked: the result lands on the source's pixel grid (a whole-number upscale when the source is small), is checked for drift against the source (a drifted render is redone once, then refused), and comes with a checkerboard image of source and result to eyeball. A dressing pass (dressing: true, battlemaps only) adds furniture and props, which the check reads as moved layout, so it renders once and reports drift without retrying or refusing. Overland maps (kind "overland") repaint a regional or world map the same way, painted bare of every name, marker, road, compass rose and scale bar (letter them on afterwards), with a looser drift check that refuses only a grossly moved geography. Returns the new file path, dimensions, and estimated spend.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Purpose preset. icon: 1:1 flash → 512 square. prop: a map prop (furniture, barrel, tree) seen straight down, object only, cut to alpha at its tile size (300 px per grid cell; an edit keeps the source size). token: 1:1 flash, top-down full body on a chroma plate, cut to alpha on a 512 square (1024 for creatureSize: "large"), no shadow (framing, plate, and cut are done for you). portrait: 3:4 at 2K. illustration: 16:9 at 4K → 2560×1600 (16:10 crop). battlemap (edit-image only): restyle a bought map with its layout locked, delivered on the source's pixel grid (a whole-number upscale for a small source), drift-checked. overland (edit-image only): repaint a regional or world map on the same grid, bare of every name and symbol, with a looser drift check. Every kind defaults to flash; tier: "pro" is opt-in and needs confirmPro. | |
| slug | Yes | Kebab-cased into the filename: <kind>-<slug>-<id>.png. | |
| tier | No | Default flash (Nano Banana 2.1, ~3-11¢), never needs a confirm. "pro" (Nano Banana Pro, ~13-24¢, style-reference slots, stronger multi-figure scenes) needs confirmPro. | |
| anatomy | No | Tokens and portraits only: what the creature should have, in one line from the Monster Manual ("two arms, two legs, one large eye, no tail"; "a mushroom with exactly four tendrils and no limbs"). Every token and portrait render is shown to the judge model, which counts heads, eyes, limbs, hands and fingers, tails, tendrils and held objects, flags what differs from this line (with no line, only what is wrong on any creature), and for a token says which edge the head points to (Foundry's front is the top; the report gives the rotation that fixes it); the result reports `anatomy`. Read it, then look anyway: the judge can be wrong, and a flaw is one edit-image call away. | |
| dressing | No | Battlemaps only: this pass adds dressing (furniture, props, debris, foliage) rather than restyling the paint, so the drift check is advisory: one render, delivered under its normal name with `drift` and the checkerboard reported, never redone and never refused (every added piece reads to the check as moved layout). Check the walls by eye on the checkerboard. The result carries `dressing: true`. | |
| thinking | No | How much the model thinks before it draws (Nano Banana 2.1: minimal, medium, high; the default is medium). Thinking is billed at the text rate, from a fraction of a cent to a few cents a render; the result reports thinkingTokens. Try "high" on a prompt that carries many constraints at once (a token with a face and several pieces of gear to match). | |
| confirmPro | No | Required true with tier: "pro". Offer pro to the owner as an option for portraits and illustrations ("pro is available for a bit extra"); never assume it. | |
| references | No | Optional extra references (attached after the source; indexes start at 2). | |
| instruction | Yes | The change, and only the change: "replace the greatsword with a war maul crackling with violet energy". For a flaw-fix pass, name every flaw precisely in one instruction ("the left peryton has four legs; give it two", "remove the second fireball") and end with "keep everything else identical". Everything else is kept by the tool's own wording. | |
| sourceImage | Yes | Absolute path of the image to edit (PNG/JPEG/WebP). | |
| creatureSize | No | Tokens only. medium (default): one grid cell, Tiny through Medium, a 512 square. large: Large, Huge, or Gargantuan, a 1024 square, the native render edge. |