Generate Image (OpenRouter)
Generate and edit images across 30+ models (Gemini, Seedream, Recraft, GPT-Image, Riverflow) through one OpenRouter Image API call.
Image & VideoIntermediate★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
Wraps OpenRouter's Image API (POST /api/v1/images) in a standard-library Python script so Claude can produce photorealistic images, illustrations, concept art, vector logos (real SVG), transparent-background assets, and perform edits or multi-reference compositing.
- One request shape for 30+ models: Gemini 3.x, Seedream 4.5, Recraft v4.1, GPT-Image, Riverflow and more
- Preflight validation before billing: each model allows different parameters and different enum values (
--aspect-ratio,--resolution,--seed,--background,--n), and illegal combinations fail locally in under a second with the legal values printed --dry-runprints the exact request body without generating;--list-modelsand--model-infoquery the live catalogue and pricing for free-iis repeatable and accepts local paths, HTTPS URLs, or data URLs for editing and style blending- Prints the real per-request cost afterwards, plus strong guidance on prompt structure, text-rendering limits, and research-ethics rules (generated images are illustrations, never evidence)
For flowcharts, circuits and pathways the doc explicitly redirects you to the scientific-schematics skill.
Who it's for
- Researchers, slide/poster authors and marketers who need visual assets fast
- Developers comparing image models for quality vs. cost
- Designers needing vector output or transparent slide backgrounds
- Anyone who wants tight cost control: draft cheap, render final once
Example uses
- Poster hero image: "Laboratory with modern equipment, photorealistic, wide shot, empty wall on the right, no text" with
--aspect-ratio 21:9 --resolution 2K -o poster/hero.png - Vector logo:
"Minimal geometric fox logo, two colors" -m recraft/recraft-v4.1-vector -o assets/logo.svg - Edit and composite:
"Add sunglasses to the person" -i portrait.png, or blend two styles with-i style_a.png -i style_b.jpg -o blend.png - Free cost check: append
--dry-runto inspect a 4K request body before paying for it
· · · Install guide · · ·
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 && mkdir -p ~/.claude/skills && cp -r /tmp/sas/skills/generate-image ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Confirm Python 3.9+ is available:
python3 --version(the script uses only the standard library). - 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/ - 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.envfile that is listed in.gitignore. - Verify with a free command:
python ~/.claude/skills/generate-image/scripts/generate_image.py --list-models - Restart Claude Code and ask something like "generate a wide photorealistic sunset over mountains for my poster" to trigger the skill.
- While iterating, use
--dry-runor the cheapgoogle/gemini-3.1-flash-lite-imagemodel, then re-render the final wording at higher resolution.
View source on GitHub ↗License: MIT