generate-image
Create Foundry VTT tokens, portraits, props, icons, and battlemaps from text prompts, with anatomy checks and ready-to-use PNG assets saved to disk.
Instructions
Generate one Foundry art asset from a prompt via the Gemini image API. kind picks the model tier, aspect, size, framing text, and post-processing; the result is a finished PNG on disk. READ IT before showing anyone: count limbs per creature, check for duplicated spell effects or props, stray signatures, and reference faces on the wrong figure; obvious flaws are one edit-image call away. Every token and portrait render is also 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. Every kind runs on flash by default; tier: "pro" refuses without confirmPro: true and states the cost. Returns the 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. | |
| prompt | Yes | What a camera would see, in illustrator terms. Do not add framing or background text for icons and tokens; the preset appends it. | |
| 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. | |
| 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). | |
| footprint | No | Props only: grid cells wide x tall, e.g. "2x1" for a table (default "1x1"). The prop is rendered at the nearest API aspect and delivered at 300 px per cell (600x300 here). Library files carry it in their name: "TC_Anvil 02_2x1.png". | |
| 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 | Reference images, attached in this order. Bind each in the prompt by its label or 1-based index ("Image 2 is the captain"). | |
| 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. |