### Local Development Setup
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Instructions for cloning the repository, installing dependencies, building the project, and running the server locally.
```APIDOC
## Local Development
```bash
git clone https://github.com/TruCopilot/image-generator-vibe-coding.git
cd image-generator-vibe-coding
npm install
npm run build # Compiles TypeScript → dist/
# Run the server manually for testing
OPENROUTER_API_KEY=sk-or-v1-your-key node dist/index.js
# → Image Generator MCP server running on stdio (default provider: openrouter)
```
```
--------------------------------
### Local Development Setup Commands
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Provides commands for cloning the repository, installing dependencies, building the project, and running the server locally with an API key.
```bash
git clone https://github.com/TruCopilot/image-generator-vibe-coding.git
cd image-generator-vibe-coding
npm install
npm run build # Compiles TypeScript → dist/
# Run the server manually for testing
OPENROUTER_API_KEY=sk-or-v1-your-key node dist/index.js
# → Image Generator MCP server running on stdio (default provider: openrouter)
```
--------------------------------
### Clone and Install Project
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Commands to clone the repository, navigate into the project directory, install dependencies, and build the project.
```bash
git clone https://github.com/TruCopilot/image-generator-vibe-coding.git
cd image-generator-vibe-coding
npm install
npm run build
```
--------------------------------
### Quick Install for Project Scope
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Installs the image generator specifically for the current project scope. Replace YOUR_OPENROUTER_API_KEY with your key.
```bash
claude mcp add image-generator \
-e OPENROUTER_API_KEY=YOUR_OPENROUTER_API_KEY \
-- npx -y @trucopilot/image-generator-vibe-coding
```
--------------------------------
### Generate Image Examples
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Provides examples for generating images with different parameters, including model shortcuts, aspect ratios, and output directories. It also shows how to force the Gemini provider.
```text
// Generate a square avatar with the "flash" shortcut:
prompt: "Friendly robot mascot, 3D rendered, studio lighting, white background, clean edges"
model: "flash"
aspectRatio: "1:1"
imageSize: "2K"
outputDir: "./public/images/avatars"
```
```text
// Use quality model for a cinematic ultra-wide header:
prompt: "Futuristic city skyline at night, neon reflections on wet pavement, 21:9 panorama"
model: "google/gemini-3-pro-image-preview"
aspectRatio: "21:9"
imageSize: "4K"
outputDir: "./public/images/headers"
```
```text
// Force Gemini direct provider:
prompt: "Korean bibimbap bowl, overhead shot, restaurant-grade food photography"
model: "gemini-2.5-flash-image"
aspectRatio: "4:3"
imageSize: "2K"
outputDir: "./public/images/menu"
provider: "gemini"
```
--------------------------------
### Quick Install for User Scope
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Use this command to install the image generator for your user scope. Ensure you replace YOUR_OPENROUTER_API_KEY with your actual key from openrouter.ai.
```bash
claude mcp add --scope user image-generator \
-e OPENROUTER_API_KEY=YOUR_OPENROUTER_API_KEY \
-- npx -y @trucopilot/image-generator-vibe-coding
```
--------------------------------
### Generate Image Prompt Example
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Example of a natural language prompt for generating an image. This can be used directly with the AI assistant.
```text
"Generate a hero image of a futuristic cityscape at night, neon lights, rain reflections"
```
--------------------------------
### Generate Banner Prompt Example
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Example of a prompt for generating a banner image with a specified aspect ratio. Useful for blog posts or headers.
```text
"Create a 16:9 banner for my blog post about machine learning"
```
--------------------------------
### Generate Avatar Prompt Example
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Example of a prompt for generating a square avatar image with specific style and lighting. Suitable for profile pictures.
```text
"Generate a 1:1 avatar of a friendly robot mascot, 3D rendered, studio lighting"
```
--------------------------------
### Edit Image Prompt Example
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Example of a natural language prompt for editing an existing image. Specify desired modifications.
```text
"Edit this image to add dramatic clouds and golden hour lighting"
```
--------------------------------
### Run Project Locally
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Command to run the project locally after installation and build. Requires setting the OPENROUTER_API_KEY environment variable.
```bash
OPENROUTER_API_KEY=your-key node dist/index.js
```
--------------------------------
### Image Editing Examples with Parameters
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Demonstrates various use cases for the `edit_image` tool, including re-cropping, restyling product photos, and adding seasonal flair.
```text
// Re-crop a portrait image to landscape for a hero banner:
prompt: "Keep the subject, expand background to fill 16:9 landscape composition"
imagePath: "./assets/team/ceo-portrait.jpg"
aspectRatio: "16:9"
outputDir: "./public/images/team"
// Restyle a product photo:
prompt: "Change the background to a clean white studio backdrop, enhance product sharpness"
imagePath: "./uploads/product-raw.png"
model: "pro"
outputDir: "./public/images/products"
// Add seasonal flair to an existing asset:
prompt: "Overlay subtle falling snowflakes and a soft winter color grade"
imagePath: "./public/images/hero.png"
model: "flash"
outputDir: "./public/images/seasonal"
```
--------------------------------
### Run Development Server with Watch Mode
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Starts the development server and watches for file changes to recompile TypeScript.
```bash
npm run dev # tsc --watch
```
--------------------------------
### Vibe Coding Prompt for Image Generation Setup
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
This prompt should be dropped into AI coding tools to automate the setup of the image-generator MCP server and CLAUDE.md rules. Remember to replace the placeholders for your OpenRouter API key and desired model name.
```plaintext
Fetch this doc: https://github.com/TruCopilot/image-generator-vibe-coding and install the
image-generator MCP server for me. Use user scope if possible, otherwise project scope.
Install command:
claude mcp add --scope user image-generator \
-e OPENROUTER_API_KEY=[YourOpenRouterAPIKey] \
-- npx -y @trucopilot/image-generator-vibe-coding
Then update my CLAUDE.md (or AGENTS.md) and your memory with these image generation rules:
# Image Generation (MANDATORY for all visual content)
- MCP Server: `image-generator` (via @trucopilot/image-generator-vibe-coding)
- Model: `[YourModelName]`
- OpenRouter: `google/gemini-2.5-flash-image` (fast) or `google/gemini-3-pro-image-preview` (quality)
- Gemini direct: `gemini-2.5-flash-image` (fast) or `gemini-3-pro-image-preview` (quality)
- Provider: OpenRouter (default)
## Rules
- ALWAYS use the `image-generator` MCP to generate images when working on new designs,
building UI, or making the site more beautiful — hero sections, banners, cards,
backgrounds, avatars, and any visual content
- CRITICAL: Always call via sub-agent (Agent tool) — base64 image data will crash
the main context window if returned directly
- Resolution: Always `2K` — never go below unless I explicitly ask
- Style: Ultra-realistic, high detail, professional photography quality — include
lighting, composition, and mood descriptors in every prompt
- Aspect ratios — choose based on design context:
- `1:1` → Avatars, profile pics, square cards, thumbnails
- `16:9` → Hero banners, page headers, blog covers, landscape backgrounds
- `9:16` → Mobile splash screens, story formats, vertical banners
- `3:4` / `4:3` → Product cards, feature sections
- `2:3` / `3:2` → Portrait/landscape editorial layouts
- Output directory: `./public/images/generated/` (or project-appropriate path)
- After generating, use the saved file path in <img> or CSS background-image
— never embed base64 in markup
## Sub-Agent Pattern (Required)
Always generate images through a sub-agent like this:
Agent tool → "Use the image-generator MCP generate_image tool with:
prompt: '<detailed visual description>',
model: '[YourModelName]',
aspectRatio: '<pick based on context>',
imageSize: '2K',
outputDir: './public/images/generated/'
Report back ONLY the saved file path, do NOT return image data."
Save this to your persistent memory so every future session uses these rules automatically.
```
--------------------------------
### Aspect Ratio & Resolution Reference
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
A guide to choosing the right aspect ratio for images to fit UI layouts, along with a reference for base resolutions and multipliers.
```APIDOC
## Aspect Ratio & Resolution Reference
Choosing the right aspect ratio is critical for images to fit naturally into UI layouts without CSS distortion.
### Ratio & Base Resolution Table
```
Ratio Base Resolution Best For
──────────────────────────────────────────────────────────────
1:1 1024×1024 Avatars, profile pics, square cards
16:9 1344×768 Hero banners, page headers, blog covers
9:16 768×1344 Mobile splash, story formats, vertical banners
3:4 864×1184 Product cards, feature sections (portrait)
4:3 1184×864 Feature sections, content blocks (landscape)
2:3 832×1248 Editorial portraits, magazine layouts
3:2 1248×832 Editorial landscapes
4:5 896×1152 Instagram posts, social media
5:4 1152×896 Social media landscape
21:9 1536×672 Ultra-wide cinematic headers
```
### Image Size Multipliers
```
imageSize multipliers:
0.5K → ~512px base 1K → ~1024px base 2K → ~2048px base 4K → ~4096px base
```
```
--------------------------------
### Sub-agent Pattern for Image Editing
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Example of how a sub-agent can use the `edit_image` tool with specific parameters. The expected output format is also shown.
```text
// Sub-agent pattern for editing:
Agent tool → "Use the image-generator MCP edit_image tool with:
prompt: 'Add dramatic storm clouds and change the lighting to a moody blue dusk atmosphere',
imagePath: './public/images/generated/image-1719000000000-0.png',
model: 'google/gemini-2.5-flash-image',
aspectRatio: '16:9',
outputDir: './public/images/generated/'
Report back ONLY the saved file path."
// Expected output:
// Edited image using openrouter → google/gemini-2.5-flash-image
// Source: /your/project/public/images/generated/image-1719000000000-0.png
// Saved: /your/project/public/images/generated/image-1719000000001-0.png
```
--------------------------------
### Generate Image Tool Usage (Sub-agent Pattern)
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Demonstrates the recommended sub-agent pattern for invoking the `generate_image` tool within AI coding sessions. This prevents context window overflow by reporting only the file path.
```text
Tool: generate_image
Parameters:
prompt (string, required) – Text description of the image
model (string, default: "google/gemini-2.5-flash-image")
Accepts full OpenRouter IDs, full Gemini IDs, or shortcuts: "flash", "pro"
aspectRatio (enum, default: "1:1")
Options: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "3:2" | "4:5" | "5:4" | "21:9"
imageSize (enum, default: "2K")
Options: "0.5K" | "1K" | "2K" | "4K"
outputDir (string, default: "./generated-images")
provider (enum, optional) – "openrouter" | "gemini" (auto-detected if omitted)
```
```text
// Sub-agent pattern (recommended inside AI coding sessions):
Agent tool → "Use the image-generator MCP generate_image tool with:
prompt: 'Stunning 16:9 hero banner — cherry blossom avenue at golden hour,
cinematic depth of field, soft bokeh, warm amber tones, ultra-realistic,
professional photography',
model: 'google/gemini-2.5-flash-image',
aspectRatio: '16:9',
imageSize: '2K',
outputDir: './public/images/generated/'
Report back ONLY the saved file path, do NOT return image data."
// Expected output (returned by the tool):
// Generated 1 image(s) using openrouter → google/gemini-2.5-flash-image
// Aspect ratio: 16:9 | Size: 2K (2048x2048)
// Saved: /your/project/public/images/generated/image-1719000000000-0.png
```
--------------------------------
### Manual JSON Configuration (Google Gemini)
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Manually configure the MCP server using JSON, specifying the Google Gemini provider by using `GEMINI_API_KEY`.
```json
{
"mcpServers": {
"image-generator": {
"command": "npx",
"args": ["-y", "@trucopilot/image-generator-vibe-coding"],
"env": {
"GEMINI_API_KEY": "your-gemini-key-here"
}
}
}
}
```
--------------------------------
### Environment Variables
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Lists the required environment variables for configuring API keys for OpenRouter and Google Gemini.
```APIDOC
## Environment Variables
```bash
# .env.example
# OpenRouter (preferred) — access 300+ models via one API key
OPENROUTER_API_KEY=sk-or-v1-your-key-here
# Google Gemini direct — used as fallback if OPENROUTER_API_KEY is not set
GEMINI_API_KEY=AIzaSy-your-key-here
# At least one key is required — the server exits with an error if both are missing.
```
```
--------------------------------
### Environment Variables for API Keys
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Specifies the required environment variables for authentication: `OPENROUTER_API_KEY` (preferred) and `GEMINI_API_KEY` (fallback).
```bash
# .env.example
# OpenRouter (preferred) — access 300+ models via one API key
OPENROUTER_API_KEY=sk-or-v1-your-key-here
# Google Gemini direct — used as fallback if OPENROUTER_API_KEY is not set
GEMINI_API_KEY=AIzaSy-your-key-here
# At least one key is required — the server exits with an error if both are missing.
```
--------------------------------
### Internal Model Map Configuration
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Illustrates the internal mapping of model shortcuts to their full provider-specific IDs for both OpenRouter and Gemini providers.
```typescript
// Internal MODEL_MAP (src/index.ts)
const MODEL_MAP = {
flash: {
openrouter: "google/gemini-2.5-flash-image",
gemini: "gemini-2.5-flash-image",
},
pro: {
openrouter: "google/gemini-3-pro-image-preview",
gemini: "gemini-3-pro-image-preview",
},
// Full IDs also accepted as keys — resolved to the correct provider variant
};
// Any OpenRouter model ID not in the map is passed through unchanged,
enabling access to 300+ models listed at https://openrouter.ai/models
// Example — use any third-party image model:
prompt: "Impressionist oil painting of a Parisian café"
model: "stability-ai/stable-diffusion-3-5-large" // any OpenRouter model ID
provider: "openrouter"
```
--------------------------------
### Edit Image Tool Parameters
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Defines the parameters for the `edit_image` tool, including prompt, image path, model, aspect ratio, output directory, and provider.
```text
Tool: edit_image
Parameters:
prompt (string, required) – Edit instructions
imagePath (string, required) – Absolute or relative path to the source image
model (string, default: "google/gemini-2.5-flash-image")
aspectRatio (enum, optional) – Output aspect ratio (changes crop/composition)
outputDir (string, default: "./generated-images")
provider (enum, optional) – "openrouter" | "gemini"
```
--------------------------------
### generate_image MCP Tool
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Generates a new image from a text prompt using the specified model and provider. The result is auto-saved as a timestamped PNG file in the output directory, and the saved file path is returned alongside a preview of the image data.
```APIDOC
## MCP Tool: `generate_image`
### Description
Generates a new image from a text prompt using the specified model and provider. The result is auto-saved as a timestamped PNG file in the output directory, and the saved file path is returned alongside a preview of the image data. When called from an AI assistant, this tool should always be invoked via a sub-agent to prevent base64 image data from overflowing the main context window.
### Parameters
#### Required Parameters
- **prompt** (string) - Text description of the image
#### Optional Parameters
- **model** (string, default: "google/gemini-2.5-flash-image") - Accepts full OpenRouter IDs, full Gemini IDs, or shortcuts: "flash", "pro"
- **aspectRatio** (enum, default: "1:1") - Options: "1:1" | "16:9" | "9:16" | "3:4" | "4:3" | "2:3" | "3:2" | "4:5" | "5:4" | "21:9"
- **imageSize** (enum, default: "2K") - Options: "0.5K" | "1K" | "2K" | "4K"
- **outputDir** (string, default: "./generated-images") - The directory to save generated images.
- **provider** (enum, optional) - "openrouter" | "gemini" (auto-detected if omitted)
### Request Example (Sub-agent pattern)
```
Agent tool → "Use the image-generator MCP generate_image tool with:
prompt: 'Stunning 16:9 hero banner — cherry blossom avenue at golden hour,
cinematic depth of field, soft bokeh, warm amber tones, ultra-realistic,
professional photography',
model: 'google/gemini-2.5-flash-image',
aspectRatio: '16:9',
imageSize: '2K',
outputDir: './public/images/generated/'
Report back ONLY the saved file path, do NOT return image data."
```
### Response Example
```
// Generated 1 image(s) using openrouter → google/gemini-2.5-flash-image
// Aspect ratio: 16:9 | Size: 2K (2048x2048)
// Saved: /your/project/public/images/generated/image-1719000000000-0.png
```
### Examples
```
// Generate a square avatar with the "flash" shortcut:
prompt: "Friendly robot mascot, 3D rendered, studio lighting, white background, clean edges"
model: "flash"
aspectRatio: "1:1"
imageSize: "2K"
outputDir: "./public/images/avatars"
// Use quality model for a cinematic ultra-wide header:
prompt: "Futuristic city skyline at night, neon reflections on wet pavement, 21:9 panorama"
model: "google/gemini-3-pro-image-preview"
aspectRatio: "21:9"
imageSize: "4K"
outputDir: "./public/images/headers"
// Force Gemini direct provider:
prompt: "Korean bibimbap bowl, overhead shot, restaurant-grade food photography"
model: "gemini-2.5-flash-image"
aspectRatio: "4:3"
imageSize: "2K"
outputDir: "./public/images/menu"
provider: "gemini"
```
```
--------------------------------
### Manual JSON Configuration for MCP Servers
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Configure the image-generator MCP server manually using a JSON file. This is compatible with tools like Claude Code, Cursor, and Windsurf. Replace 'your-openrouter-key-here' with your API key.
```json
{
"mcpServers": {
"image-generator": {
"command": "npx",
"args": ["-y", "@trucopilot/image-generator-vibe-coding"],
"env": {
"OPENROUTER_API_KEY": "your-openrouter-key-here"
}
}
}
}
```
--------------------------------
### generate_image
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Generates an image from a text prompt using various models and configurations.
```APIDOC
## `generate_image`
### Description
Generate an image from a text prompt.
### Parameters
#### Path Parameters
- `prompt` (string) - Required - Text description of the image
- `model` (string) - Optional - `google/gemini-2.5-flash-image` - Full model ID — see [Models](#-models). Shortcuts: `flash`, `pro`
- `aspectRatio` (enum) - Optional - `1:1` - `1:1` · `16:9` · `9:16` · `3:4` · `4:3` · `2:3` · `3:2` · `4:5` · `5:4` · `21:9`
- `imageSize` (enum) - Optional - `2K` - `0.5K` · `1K` · `2K` · `4K`
- `outputDir` (string) - Optional - `./generated-images` - Directory to save generated images
- `provider` (enum) - Optional - auto-detect - `openrouter` · `gemini`
```
--------------------------------
### edit_image Tool
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Edits an existing image on disk by applying text-based instructions. Supports various image formats and allows customization of model, aspect ratio, output directory, and provider.
```APIDOC
## Tool: edit_image
### Description
Edits an existing image on disk by applying text-based instructions using the same Gemini-backed providers. The source image is read, base64-encoded, and sent alongside the edit prompt. Supports `.png`, `.jpg`, `.jpeg`, `.webp`, and `.gif` inputs. The edited result is saved as a new PNG in the output directory; the original file is never overwritten.
### Parameters
- **prompt** (string, required) – Edit instructions
- **imagePath** (string, required) – Absolute or relative path to the source image
- **model** (string, default: "google/gemini-2.5-flash-image")
- **aspectRatio** (enum, optional) – Output aspect ratio (changes crop/composition)
- **outputDir** (string, default: "./generated-images")
- **provider** (enum, optional) – "openrouter" | "gemini"
### Usage Examples
#### Sub-agent pattern for editing:
```
Agent tool → "Use the image-generator MCP edit_image tool with:
prompt: 'Add dramatic storm clouds and change the lighting to a moody blue dusk atmosphere',
imagePath: './public/images/generated/image-1719000000000-0.png',
model: 'google/gemini-2.5-flash-image',
aspectRatio: '16:9',
outputDir: './public/images/generated/'
Report back ONLY the saved file path."
```
#### Expected output:
```
Edited image using openrouter → google/gemini-2.5-flash-image
Source: /your/project/public/images/generated/image-1719000000000-0.png
Saved: /your/project/public/images/generated/image-1719000000001-0.png
```
#### Re-crop a portrait image to landscape for a hero banner:
```
prompt: "Keep the subject, expand background to fill 16:9 landscape composition"
imagePath: "./assets/team/ceo-portrait.jpg"
aspectRatio: "16:9"
outputDir: "./public/images/team"
```
#### Restyle a product photo:
```
prompt: "Change the background to a clean white studio backdrop, enhance product sharpness"
imagePath: "./uploads/product-raw.png"
model: "pro"
outputDir: "./public/images/products"
```
#### Add seasonal flair to an existing asset:
```
prompt: "Overlay subtle falling snowflakes and a soft winter color grade"
imagePath: "./public/images/hero.png"
model: "flash"
outputDir: "./public/images/seasonal"
```
```
--------------------------------
### Provider & Model Resolution
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Details on how the server resolves the active provider and model ID, including environment variable precedence and model mapping.
```APIDOC
## Provider & Model Resolution
The server resolves the active provider and model ID at request time. `OPENROUTER_API_KEY` takes precedence; if only `GEMINI_API_KEY` is set, the Gemini provider is used. Model shortcuts are mapped to their full provider-specific IDs internally.
### Internal MODEL_MAP
```typescript
const MODEL_MAP = {
flash: {
openrouter: "google/gemini-2.5-flash-image",
gemini: "gemini-2.5-flash-image",
},
pro: {
openrouter: "google/gemini-3-pro-image-preview",
gemini: "gemini-3-pro-image-preview",
},
// Full IDs also accepted as keys — resolved to the correct provider variant
};
```
Any OpenRouter model ID not in the map is passed through unchanged, enabling access to 300+ models listed at https://openrouter.ai/models.
### Example using a third-party model:
```
prompt: "Impressionist oil painting of a Parisian café"
model: "stability-ai/stable-diffusion-3-5-large" // any OpenRouter model ID
provider: "openrouter"
```
```
--------------------------------
### edit_image
Source: https://github.com/trucopilot/image-generator-vibe-coding/blob/main/README.md
Edits an existing image based on text instructions.
```APIDOC
## `edit_image`
### Description
Edit an existing image with text instructions.
### Parameters
#### Path Parameters
- `prompt` (string) - Required - Edit instructions
- `imagePath` (string) - Required - Path to source image
- `model` (string) - Optional - `google/gemini-2.5-flash-image` - Full model ID — same options as above
- `aspectRatio` (enum) - Optional - Output aspect ratio
- `outputDir` (string) - Optional - `./generated-images` - Directory to save edited images
- `provider` (enum) - Optional - auto-detect - `openrouter` · `gemini`
```
--------------------------------
### CLAUDE.md Image Generation Rules
Source: https://context7.com/trucopilot/image-generator-vibe-coding/llms.txt
Defines mandatory rules for using the image generator MCP for all visual content within AI coding sessions. Ensures consistent style, resolution, and output paths.
```markdown
# Image Generation (MANDATORY for all visual content)
- MCP Server: `image-generator` (via @trucopilot/image-generator-vibe-coding)
- Model: `google/gemini-2.5-flash-image` (fast) or `google/gemini-3-pro-image-preview` (quality)
- Provider: OpenRouter (default)
## Rules
- ALWAYS use the `image-generator` MCP when building UI, hero sections, banners,
cards, backgrounds, avatars, or any visual content
- CRITICAL: Always call via sub-agent (Agent tool) — never return base64 data directly
- Resolution: Always `2K` unless explicitly asked otherwise
- Style: Ultra-realistic, professional photography quality — include lighting,
composition, and mood descriptors in every prompt
- Output directory: `./public/images/generated/`
- After generating, use the saved file path in
or CSS background-image
## Sub-Agent Pattern (Required)
Agent tool → "Use the image-generator MCP generate_image tool with:
prompt: '',
model: 'google/gemini-2.5-flash-image',
aspectRatio: '',
imageSize: '2K',
outputDir: './public/images/generated/'
Report back ONLY the saved file path, do NOT return image data."
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.