AI Image Generation (OpenRouter)
Generate and edit images through the OpenRouter Image API, reaching Gemini, Seedream, Recraft, GPT-Image and ~30 other models with one consistent CLI.
Image & VideoIntermediate★ 33,030⑂ 3,248AI score 10/10Last updated: Aug 9, 2026
What it does
- Calls the OpenRouter Image API (
POST /api/v1/images) via the bundledscripts/generate_image.pyto produce photos, illustrations, concept art, presentation visuals and logos (including SVG vector output). - Edits and composites from reference images with a repeatable
-iflag that accepts local paths, HTTP(S) URLs or data URLs. - Validates model-specific parameters (
--resolution,--aspect-ratio,--seed,--background,--n) against the live catalogue before you are billed, printing the legal values when a flag is unsupported. --list-models,--model-infoand--dry-runare free; each real run prints the actual per-request cost.- Includes a prompt recipe (subject, medium/style, lighting/palette, composition, what to avoid), a model-selection table, cost comparisons, and clear rules about never presenting generated images as data.
Who it's for
- Anyone producing slide, poster or blog visuals without a designer on hand.
- Designers and marketers who want to compare models and iterate cheaply before paying for a high-res render.
- Researchers needing conceptual illustrations while respecting journal disclosure rules for AI imagery.
Examples
- Wide poster hero:
--aspect-ratio 21:9 --resolution 2Kwith the prompt reserving empty space on the right for a title. - Targeted edit:
"Make the sky purple" -i photo.jpg -o edited.png, feeding the previous output back to refine instead of restart. - Vector logo via
-m recraft/recraft-v4.1-vector, or a transparent slide background viaopenai/gpt-image-1 --background transparent. - Cost control: run
--dry-runbefore an expensive 4K request to check the exact request body for free.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/generate-image/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/generate-image folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/generate-image/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/sas && cp -r /tmp/sas/skills/generate-image ~/.claude/skills/generate-image⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy the skill into your Claude Code skills folder:
mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/generate-image ~/.claude/skills/ - Confirm Python 3.9+ is available:
python3 --version(the script uses only the standard library, so no pip installs). - Create an API key at https://openrouter.ai/keys and add credit — image generation is billed per request.
- Export the key:
export OPENROUTER_API_KEY=sk-or-...(add it to your shell profile, or putOPENROUTER_API_KEY=...in a git-ignored.envfile). - Verify with a free command:
python3 ~/.claude/skills/generate-image/scripts/generate_image.py --list-models gemini - Restart Claude Code and ask something like "generate a sunset over mountains for my slide". Always open the resulting file to check composition and any text before using it.
View source on GitHub ↗License: MIT