PROP_SCHEMA =
JSON.parse("{\n \"type\":\"object\",\n \"required\":[\"prompt\"],\n \"description\":\"
Rough flat-colour template, then
AI paints the subject on a solid background, then that background is keyed out, giving a transparent
PNG prop.
The template is a
ROUGH size/placement guide, not a cutter; the prop is cut from the render.
Name the chosen background colour in your prompt (e.g. 'on a solid flat magenta background').\",\n \"properties\":{\n \"prompt\":{\"type\":\"string\",\"description\":\"
What to draw.
Include the background colour and 'game prop / centred / nothing else'.\"},\n \"input_path\":{\"type\":\"string\",\"description\":\"rough template image path (or template_base64).
Optional but strongly recommended for size/placement.\"},\n \"template_base64\":{\"type\":\"string\",\"description\":\"template
PNG as base64 (alternative to input_path)\"},\n \"background\":{\"type\":\"array\",\"items\":{\"type\":\"integer\"},\"description\":\"[r,g,b] background to render on and key out.
Default [0,0,0] (black) suits
BRIGHT subjects.
Use a chroma colour far from the subject for
DARK subjects: magenta [255,0,255] or green [0,255,0].
Whatever you pick, say it in the prompt.\"},\n \"key_low\":{\"type\":\"integer\",\"description\":\"per-channel distance-from-bg (0-255) below which a pixel is fully transparent.
Default 4.\"},\n \"key_high\":{\"type\":\"integer\",\"description\":\"distance above which a pixel is fully opaque; smooth ramp between.
Default 28.
RAISE it (100-160) for
SEE-
THROUGH subjects (rigging, foliage, fences) so background peeking through the gaps keys out; lower keeps faint thin detail.\"},\n \"edge_blur\":{\"type\":\"integer\",\"description\":\"px of box blur on the alpha edge only.
Default 0; 1 softens a hard cut.\"},\n \"despill\":{\"type\":\"boolean\",\"description\":\"colour-unmatte edge pixels (recover true foreground
F=(
C-(1-a)
B)/a) to strip bg tint / chroma fringe from anti-aliased edges.
Default true; leave on unless you want raw edge colours.\"},\n \"defringe\":{\"type\":\"boolean\",\"description\":\"final pass to subtract residual bg-chroma cast (magenta/green halo) left on very thin detail.
Self-limiting (greys the tint, spares warm/neutral subject colour).
Default true.\"},\n \"defringe_band\":{\"type\":\"integer\",\"description\":\"restrict defringe to within
N px of transparent (the edge shell).
Default 0 = whole image (fine, the pass is self-limiting).
Set 1-3 only when the
SUBJECT legitimately contains the key hue, to spare its interior.\"},\n \"model\":{\"type\":\"string\",\"description\":\"
Runware model id.
Default google:4@3 (
Nano Banana 2).
Do NOT use google:4@1 (deprecated/weak).\"},\n \"width\":{\"type\":\"integer\",\"description\":\"output px, default 1024\"},\n \"height\":{\"type\":\"integer\",\"description\":\"output px, default 1024\"},\n \"output_path\":{\"type\":\"string\",\"description\":\"write the transparent
PNG here; omit to get image_base64 back\"}\n }\n }")