AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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 bundled scripts/generate_image.py to produce photos, illustrations, concept art, presentation visuals and logos (including SVG vector output).
  • Edits and composites from reference images with a repeatable -i flag 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-info and --dry-run are 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

  1. Wide poster hero: --aspect-ratio 21:9 --resolution 2K with the prompt reserving empty space on the right for a title.
  2. Targeted edit: "Make the sky purple" -i photo.jpg -o edited.png, feeding the previous output back to refine instead of restart.
  3. Vector logo via -m recraft/recraft-v4.1-vector, or a transparent slide background via openai/gpt-image-1 --background transparent.
  4. Cost control: run --dry-run before 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)
  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 AI 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.

  1. Open a terminal and clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  2. Copy the skill into your Claude Code skills folder: mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/generate-image ~/.claude/skills/
  3. Confirm Python 3.9+ is available: python3 --version (the script uses only the standard library, so no pip installs).
  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 git-ignored .env file).
  6. Verify with a free command: python3 ~/.claude/skills/generate-image/scripts/generate_image.py --list-models gemini
  7. 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.