Solanasis Image Generation SOP
Version 2.0 — March 2026 Style: Hand-Drawn Pencil Sketch Model: Nano Banana (Free Tier)
1. Overview
All AI-generated images for Solanasis blog posts, LinkedIn content, and marketing materials use a consistent hand-drawn pencil sketch style generated through Google’s Nano Banana model (Gemini 2.5 Flash Image). This creates a distinctive, recognizable visual identity that aligns with our brand personality: Grounded. Sharp. Human.
The sketch style was chosen because it:
- Feels authentic and approachable (not corporate stock photography)
- Stands out in LinkedIn/blog feeds dominated by glossy AI images
- Reinforces our “warm but professional” brand tone
- Is cost-effective (100% free tier)
- Avoids the uncanny valley of photorealistic AI images
2. Model & Platform Details
2.1 What We Use
| Detail | Value |
|---|---|
| Platform | Google AI Studio (aistudio.google.com) |
| Model | Nano Banana (gemini-2.5-flash-image) |
| Tier | Free — always use this unless Dmitri approves otherwise |
| Cost | $0 (free tier) |
| Daily Quota | Very limited; exhausts after a few generations per day per GCP project. NOT 500/day as Google docs imply (see §2.4 below) |
| API Key Env Vars | GOOGLE_AI_STUDIO_API_KEY, _2, _3 (3 keys from separate Google accounts) |
| API Key Location | solanasis-docs/.env and solanasis-scripts/.env |
| Key Rotation | google_ai_key_rotator.py auto-cycles keys on 429 errors; ~3-6 images/day total |
| Python SDK | google-genai (NOT google-generativeai, which is deprecated) |
| Watermark | All images include invisible SynthID watermark (standard for all Gemini-generated images) |
2.2 Models to AVOID (Paid Only)
| Model | Why Not |
|---|---|
Nano Banana 2 (gemini-3.1-flash-image-preview) | Marked “Paid” — requires billing |
Nano Banana Pro (gemini-3-pro-image-preview) | Marked “Paid” — requires billing |
| Imagen 4 | Paid only; returns 400 INVALID_ARGUMENT on free tier |
| gemini-2.0-flash / gemini-2.5-flash | Text-only models; return 400: Model does not support the requested response modalities: text,image |
Important: All image generation models share the same per-project daily quota pool. If gemini-2.5-flash-image is exhausted, switching to gemini-3.1-flash-image-preview will NOT give you more quota.
2.3 Access Methods (Ranked by Preference)
-
Python Script — Comprehensive (preferred for all image generation)
- Script:
solanasis-scripts/generate_all_sketch_images.py - Pre-configured prompts for all blog + homepage images with v2 style
- Supports
--tier A/B/all,--single <name>,--dry-run,--force --print-promptsoutputs copy-paste prompts for web UI use--process-raw <png> <name>post-processes web UI downloads- Auto-retry with backoff, auto-resize to 1200x800, saves JPG (q85) + WebP (q80)
- Run:
python generate_all_sketch_images.py --tier A
- Script:
-
Python Script — Interactive (for one-off or custom images)
- Script:
solanasis-scripts/generate_image_nano_banana.py - Supports raw prompt, blog mode, and service-area shortcuts
- Uses streaming API (
generate_content_stream) - Run:
python generate_image_nano_banana.py --blog "Your subject here"
- Script:
-
Google AI Studio Web UI (manual fallback)
- URL:
https://aistudio.google.com - Navigate: Image Generation > Nano Banana (the one WITHOUT “Paid” tag)
- Generation time: ~8 seconds per image
- Chrome extension limitation: Angular CDK textarea in AI Studio is unreliable with browser automation tools (type actions may not register after first use). Best used manually by Dmitri when API quota is exhausted.
- URL:
-
Direct API / curl (for integrations)
- Endpoint:
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent
- Endpoint:
2.4 Free Tier Quota Reality (Learned 2026-03-16, updated 2026-03-21)
Google’s documentation suggests 500 images/day, but real-world experience shows the free tier exhausts much faster per key:
- After ~1-2 successful generations, the API returns
429 RESOURCE_EXHAUSTEDwithlimit: 0 - The error references
GenerateRequestsPerDayPerProjectPerModel-FreeTier - The quota is per-GCP-project, per-day, shared across ALL image generation models
- Web UI usage without an API key selected may have a separate, higher quota pool (tooltip: “Usage in AI Studio UI is free of charge when no API key is selected”)
- Quota resets approximately at midnight PT (or ~24h after last generation)
Multi-Key Strategy (as of 2026-03-21):
- We maintain 3 API keys from separate Google accounts (
GOOGLE_AI_STUDIO_API_KEY,_2,_3) - Each key has its own independent daily quota (~1-2 images/day each)
- All generation scripts use
google_ai_key_rotator.pywhich auto-rotates to the next key on 429 errors - Effective daily capacity: ~3-6 images/day via API
- If all 3 keys exhaust, use the web UI manually (separate quota) or wait for reset
- To add more capacity: create another Google account, generate an API key, add as
GOOGLE_AI_STUDIO_API_KEY_4in.env
3. Our Image Style — “Clean Comic Book Sketch” (v2)
Style Guide: Full style reference, do’s/don’ts, and quality checklist in
Image_Style_Guide_v2.md
3.1 Style Definition
Our signature style is a clean pencil sketch with a comic book / graphic novel aesthetic. Think: a skilled professional illustrator’s portfolio work on clean white paper. It communicates expertise and polish without the coldness of corporate stock photography or the grunge of sketchbook aesthetics.
3.2 Core Style Prompt (Copy-Paste Ready)
Clean pencil sketch illustration on a pure white background.
Professional illustrator quality with well-defined line work,
clean consistent strokes, and subtle crosshatching for shading.
Comic book / graphic novel aesthetic: clear compositions,
bold outlines, clean negative space.
3.3 Style Keywords to Always Include
| Keyword Category | What to Include | Why |
|---|---|---|
| Background | ”pure white background” | Clean, professional look; no paper texture |
| Technique | ”well-defined line work”, “clean consistent strokes”, “subtle crosshatching” | Professional illustrator quality |
| Aesthetic | ”comic book / graphic novel aesthetic”, “bold outlines” | Distinctive visual identity |
| Composition | ”clear compositions”, “clean negative space” | Polished, not cluttered |
3.4 Negative Prompts (Always Include These)
These prevent the model from generating off-brand elements:
No paper texture, no grunge, no smudges, no photographic elements.
No logos, no brand names, no readable text, no UI elements,
no futuristic neon, no hoodies, no masks, no 'hacker' tropes,
no cartoon style, no glossy CGI, no photorealistic rendering.
3.5 Style History
- v1 (2026-03-05 to 2026-03-19): “Documentary Sketch” — paper texture, film grain, muted tones. Deprecated: produced inconsistent results, some looked grimy.
- v2 (2026-03-20 onward): “Clean Comic Book Sketch” — pure white background, comic book aesthetic, bold outlines. Current standard.
3.5 Brand Color Alignment
While pencil sketches are inherently muted/grayscale, they align perfectly with our palette:
- The sketch’s natural gray tones complement our Parchment (
#FEF9F1) backgrounds - Line work darkness maps to our Ink Navy (
#020532) and Charcoal (#111827) - If adding subtle color washes, use tones inspired by Copper (
#C47A3D) and Warm Stone (#F0EBE4)
4. Blog Image Prompt Templates
4.1 Template Structure
Every prompt follows this formula:
[STYLE BLOCK] + [SUBJECT DESCRIPTION] + [SCENE DETAILS] + [NEGATIVE PROMPTS]
4.2 Ready-to-Use Blog Templates by Service Area
Security Assessment
Generate an image in a hand-drawn pencil sketch style with crosshatching and fine line work: [SUBJECT]. Documentary feel, natural window light, muted tones, slight paper texture. No logos, no brand names, no readable text, no UI elements, no futuristic neon, no hoodies, no masks, no 'hacker' tropes.
Subject examples:
- “A professional consultant reviewing security documents at a clean desk with a laptop showing a shield icon on screen”
- “Two business professionals in a conference room discussing security findings displayed on a whiteboard”
- “A small office with an IT professional running a security scan on a workstation, papers and coffee on the desk”
Disaster Recovery (DR) Verification
Subject examples:
- “A team testing backup systems in a server room, one person at a terminal and another checking physical equipment”
- “A business continuity planning session with three people around a table reviewing printed recovery procedures”
- “A professional backing up data with external drives and cloud sync icons suggested on a monitor”
Data Migrations
Subject examples:
- “A professional carefully transferring files between two computer systems, depicted as organized data flow”
- “A consultant helping a small business owner transition to a new system, both looking at a laptop together”
- “A well-organized workspace showing the before and after of a data migration — messy desk transforming to clean desk”
CRM Setup
Subject examples:
- “A sales professional reviewing a customer relationship dashboard on a clean modern monitor”
- “A consultant walking a small business team through a new contact management system on a large screen”
- “A professional organizing customer cards and contact information into a structured digital system”
Systems Integration
Subject examples:
- “A technical consultant connecting multiple software systems depicted as puzzle pieces fitting together”
- “A professional mapping out workflow diagrams on a whiteboard with sticky notes and connecting arrows”
- “Two professionals reviewing an integration diagram showing connected business systems”
Responsible AI Implementation
Subject examples:
- “A thoughtful business leader reviewing AI governance documents at a desk with a balance scale nearby”
- “A team workshop discussing ethical AI guidelines, shown with a facilitator at a whiteboard”
- “A professional setting up guardrails depicted as a carefully organized control panel”
4.3 General Blog / Thought Leadership
Subject examples:
- “A confident entrepreneur reviewing growth metrics on a laptop in a coworking space with natural light”
- “A small business team collaborating around a table, sticky notes on the wall behind them”
- “A consultant shaking hands with a small business owner in a warm, well-lit office”
5. Step-by-Step: Generating Images in Cowork
Method A: Via Python Script (Preferred)
# One-time setup
pip install google-genai Pillow
# API key is auto-loaded from solanasis-scripts/.env or solanasis-docs/.env
# Option 1: Batch retry script (for pre-configured blog images)
cd solanasis-scripts
python generate_remaining_blog_images.py
# Option 2: Interactive script with Solanasis style wrapper
python generate_image_nano_banana.py --blog "A small business owner reviewing cybersecurity documents"SDK details (google-genai, NOT google-generativeai):
from google import genai
from google.genai import types
client = genai.Client(api_key=os.environ["GOOGLE_AI_STUDIO_API_KEY"])
response = client.models.generate_content(
model="gemini-2.5-flash-image",
contents="Your prompt here",
config=types.GenerateContentConfig(
response_modalities=["IMAGE", "TEXT"],
image_config=types.ImageConfig(
aspect_ratio="3:2", # Options: "1:1", "3:4", "4:3", "9:16", "16:9", "3:2"
),
),
)
# Extract image bytes from response
for part in response.candidates[0].content.parts:
if part.inline_data and part.inline_data.data:
Path("output.png").write_bytes(part.inline_data.data)
# Or use: part.as_image() to get a PIL Image directlyMethod B: Via Google AI Studio Web UI (Manual Fallback)
Use this when you want to iterate on prompts visually or when the API is not available:
- Go to
https://aistudio.google.com - Click Image Generation > Nano Banana (NOT the Paid ones)
- Enter the prompt from Section 4
- Click Run and wait ~8 seconds
- Download the image and save to
solanasis-docs/content-creation/post-images/ - Image naming convention:
blog-[topic-slug]-[date].png
Note: Browser automation (Chrome extensions, Playwright) is unreliable with AI Studio’s Angular CDK textarea after initial page load. If automating, use the Python API instead.
6. Quality Checklist
Before using any generated image, verify:
- Style is correct — Looks like a pencil sketch with visible line work/crosshatching
- No text — No legible words, brand names, or UI text in the image
- No logos — No recognizable brand logos or symbols
- No hacker tropes — No hoodies, masks, green matrix text, or dark rooms
- Professional tone — Scene looks like real business professionals, not stock photo posing
- Natural lighting — Warm, window-lit feel, not fluorescent or dramatic
- On-brand feel — Would fit naturally on the Solanasis website/blog
- Resolution OK — At least 1024x1024 for blog headers
If an image fails any check, regenerate with adjusted prompt wording.
7. Image Storage & File Naming
7.1 Directory Structure
solanasis-docs/
content-creation/
post-images/
blog-[topic-slug]-[YYYY-MM-DD].png ← Raw generated images (archive)
linkedin-[topic-slug]-[YYYY-MM-DD].png ← LinkedIn post images
social-[topic-slug]-[YYYY-MM-DD].png ← Other social media
solanasis-site/
public/images/stock/
blog-[topic-slug].jpg ← Production blog images (1200x800)
blog-[topic-slug].webp ← WebP version for <picture> element
CREDITS.md ← Attribution table for all stock images
7.2 Naming Convention
| Format | Pattern | Example |
|---|---|---|
| Blog header (raw) | blog-[topic]-[date].png | blog-cybersecurity-assessment-2026-03-09.png |
| Blog header (prod JPG) | blog-[topic].jpg | blog-email-warmup.jpg |
| Blog header (prod WebP) | blog-[topic].webp | blog-email-warmup.webp |
linkedin-[topic]-[date].png | linkedin-dr-verification-2026-03-15.png | |
| Social | social-[topic]-[date].png | social-ai-implementation-2026-03-20.png |
7.3 Post-Processing Pipeline (Raw → Production)
After generating a raw PNG, process it for the site:
from PIL import Image
img = Image.open("raw-image.png")
img_resized = img.resize((1200, 800), Image.LANCZOS)
img_rgb = img_resized.convert("RGB")
# Save both formats
img_rgb.save("blog-topic.jpg", quality=85)
img_rgb.save("blog-topic.webp", "WEBP", quality=80)The generate_remaining_blog_images.py script does this automatically. For manual images, use the snippet above or use sharp: node -e "require('sharp')('input.jpg').webp({quality:80}).toFile('output.webp')"
7.4 After Generating New Images
- Update
solanasis-site/public/images/stock/CREDITS.md— change source to “AI-generated (Gemini / Google AI Studio)” - Update
imageAltin the blog post frontmatter with the descriptive alt text - Delete
PENDING-AI-IMAGES.mdwhen all pending images are done - Run tests:
npx playwright test
8. Troubleshooting
| Issue | Solution |
|---|---|
| 429 RESOURCE_EXHAUSTED | Free tier daily quota is very limited (not 500/day). Wait until midnight PT for reset, or use generate_remaining_blog_images.py which auto-retries with backoff |
| Empty model response in web UI | This is a silent rate limit; the UI shows a response time (e.g., “4.7s”) but no image or text. Same fix as 429 above |
| All image models return 429 | Quota is shared across ALL image models per GCP project. Switching models won’t help; wait for daily reset |
google-generativeai doesn’t support image generation | Install google-genai (the new SDK). Use from google import genai and types.GenerateContentConfig(response_modalities=["IMAGE", "TEXT"]) |
| Chrome extension can’t type in AI Studio textarea | Angular CDK textarea doesn’t respond reliably to browser automation type actions after initial page load. Use the Python API instead |
| Image looks photorealistic instead of sketch | Add “pencil sketch, illustration, not photorealistic” to prompt |
| Image contains readable text | Add “absolutely no readable text or writing” to prompt |
| Image too dark/dramatic | Add “bright, airy, well-lit workspace” to prompt |
| Image looks cartoonish | Remove any “illustration” wording, emphasize “realistic proportions, architectural sketch style” |
| Model generates a refusal | Some prompts trigger safety filters; rephrase the subject or remove ambiguous terms |
| Nano Banana not appearing in web UI | Make sure you click “Image Generation” category first on the Playground page |
| Pillow path errors on Windows | Use C:/Users/... (Windows-style) paths, not /c/Users/... (MSYS-style) |
9. Key References
| Resource | Location |
|---|---|
| Interactive generation script | solanasis-scripts/generate_image_nano_banana.py |
| Batch retry script | solanasis-scripts/generate_remaining_blog_images.py |
| API key | solanasis-docs/.env and solanasis-scripts/.env → GOOGLE_AI_STUDIO_API_KEY |
| Brand Style Guide | solanasis-docs/brand-style/Brand_Style_Guide.md |
| Post images (raw archive) | solanasis-docs/content-creation/post-images/ |
| Post images (production) | solanasis-site/public/images/stock/ (JPG + WebP, 1200x800) |
| Image credits | solanasis-site/public/images/stock/CREDITS.md |
| Pending images tracker | solanasis-site/public/images/stock/PENDING-AI-IMAGES.md (delete when all done) |
| Google AI Studio | https://aistudio.google.com (login: zasyatkin@gmail.com) |
| Gemini API docs | https://ai.google.dev/gemini-api/docs/image-generation |
Python SDK (google-genai) | https://pypi.org/project/google-genai/ |
10. Pro Tips
- Iterate fast — Nano Banana generates in ~8 seconds. Don’t agonize over prompts; generate 3-4 variations and pick the best one
- Be specific about scene composition — “person sitting at desk facing left with window behind them” gives much better results than “person at desk”
- The free tier is limited — Plan for 1-2 images per day max. If you need 3+ images, spread across multiple days or use the retry script which auto-waits for quota reset
- Save your winning prompts — When you get a great image, save the exact prompt text alongside the image file for reuse
- Use
aspect_ratioin the API — Setimage_config=types.ImageConfig(aspect_ratio="3:2")for blog headers (close to 1200x800). Options:"1:1","3:4","4:3","9:16","16:9","3:2" - Consistency across a series — When generating multiple images for a blog series, use the same scene elements (desk style, lighting direction, person positioning) to create visual continuity
- The “Get code” button in AI Studio exports the exact Python code for any prompt you run; useful for turning a successful web UI generation into a repeatable script
- Always generate both JPG and WebP — The site uses
<picture>elements with.replace('.jpg', '.webp')for WebP source. Both files must exist at 1200x800 - API vs web UI share the same quota — Don’t waste quota experimenting in the web UI if you plan to use the API later that day