Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

Generate Image (OpenRouter)

Generate and edit images across 30+ models (Gemini, Seedream, Recraft, GPT-Image, Riverflow) through one OpenRouter Image API call.

Image & VideoIntermediate33,0303,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-run prints the exact request body without generating; --list-models and --model-info query the live catalogue and pricing for free
  • -i is 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

  1. 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
  2. Vector logo: "Minimal geometric fox logo, two colors" -m recraft/recraft-v4.1-vector -o assets/logo.svg
  3. 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
  4. Free cost check: append --dry-run to inspect a 4K request body before paying for it

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Confirm Python 3.9+ is available: python3 --version (the script uses only the standard library).
  2. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Copy the skill into your Claude Code skills folder: mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/generate-image ~/.claude/skills/
  4. Create an API key at https://openrouter.ai/keys and add credit — image generation is billed per request.
  5. Export the key: export OPENROUTER_API_KEY=sk-or-... (add it to your shell profile), or put OPENROUTER_API_KEY=... in a .env file that is listed in .gitignore.
  6. Verify with a free command: python ~/.claude/skills/generate-image/scripts/generate_image.py --list-models
  7. Restart Claude Code and ask something like "generate a wide photorealistic sunset over mountains for my poster" to trigger the skill.
  8. While iterating, use --dry-run or the cheap google/gemini-3.1-flash-lite-image model, then re-render the final wording at higher resolution.