A documentation of our process to generate a personalized Rally Cross event voucher using AI image generation.
Create a printable voucher (DIN A4) for a Rally Cross event as a 16th birthday gift, featuring:
- Manga/Anime style illustrations of father and son (based on reference photos)
- Rally Cross action elements
- Event details: DRX Lauf 2 | 19.04.2025 | Estering, Buxtehude
- ADAC branding
Google's official command-line AI agent.
npm install -g @google/gemini-cliImage generation extension for Gemini CLI using Gemini 3 Pro Image Preview model.
gemini extensions install https://github.com/gemini-cli-extensions/nanobananaexport GEMINI_API_KEY="your_key_here"
export NANOBANANA_MODEL="gemini-3-pro-image-preview"rx/
├── bo.jpeg # Reference photo of son (Bo)
├── marcel.jpeg # Reference photo of father (Marcel)
├── map.jpg # Estering track layout with Joker Lap
├── car.jpg # Rally Cross car reference
├── prompt.txt # Initial prompt (v1)
├── prompt_v2.txt # Improved with face matching
├── prompt_v3.txt # Added ADAC yellow theme
└── prompt_v4.txt # Final: white background with yellow accents
Simple German description of what we wanted. Results had wrong aspect ratio and generic faces.
Adopted the "NanoBanana Protocol" - structured JSON schema separating:
- Subject (figures, objects)
- Environment (background, lighting)
- Technical specs (medium, layout)
- Color palette
Added explicit instructions for face matching:
"gesicht": "Analysiere bo.jpeg: Kopiere Gesichtsform, Augenform, Augenfarbe, Nase, Mund, Haarfarbe, Frisur"Added ADAC branding requirements:
- ADAC-Gelb (#FFCC00) as main color
- ADAC logo placement
- "Für Bo zum 16. Geburtstag" dedication text
Problem: Background became entirely yellow, not print-friendly.
Corrected the color balance:
- White background for print compatibility
- Yellow as accent color only:
- Frame/border
- Title banners
- Decorative elements
- Added
design_hinweisesection for clarity
Based on prompt_guidelines.md - treating the image generator as a renderer, not a creative partner:
{
"meta": { "aspect_ratio": "1:1.414 (DIN A4)", ... },
"inhalt": { "titel": "...", "event": "...", ... },
"subject": {
"figur_1": { "name": "...", "referenz": "...", "gesicht": "...", ... },
"figur_2": { ... },
"streckenlayout": { ... },
"rallycross_auto": { ... }
},
"environment": { "hintergrund": "...", ... },
"technical_specs": { ... },
"color_palette": { ... }
}- Structured prompts > natural language for complex compositions
- Explicit size relationships needed (e.g., "Bo is taller than Marcel")
- Reference images must be explicitly called out with instructions on how to use them
- Color instructions need balance - "yellow theme" ≠ "everything yellow"
- Print requirements must be explicit (white background, high contrast)
- Quality checklist helps verify all requirements are met
cd rx
export NANOBANANA_MODEL="gemini-3-pro-image-preview"
gemini -e nanobanana
# In the session, use /nanobanana with the prompt content
/nanobanana [paste content from prompt_v4.txt]Or use the helper script:
./rx/generate_voucher.shOutput images are saved to ./nanobanana-output/
Use the included script to verify your API key and available models:
./check_gemini_models.sh # List all models
./check_gemini_models.sh gemini-3-pro-image-preview # Test specific model