openrouter-imgen-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openrouter-imgen-mcpGenerate a product photo of a ceramic mug on a wooden table, warm lighting"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openrouter-imgen-mcp
Give your AI assistant the ability to generate and edit images. One install, multiple models, no vendor lock-in.
Screenshots
Before | After |
|
|
Works with Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, and any MCP client.
Related MCP server: OpenRouter Image Generation MCP Server
Why This
One API key, every image model. Gemini, GPT-5, and more through OpenRouter. Switch models with a word, not a code change.
Generate, edit, and batch. Text-to-image, image editing with references, and batch operations (up to 20 parallel tasks).
Style presets. Say "in watercolor style" or "as pixel art" and get consistent results. 8 built-in styles.
Variations. Generate up to 4 takes from one prompt. Pick the best one.
Smart file output. Save to a path or a directory. Files get descriptive names automatically.
Pay for what you use. OpenRouter's per-token and per-image pricing means no subscriptions.
How to Install
Get an OpenRouter API key, then add the server to your client.
Claude Code
# macOS / Linux
claude mcp add openrouter-imgen-mcp -s user -e OPENROUTER_API_KEY=YOURAPIKEY -- npx -y openrouter-imgen-mcp@latest
# Windows
claude mcp add openrouter-imgen-mcp -s user -e OPENROUTER_API_KEY=YOURAPIKEY -- cmd /c npx -y openrouter-imgen-mcp@latestClaude Desktop / Cursor / VS Code / Windsurf
Add to your MCP config JSON:
{
"mcpServers": {
"openrouter-imgen-mcp": {
"command": "npx",
"args": ["-y", "openrouter-imgen-mcp@latest"],
"env": {
"OPENROUTER_API_KEY": "YOURAPIKEY"
}
}
}
}What You Can Do
Simply chat with your assistant:
Generate a product photo of a ceramic mug on a wooden table, warm lightingGenerate 3 variations of a logo concept for a coffee brand, pixel-art styleEdit /path/to/headshot.png: make the background a gradient, keep the subjectBatch generate 5 social media banners: summer sale, back to school, holiday promo,
new arrivals, free shipping. All in illustration style, 16:9, save to ./banners/List image models. What's cheapest for quick drafts?Quality Presets
Skip the model IDs. Just say "fast", "balanced", or "quality":
Preset | Model | When to use |
| Gemini 2.5 Flash | Drafts, iteration, keeping costs low |
| Gemini 3 Pro | Day-to-day use (default) |
| GPT-5 Image | Final deliverables, max fidelity |
Or pass any OpenRouter model ID directly:
Generate a cat using model google/gemini-2.5-flash-imageStyle Presets
Keywords modifies the style:
Style | What you get |
| Photorealistic, DSLR, natural lighting |
| Clean digital art, vibrant colors |
| Soft washes, paper texture |
| Retro 16-bit, limited palette |
| Studio-lit, physically based rendering |
| Cel-shaded, Japanese animation |
| Pencil on paper, monochrome |
| Brushstrokes, impasto, classical |
Tools Reference
Convenient tools:
Tool | What it does |
| Text-to-image with quality/style presets, variations (1-4), aspect ratio, file output |
| Transform images with a prompt + up to 12 reference images (files, URLs, data URIs) |
| Run up to 20 generate/edit tasks in parallel with concurrency control |
| Browse available models with pricing |
| Check your OpenRouter credit balance |
Supported output: 1:1, 2:3, 3:2, 16:9, 9:16, 4:3, 3:4 aspect ratios. 0.5K, 1K, 2K, 4K sizes. PNG, JPEG, WebP, GIF inputs.
Headless Configuration
Flag | Env Var | Default |
|
| (required) |
|
|
|
|
|
|
|
|
|
|
|
|
Security
API keys never appear in logs or error messages. File paths block directory traversal. Image URLs are validated against SSRF patterns. Batch operations are memory-capped at 200MB. All inputs are schema-validated.
For Developers
To build for devs:
pnpm install && pnpm build && pnpm test # 57 testsLicense
MIT
Made with <3 at Bitcoin.com
Available Tools
5 toolsbatch_imagesB
Generate or edit multiple images in a single call with concurrency control. Each task can be a generation (prompt only) or edit (prompt + reference images).
| Name | Required | Description | Default |
|---|---|---|---|
| tasks | Yes | Array of image tasks | |
| concurrency | No | Max concurrent API calls (default: 3) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states that tasks may be generation or edit and that concurrency is controllable, but omits the behavior that matters most for a batch tool: what happens on partial failure (does one bad task abort the rest?), result ordering/correlation to input tasks, and any cost or rate-limit implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, zero waste, with the core purpose front-loaded and the generation-vs-edit distinction immediately after. Nothing is padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a batch tool with no annotations and no output schema, the description covers purpose but leaves out partial-failure behavior and how results map back to the input tasks—information an agent needs to call and interpret this correctly. Adequate but with real gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and there are only 2 top-level parameters, so the schema already documents the task fields and the concurrency default of 3. The description adds only the notion of 'concurrency control,' no format or semantics beyond the schema—appropriate baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific verb+resource (generate or edit multiple images) and clearly scopes it to batching in a single call, which implicitly separates it from the singular generate_image/edit_image siblings. It does not name those siblings explicitly, so differentiation is inferred rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use this when you have several image tasks to run together rather than one at a time. There is no explicit when-to-use/when-not statement, no guidance on when batch beats looping the single-image tools, and no mention of when the concurrency control matters.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_balanceA
Check your OpenRouter account balance — shows total credits, usage, and remaining balance.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It discloses the return contents (total credits, usage, remaining balance), which is useful, and implies a safe read. However it says nothing about authentication requirements, rate limits, or whether the data is live/cached.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence with an em-dash elaboration; no filler, no redundancy. Appropriate for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, but the description substitutes by naming the three values returned, and the zero-parameter schema needs no explanation. Auth/mutability details are the only real gaps, and those are minor for a read-only balance check.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4. There is no parameter syntax that requires explanation in the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (check) and resource (OpenRouter account balance), then enumerates the returned figures. An agent immediately knows what the tool does. It does not need sibling differentiation since the siblings (image generation tools) are unrelated, so a 4 rather than 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the name and description — you call it to inspect account credit status. There is no explicit statement of when to use it, no prerequisites, and no alternatives named, but for a zero-argument read tool the intent is self-evident.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_imageB
Edit or transform existing images using a text prompt and reference images. Supports local file paths, URLs, and data URIs. For best results, expand brief prompts with details about composition, lighting, color palette, and mood before calling — unless the user explicitly asked for a simple/minimal prompt.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model ID (defaults to Gemini 3 Pro Image Preview) | |
| style | No | Visual style preset to prepend to the prompt | |
| images | Yes | Reference images: local file paths, HTTP URLs, or data URIs | |
| prompt | Yes | What to do with the image(s) | |
| image_size | No | Output image size | |
| output_path | No | Optional path to save the result. Can be a full file path or a directory (auto-names the file) | |
| aspect_ratio | No | Output aspect ratio |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It usefully discloses accepted input sources (local paths, URLs, data URIs) and prompt-expansion behavior, but says nothing about cost, whether the result is returned inline or written to disk, or what output_path does by default for a generative operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tightly written sentences that front-load the core action and then the prompt-quality tip. Every clause earns its place, with no redundant restatement of the tool name or schema fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter generation/edit tool with no annotations and no output schema, the description covers inputs but leaves the output contract and cost/behavior profile unstated. It is minimally adequate given the rich schema, but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all seven parameters are already documented in the schema, including enums for style, image_size, and aspect_ratio. The description adds no parameter-level detail beyond this baseline, which is acceptable but unremarkable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (edit/transform) and resource (existing images via text prompt and reference images). The word 'existing' implicitly distinguishes it from generate_image, though it never names that sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives real guidance on prompt preparation ('expand brief prompts... unless the user explicitly asked for a simple/minimal prompt'), which is useful operating advice. However, it offers no guidance on when to pick this tool over generate_image, batch_images, or how it relates to list_image_models/check_balance, so tool selection is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageA
Generate an image from a text prompt via OpenRouter. Supports quality presets (fast/balanced/quality) or explicit model IDs. For best results, expand brief prompts with details about composition, lighting, color palette, and mood before calling — unless the user explicitly asked for a simple/minimal prompt.
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of image variations to generate (1-4). Ask the user how many they want before generating. | |
| model | No | Explicit OpenRouter model ID — overrides quality preset | |
| style | No | Visual style preset to prepend to the prompt | |
| prompt | Yes | What to generate | |
| quality | No | Quality preset: fast (cheap/quick), balanced (default), quality (best output) | balanced |
| image_size | No | Output image size | |
| output_path | No | Optional path to save the PNG. Can be a full file path or a directory (auto-names the file) | |
| aspect_ratio | No | Output aspect ratio |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses the OpenRouter backend and the meaning of the quality presets (cheap/quick vs best output), which is useful. But it omits cost implications, latency, rate limits, and whether the result is returned inline or only via output_path.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero filler, front-loaded with the core action and backend. The prompt-expansion caveat follows logically and is appropriately short.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 8-parameter generation tool with no output schema, the definition should clarify what is returned (image bytes, URL, or a saved file path) and how output_path changes that. The model/preset relationship is covered, but this return-shape gap leaves the definition only adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all 8 parameters are already documented in the schema, establishing a baseline of 3. The description adds one cross-parameter nuance (model overrides the quality preset) that the schema only hints at, but doesn't explain output_path behavior or aspect-ratio/size interaction.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource (generate an image) plus the backend (OpenRouter), and distinguishes its two configuration paths (quality presets vs explicit model IDs). An agent can tell it apart from edit_image, batch_images, and list_image_models without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Offers concrete advice on when to expand a prompt and when not to (simple/minimal user request), which is real usage guidance. However, it says nothing about when to use this tool versus edit_image or batch_images, nor about cost/prerequisite conditions implied by check_balance being a sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_image_modelsB
List available image generation models from OpenRouter with pricing and capabilities.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Filter models by substring match on model ID or name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states what is listed but not whether results are cached, how fresh pricing data is, whether authentication is required, or if the list is paginated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single efficient sentence that front-loads the action and resource with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple read-only single-param tool, but with no annotations and no output schema, the description could reasonably say more about return shape or usage context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with the query parameter fully documented as a substring match. The description adds no parameter details, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb+resource: lists image generation models, and specifies source (OpenRouter) and included data (pricing, capabilities). It distinguishes itself from siblings like generate_image by being a read-only catalog operation, though it does not explicitly name them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this versus alternatives or prerequisites. An agent could infer it's for discovering models before calling generate_image, but nothing is stated explicitly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.1- First observed
batch_images - First observed
check_balance - First observed
edit_image - First observed
generate_image - First observed
list_image_models
TDQS
Scored across 5 tools
Each tool has a distinct purpose: listing models, generating, editing, checking balance, and batching. The only mild overlap is batch_images, which subsumes both generate_image and edit_image, so an agent might occasionally debate between batch and single-call tools.
All five tools follow a clean verb_noun snake_case pattern (list_image_models, generate_image, edit_image, check_balance, batch_images). The convention is applied uniformly with no style deviations.
Five tools is well-scoped for an image generation/editing server, covering discovery, generation, editing, batching, and account state without redundancy. Each tool clearly earns its place.
The surface covers the core lifecycle: model discovery, single and batch generation, editing, and balance checking. Minor gaps like image upscaling, variation, or history/retrieval operations are absent but not essential to the stated purpose.
Maintenance
Related MCP Connectors
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Generate AI images, videos, music, SFX & speech in any AI assistant. Results appear inline in chat.
Create images and videos from prompts, with options for image mixing, reference images, and start/…
Generate AI images, video, voiceovers and music from Claude, ChatGPT or Cursor through 50+ models (Veo 3.1, Kling 3, Seedance, Nano Banana, GPT Image, ElevenLabs). Also image editing, upscaling, background removal, face swap, transcription, voice cloning and UGC-style video ads. Sign in with OAuth — no API key to paste. Tools are annotated (read-only vs. credit-spending); failed generations are refunded.
Related MCP Servers
- -licenseAqualityNot gradedmaintenanceEnables generating and editing images using OpenRouter's API with Gemini 2.5 Flash Image model. Supports custom aspect ratios, iterative editing, and reference images for style transfer.623 npm-
- AlicenseBqualityDmaintenanceEnables image generation via OpenRouter API, supporting models like Gemini 2.5 Flash Image Preview with options to save files locally.21Do What The F*ck You Want To Public
- AlicenseNot gradedqualityDmaintenanceEnables chat and image analysis through OpenRouter.ai models. Supports text chat, image generation, and analysis with multiple images and custom questions.271 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate and edit images using multiple models through OpenRouter, with features like style presets, batch operations, and variations.22 npm1MIT

