Generate cinema-grade hero images for websites at ~4 cents per image using Google's Gemini 2.5 Flash Image API. Documentary realism style baked in. No Stable Diffusion, no Midjourney subscription, no Photoshop.
Built for the 48+ hero images on netzhandwerker.de and its sub-brands.
Every B2B website needs hero images, and most of them look like the same stock-photo mannequins in front of laptops. AI image generation solves that — but:
- Stable Diffusion is slow on consumer hardware and gives you anime faces if you blink
- Midjourney is great but locked behind Discord and a subscription
- DALL-E 3 is OK but expensive at ~$0.08/image
- Gemini 2.5 Flash Image is fast (5-8s), cheap (~$0.04/image), and gives surprisingly grounded results when you prompt it right
This package wraps the Gemini API with a hero-image-focused prompt template, multi-format output (PNG + WebP + thumbnail variant), and batch processing.
pip install -e .
export GEMINI_API_KEY=...
gemini-hero generate "Mechanic in safety glasses inspects a server motherboard, North German workshop ambiance, documentary photo"Output: output/mechanic-server-motherboard.png + .webp + -400.webp
| File | Size | Use case |
|---|---|---|
name.png |
1568×880 | Lossless source, archive |
name.webp |
1568×880, q85 | Production hero, ~120 KB |
name-400.webp |
400×225, q80 | Mobile srcset, ~25 KB |
Drop into HTML:
<picture>
<source media="(max-width: 600px)" srcset="/img/hero-400.webp">
<source srcset="/img/hero.webp">
<img src="/img/hero.png" alt="Mechanic inspects motherboard" width="1568" height="880">
</picture>The default system prompt nudges Gemini toward:
- German B2B environments (workshops, offices, warehouses, not Silicon Valley garages)
- No studio lighting — natural light, overcast skies, fluorescent shop lighting
- No cinematic blue/orange grade — neutral white balance
- No sci-fi elements — no holograms, no glowing interfaces, no neon
Override with --style cinematic, --style studio, or --style raw for different looks.
prompts.txt:
electrician-cable-routing | Electrician routes power cables through a cable tray in a workshop ceiling, photo
solar-installer-roof | Solar installer mounts a panel on a residential roof, golden hour, photo
network-rack | IT technician patches fiber cables in a rack-mounted patch panel, server room
gemini-hero batch prompts.txt --out img/Generates 3 hero images × 3 variants = 9 files in img/.
At Gemini 2.5 Flash Image rates (May 2026): ~$0.04 / image. A whole website (10-15 hero images) costs less than a coffee.
- Not a free service — you pay Google for API calls
- Not a face generator — Gemini refuses to generate identifiable real people, and that's a feature
- Not deterministic — same prompt gives different results each call
- Not for advertising real products — generated images of products you don't own are a legal grey zone
See examples/ for prompt+output pairs that demonstrate the documentary-realism style.
MIT. Commercial use allowed without attribution.
Built by Daniel Wesseling at Die Netzhandwerker — refined across 200+ hero images for sub-brands like spuerwerk, formwerk, diffus, naturwerk.