Forked from alexewerlof/nano-banana-structured-json-prompt
Created
March 24, 2026 16:29
-
-
Save morisono/4606ed32d0e810d0310c21c4cadc3049 to your computer and use it in GitHub Desktop.
Nano Banana structured JSON prompt Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "title": "Nano Banana (Gemini 3 Pro) Ultimate Image Schema", | |
| "description": "The definitive structured prompting schema for high-fidelity image generation. Includes advanced photography, multi-subject control, and text rendering.", | |
| "type": "object", | |
| "required": ["meta", "subject", "scene"], | |
| "properties": { | |
| "user_intent": { | |
| "type": "string", | |
| "description": "A natural language summary of your goal (e.g., 'Me high-fiving Batman in a neon city'). Useful for logging." | |
| }, | |
| "meta": { | |
| "type": "object", | |
| "description": "Global settings for the image generator.", | |
| "properties": { | |
| "aspect_ratio": { | |
| "type": "string", | |
| "enum": ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "3:2", "2:3", "5:4", "4:5"], | |
| "default": "16:9", | |
| "description": "The dimensions of the output.\n• 16:9: Cinematic/Desktop\n• 9:16: TikTok/Phone Wallpaper\n• 1:1: Instagram Square\n• 21:9: Ultra-widescreen Movie" | |
| }, | |
| "quality": { | |
| "type": "string", | |
| "enum": ["ultra_photorealistic", "standard", "raw", "anime_v6", "3d_render_octane", "oil_painting", "sketch", "pixel_art", "vector_illustration"], | |
| "default": "ultra_photorealistic", | |
| "description": "The rendering engine or 'mode'. Use 'raw' for uncompressed photo style." | |
| }, | |
| "safety_filter": { | |
| "type": "string", | |
| "enum": ["block_none", "block_few", "block_some", "block_most"], | |
| "default": "block_some" | |
| }, | |
| "seed": { | |
| "type": "integer", | |
| "description": "Fixed number (e.g. 42) to reproduce the EXACT same image again." | |
| }, | |
| "steps": { | |
| "type": "integer", | |
| "default": 40, | |
| "minimum": 10, | |
| "maximum": 100, | |
| "description": "Denoising steps. Higher (50+) = more detail but slower. Lower (20) = faster but rougher." | |
| }, | |
| "guidance_scale": { | |
| "type": "number", | |
| "default": 7.5, | |
| "minimum": 1.0, | |
| "maximum": 20.0, | |
| "description": "How strictly the AI follows your prompt.\n• 1-4: Creative/Random\n• 7-10: Balanced (Default)\n• 15+: Strict/Rigid" | |
| } | |
| } | |
| }, | |
| "subject": { | |
| "type": "array", | |
| "description": "List of characters or objects. Add multiple items to create multi-character scenes.", | |
| "items": { | |
| "type": "object", | |
| "required": ["type", "description"], | |
| "properties": { | |
| "id": { | |
| "type": "string", | |
| "description": "Unique label (e.g., 'hero', 'villain') to reference this character internally." | |
| }, | |
| "type": { | |
| "type": "string", | |
| "enum": ["person", "animal", "cyborg", "monster", "statue", "robot", "vehicle", "object"], | |
| "default": "person" | |
| }, | |
| "input_image": { | |
| "type": "object", | |
| "description": "Attach a reference photo SPECIFIC to this character (e.g., your face).", | |
| "properties": { | |
| "path": { | |
| "type": "string", | |
| "description": "Path to local file (./face.jpg) or URL." | |
| }, | |
| "usage_type": { | |
| "type": "string", | |
| "enum": ["face_id", "pose_copy", "clothing_transfer", "depth_map", "full_character_reference", "style_transfer"], | |
| "description": "• face_id: Swaps the face (Identity).\n• pose_copy: Copies the skeleton/stance.\n• clothing_transfer: Steals the outfit.\n• depth_map: Copies the 3D shape." | |
| }, | |
| "strength": { | |
| "type": "number", | |
| "default": 0.85, | |
| "minimum": 0.1, | |
| "maximum": 1.0, | |
| "description": "1.0 = Exact copy. 0.5 = Loose inspiration." | |
| } | |
| } | |
| }, | |
| "description": { | |
| "type": "string", | |
| "description": "Visual traits: 'tall, muscular, scar on left eye, glowing cybernetics'." | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "If famous: 'Abraham Lincoln', 'Pikachu'. Triggers internal knowledge base." | |
| }, | |
| "age": { | |
| "type": "string", | |
| "description": "Approximate age or life stage (e.g., '25 years old', 'elderly', 'toddler', 'middle-aged')." | |
| }, | |
| "gender": { | |
| "type": "string", | |
| "enum": ["male", "female", "non-binary", "androgynous"], | |
| "description": "Gender presentation of the subject." | |
| }, | |
| "hair": { | |
| "type": "object", | |
| "description": "Hair style and color specifications.", | |
| "properties": { | |
| "style": { | |
| "type": "string", | |
| "enum": [ | |
| "bald", "buzz_cut", "crew_cut", "ivy_league", "caesar_cut", "french_crop", | |
| "textured_crop", "fade_low", "fade_mid", "fade_high", "skin_fade", "taper_fade", | |
| "undercut", "disconnected_undercut", "side_part", "hard_part", "comb_over", | |
| "pompadour", "quiff", "slicked_back", "spiky", "faux_hawk", "mohawk", "mullet", | |
| "modern_mullet", "shag_cut", "wolf_cut", "butterfly_cut", "hime_cut", | |
| "pixie_cut", "bixie", "bob_cut", "french_bob", "blunt_bob", "lob_long_bob", | |
| "shoulder_length", "layered_cut", "long_straight", "long_wavy", "long_curly", | |
| "beach_waves", "hollywood_waves", "blowout", "curtain_bangs", "bottleneck_bangs", | |
| "wispy_bangs", "blunt_bangs", "afro", "short_afro", "large_afro", "dreadlocks", | |
| "locs", "faux_locs", "braids", "box_braids", "cornrows", "micro_braids", | |
| "twists", "two_strand_twists", "bantu_knots", "ponytail", "high_ponytail", | |
| "low_ponytail", "pigtails", "bun", "messy_bun", "top_knot", "man_bun", | |
| "space_buns", "half_up_half_down", "wet_look", "windswept" | |
| ], | |
| "description": "The specific cut or arrangement of the hair." | |
| }, | |
| "color": { | |
| "type": "string", | |
| "enum": [ | |
| "jet_black", "soft_black", "dark_brown", "chestnut_brown", "light_brown", | |
| "dark_blonde", "golden_blonde", "platinum_blonde", "strawberry_blonde", | |
| "auburn", "dark_red", "ginger", "copper", | |
| "grey", "silver", "white", "salt_and_pepper", | |
| "pastel_pink", "hot_pink", "neon_green", "electric_blue", "navy_blue", | |
| "royal_purple", "lavender", "teal", "rainbow", "ombre", "highlighted" | |
| ], | |
| "description": "Natural or dyed hair color." | |
| } | |
| } | |
| }, | |
| "position": { | |
| "type": "string", | |
| "enum": ["center", "left", "right", "far_left", "far_right", "background", "foreground", "floating_above", "sitting_on_ground"], | |
| "description": "Where is this specific subject placed?" | |
| }, | |
| "pose": { | |
| "type": "string", | |
| "description": "Action: 'running towards camera', 'sitting cross-legged', 'aiming weapon', 'looking over shoulder'." | |
| }, | |
| "expression": { | |
| "type": "string", | |
| "enum": ["neutral", "smiling", "laughing", "angry", "screaming", "crying", "seductive", "stoic", "surprised", "tired", "suspicious", "pain"], | |
| "default": "neutral" | |
| }, | |
| "clothing": { | |
| "type": "array", | |
| "description": "Garments worn by the subject. Separated from accessories to ensure accurate material rendering.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "item": { | |
| "type": "string", | |
| "description": "e.g., 'bomber jacket', 'pleated skirt', 'tactical vest', 'kimono'." | |
| }, | |
| "color": { | |
| "type": "string", | |
| "description": "e.g., 'neon pink', 'matte black', 'iridescent'." | |
| }, | |
| "fabric": { | |
| "type": "string", | |
| "enum": ["cotton", "wool", "silk", "linen", "denim", "leather", "latex", "velvet", "chiffon", "satin", "nylon", "spandex", "lace", "tweed", "corduroy", "fur", "fleece", "mesh", "cashmere", "flannel", "sequins"], | |
| "description": "The specific textile material." | |
| }, | |
| "pattern": { | |
| "type": "string", | |
| "enum": ["solid", "striped", "plaid", "polka_dot", "floral", "camouflage", "tie_dye", "geometric", "animal_print", "paisley", "checked", "gradient"], | |
| "description": "Visual pattern on the fabric." | |
| }, | |
| "fit": { | |
| "type": "string", | |
| "enum": ["tight", "slim", "regular", "loose", "oversized", "baggy", "fitted", "flowy"] | |
| }, | |
| "layer": { | |
| "type": "string", | |
| "enum": ["underwear", "inner", "middle", "outer", "coat"] | |
| } | |
| } | |
| } | |
| }, | |
| "accessories": { | |
| "type": "array", | |
| "description": "Jewelry, bags, eyewear, and other non-clothing items.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "item": { | |
| "type": "string", | |
| "description": "e.g., 'sunglasses', 'gold chain', 'tactical backpack', 'crown'." | |
| }, | |
| "material": { | |
| "type": "string", | |
| "enum": [ | |
| "gold", "silver", "plastic", "wood", "glass", "metal", "diamond", "pearl", | |
| "leather", "bone", "obsidian", "chrome", "fabric", "canvas", "straw", | |
| "feathers", "paper", "resin", "rubber", "silicone", "ceramic", "crystal", | |
| "stone", "rope", "enamel", "carbon_fiber" | |
| ], | |
| "description": "Material of the accessory." | |
| }, | |
| "color": { | |
| "type": "string", | |
| "description": "e.g. 'rose gold', 'transparent'." | |
| }, | |
| "location": { | |
| "type": "string", | |
| "enum": ["head", "face", "ears", "neck", "wrists", "fingers", "waist", "back", "held_in_hand", "floating_nearby"] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "scene": { | |
| "type": "object", | |
| "description": "Environment and Atmosphere.", | |
| "properties": { | |
| "location": { | |
| "type": "string", | |
| "examples": ["tokyo street", "bedroom", "mars colony", "forest", "white void", "studio", "coffee shop", "cyberpunk alley", "medieval castle"], | |
| "description": "The setting." | |
| }, | |
| "time": { | |
| "type": "string", | |
| "enum": ["golden_hour", "blue_hour", "high_noon", "midnight", "sunrise", "sunset", "twilight", "pitch_black"] | |
| }, | |
| "weather": { | |
| "type": "string", | |
| "enum": ["clear_skies", "overcast", "rainy", "stormy", "snowing", "foggy", "hazy", "sandstorm", "acid_rain"] | |
| }, | |
| "lighting": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "enum": ["natural_sunlight", "studio_softbox", "hard_flash", "neon_lights", "candlelight", "cinematic", "bioluminescent", "firelight", "god_rays", "rembrandt"], | |
| "description": "The source and quality of light." | |
| }, | |
| "direction": { | |
| "type": "string", | |
| "enum": ["front_lit", "back_lit", "side_lit", "top_down", "rim_light", "silhouette", "under_lit"], | |
| "description": "Direction relative to the subject." | |
| } | |
| } | |
| }, | |
| "background_elements": { | |
| "type": "array", | |
| "items": { "type": "string" }, | |
| "description": "Specific items to populate the background (e.g., 'flying cars', 'cherry blossoms')." | |
| } | |
| } | |
| }, | |
| "technical": { | |
| "type": "object", | |
| "description": "Virtual Photography / Camera Settings.", | |
| "properties": { | |
| "camera_model": { | |
| "type": "string", | |
| "enum": ["iPhone 15 Pro", "Sony A7R IV", "Leica M6", "Canon EOS R5", "Hasselblad X2D", "Polaroid Now", "GoPro Hero 12", "CCTV Security Cam"], | |
| "description": "Simulates the sensor and color science of specific cameras." | |
| }, | |
| "lens": { | |
| "type": "string", | |
| "enum": ["16mm", "24mm", "35mm", "50mm", "85mm", "105mm", "200mm", "400mm", "macro_100mm", "fisheye_8mm"], | |
| "description": "Zoom Level.\n• 16mm: Ultra Wide/Action\n• 35-50mm: Natural/Street\n• 85mm: Portrait (Flattering)\n• 200mm: Compressed/Spy" | |
| }, | |
| "aperture": { | |
| "type": "string", | |
| "enum": ["f/1.2", "f/1.4", "f/1.8", "f/2.8", "f/4.0", "f/5.6", "f/8.0", "f/11", "f/16"], | |
| "description": "Depth of Field.\n• f/1.2 - f/1.8: Creamy Bokeh (Blurry Background)\n• f/2.8 - f/4: Standard Portrait\n• f/8 - f/16: Everything sharp (Landscape)" | |
| }, | |
| "shutter_speed": { | |
| "type": "string", | |
| "enum": ["1/8000", "1/4000", "1/1000", "1/500", "1/250", "1/125", "1/60", "1/30", "1/15", "1s", "long_exposure_bulb"], | |
| "description": "Motion Control.\n• 1/8000: Frozen water droplets\n• 1/60: Natural motion blur\n• long_exposure: Light trails" | |
| }, | |
| "iso": { | |
| "type": "string", | |
| "enum": ["100", "200", "400", "800", "1600", "3200", "6400", "12800"], | |
| "description": "Grain/Noise Level.\n• 100: Clean/Sharp\n• 3200+: Gritty/Vintage/Noisy" | |
| }, | |
| "film_stock": { | |
| "type": "string", | |
| "enum": ["Kodak Portra 400", "Kodak Gold 200", "Kodak Ektar 100", "Fujifilm Pro 400H", "Fujifilm Velvia 50", "CineStill 800T", "Ilford HP5 Plus (B&W)", "Kodak Tri-X 400 (B&W)", "Polaroid 600", "Kodachrome 64"], | |
| "description": "Color Grading Preset.\n• Portra: Warm, skin tones\n• CineStill: Halos around lights, cinematic\n• Ilford: Classic Black & White" | |
| } | |
| } | |
| }, | |
| "composition": { | |
| "type": "object", | |
| "description": "Framing and Angle.", | |
| "properties": { | |
| "framing": { | |
| "type": "string", | |
| "enum": ["extreme_close_up", "close_up", "medium_shot", "cowboy_shot", "full_body", "wide_shot", "extreme_wide_shot", "macro_detail"], | |
| "description": "How much of the subject is visible?" | |
| }, | |
| "angle": { | |
| "type": "string", | |
| "enum": ["eye_level", "low_angle", "high_angle", "dutch_angle", "bird_eye_view", "worm_eye_view", "overhead", "pov", "drone_view"], | |
| "description": "Camera height and tilt." | |
| }, | |
| "focus_point": { | |
| "type": "string", | |
| "enum": ["face", "eyes", "hands", "background", "foreground_object", "whole_scene"], | |
| "description": "What is strictly in focus?" | |
| } | |
| } | |
| }, | |
| "text_rendering": { | |
| "type": "object", | |
| "description": "Generate legible text inside the image (Signs, Shirts, Posters).", | |
| "properties": { | |
| "enabled": { "type": "boolean", "default": false }, | |
| "text_content": { | |
| "type": "string", | |
| "description": "The EXACT string to write. Keep it under 5 words for best results." | |
| }, | |
| "placement": { | |
| "type": "string", | |
| "enum": ["floating_in_air", "neon_sign_on_wall", "printed_on_tshirt", "graffiti_on_wall", "smart_phone_screen", "computer_monitor", "book_cover", "movie_poster", "subtitles"], | |
| "description": "Where should the text appear?" | |
| }, | |
| "font_style": { | |
| "type": "string", | |
| "enum": ["bold_sans_serif", "elegant_serif", "handwritten", "cyberpunk_digital", "graffiti_tag", "gothic", "retro_pixel", "neon_tube"], | |
| "description": "The typography style." | |
| }, | |
| "color": { | |
| "type": "string", | |
| "description": "Color of the text (e.g., 'glowing cyan')." | |
| } | |
| } | |
| }, | |
| "style_modifiers": { | |
| "type": "object", | |
| "description": "Artistic styles and aesthetic overrides.", | |
| "properties": { | |
| "medium": { | |
| "type": "string", | |
| "enum": ["photography", "3d_render", "oil_painting", "watercolor", "pencil_sketch", "ink_drawing", "anime", "concept_art", "digital_illustration", "claymation", "papercraft"] | |
| }, | |
| "aesthetic": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": ["cyberpunk", "steampunk", "vaporwave", "synthwave", "noir", "minimalist", "maximalist", "gothic", "baroque", "retro_80s", "vintage_50s", "futuristic", "post_apocalyptic", "ethereal", "dreamcore", "weirdcore"] | |
| } | |
| }, | |
| "artist_reference": { | |
| "type": "array", | |
| "items": { "type": "string" }, | |
| "description": "Names of artists to mimic (e.g., 'Greg Rutkowski', 'Alphonse Mucha'). Use with caution." | |
| } | |
| } | |
| }, | |
| "advanced": { | |
| "type": "object", | |
| "description": "Negative prompts and fine-tuning.", | |
| "properties": { | |
| "negative_prompt": { | |
| "type": "array", | |
| "items": { "type": "string" }, | |
| "default": ["blur", "low quality", "distortion", "watermark", "text", "bad hands", "extra fingers", "mutated", "cropped", "worst quality"], | |
| "description": "Elements to forcefully EXCLUDE." | |
| }, | |
| "magic_prompt_enhancer": { | |
| "type": "boolean", | |
| "default": true, | |
| "description": "If true, the AI expands your prompt with adjectives to make it prettier." | |
| }, | |
| "hdr_mode": { | |
| "type": "boolean", | |
| "default": true, | |
| "description": "High Dynamic Range. Balances shadows and highlights." | |
| } | |
| } | |
| } | |
| } | |
| } |
Author
Author
You are a data extraction specialist. Extract information from the text below and return ONLY a valid JSON object.
Schema (required fields with types):
{
"fieldName1": "string",
"fieldName2": "number",
"fieldName3": "boolean",
"fieldName4": ["array", "of", "strings"]
}
Perfect example output:
{
"fieldName1": "example text",
"fieldName2": 42,
"fieldName3": true,
"fieldName4": ["item1", "item2"]
}
Strict formatting rules:
- Output ONLY the JSON object, no preamble or explanation
- Match field names exactly (case-sensitive)
- Use empty string "" for missing text fields
- Use 0 for missing numeric fields
- Use false for missing boolean fields
- Use empty array [] for missing array fields
- Do NOT add any fields not in the schema
- Do NOT include markdown code fences or backticks
- Do NOT include the word "json" before the output
- Ensure all strings are in double quotes
- Ensure proper comma placement between fields
Validation check: Before returning, verify that all required fields are present and all data types match the schema.
Text to process:
[input text here]
Author
You are a product data extractor. Extract product information and return ONLY valid JSON.
Schema:
{
"productName": "string",
"price": "number",
"category": "string",
"inStock": "boolean",
"features": ["array of strings"]
}
Example output:
{
"productName": "Wireless Bluetooth Speaker",
"price": 79.99,
"category": "Electronics",
"inStock": true,
"features": ["Waterproof", "20-hour battery", "360-degree sound"]
}
Rules:
- price must be a number without $ symbol
- category must be one word title case
- features array must contain 3-5 items
- Use false for inStock if not mentioned
- Output ONLY the JSON, no other text
Validation check: Before returning, confirm all five fields are present with correct data types.
Product description:
[paste description here]
Author
The previous output had this error: [specific error]
Please fix it and return ONLY the corrected JSON object.
Remember: [state the specific rule that was broken]
Author
Refusal rule:
If any required field cannot be determined from the text with high confidence, return this exact error object instead:
{
"error": "insufficient_data",
"message": "Cannot extract required fields from input text",
"missing_fields": ["list", "of", "fields", "that", "are", "missing"]
}
Author
You are an email parser. Extract key information and return valid JSON.
Schema:
{
"senderName": "string",
"senderEmail": "string",
"subject": "string",
"category": "string",
"priority": "string",
"summary": "string"
}
Example:
{
"senderName": "John Smith",
"senderEmail": "john@email.com",
"subject": "Refund request for order #12345",
"category": "Billing",
"priority": "High",
"summary": "Customer requests refund for damaged item in order 12345"
}
Rules:
- category must be one of: Billing, Technical, Shipping, General
- priority must be: Low, Medium, High, Urgent
- summary must be under 100 characters
- Use "General" for category if unclear; "Medium" for priority if unclear
- Output ONLY JSON
Refusal rule:
If email does not contain enough information, return:
{"error": "insufficient_data", "message": "Cannot classify email with confidence"}
Email to process:
[paste email here]
Author
You are a meeting assistant. Extract action items and create a table.
Table format:
| Action | Owner | Due Date | Priority |
|--------|-------|----------|----------|
Rules:
- Due Date format: YYYY-MM-DD
- Priority must be: High, Medium, or Low
- Use "Unassigned" if no owner mentioned
- Use "TBD" if no due date mentioned
- Sort by priority (High first)
- Maximum 10 rows
- No text before or after the table
Meeting transcript:
[paste transcript here]
Author
You are a product data extractor. Return ONLY valid JSON.
Schema:
{
"productName": "string",
"price": "number",
"category": "string",
"inStock": "boolean",
"features": ["array of strings"]
}
Example:
{
"productName": "Wireless Bluetooth Speaker",
"price": 79.99,
"category": "Electronics",
"inStock": true,
"features": ["Waterproof", "20-hour battery", "360-degree sound"]
}
Rules:
- price must be a number without $ symbol
- features array must contain 3-5 items
- Use false for inStock if not mentioned
- Output ONLY the JSON
Product description:
[paste description here]
Author
Author
https://www.apatero.com/blog/wan-2-2-training-fine-tuning-comfyui-complete-guide-2025
loras/
├── characters/
│ ├── sarah_v1.safetensors (initial training)
│ ├── sarah_v2.safetensors (retrained with more data)
│ └── sarah_v3.safetensors (current production version)
├── styles/
│ ├── corporate_professional_v1.safetensors
│ └── corporate_professional_v2.safetensors
└── motion/
└── smooth_pans_v1.safetensors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://genaiunplugged.substack.com/p/structured-outputs-json-prompts-guide