Agent skill · Backend & API

generate-image

Generate or edit images with AI models through the OpenRouter Image API (Gemini, Seedream, Recraft, GPT-Image, Riverflow). Use for photos, illustrations, artwork, concept art, visual assets, logos, and image editing or compositing from reference images. For flowcharts, circuits, pathways, and other technical diagrams, use the scientific-schematics skill instead.

K-Dense-AIgithub.com/K-Dense-AIGitHub ↗
claude-codecan modify filesships scriptsMIT
Install
npx skills add K-Dense-AI/scientific-agent-skills --skill generate-image --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 14 KB
Bundled scripts: yes
Version: 3.0
Allowed tools: ReadWriteEditBash
Requires: Requires Python 3.9+ and network access to openrouter.ai. The bundled script uses only the standard library. Image…
Path: skills/generate-image/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 32,619
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Generate Image Generate and edit images through OpenRouter's Image API, which reaches Gemini, Seedream, Recraft, GPT-Image, Riverflow, and roughly thirty other models behind one request shape. ## When to use **Use this skill for:** photos and photorealistic images, illustrations and artwork, concept art, presentation and poster visuals, logos and vector marks, image editing, and compositing from reference images. **Use `scientific-schematics` instead for:** flowcharts, circuit diagrams, biological pathways, system architecture diagrams, CONSORT diagrams, and other technical schematics. ## API key Generation requires an OpenRouter key. The script resolves it in this order: 1. `--api-key` 2. the `OPENROUTER_API_KEY` environment variable 3. `OPENROUTER_API_KEY=` in a `.env` file, searching the working directory upward, then the script's own directory If none is present the script exits with setup instructions. Keys: https://openrouter.ai/keys `--list-models`, `--model-info`, and `--dry-run` need no key. ## Quick start ```bash # Generate python scripts/generate_image.py "A beautiful sunset over mountains" # Edit an existing image python scripts/generate_image.py "Make the sky purple"

What's inside
Steps it walks through
  1. When to use
  2. API key
  3. Quick start
  4. Choosing a model
  5. Parameter support varies by model
  6. Writing the prompt
  7. Editing and reference images
  8. Worked examples
  9. Script parameters
  10. API shape
  11. Cost
  12. Notes and caveats
  13. Related skills
Ships with 2 files
  • references/models.md
  • scripts/generate_image.py
Commands it runs
Generate
python scripts/generate_image.py "A beautiful sunset over mountains"
Edit an existing image
python scripts/generate_image.py "Make the sky purple" -i photo.jpg -o edited.png
python scripts/generate_image.py --list-models            # every model and its allowed values
python scripts/generate_image.py --list-models gemini     # filtered by substring
python scripts/generate_image.py --model-info openai/gpt-image-1   # one model, plus pricing
python scripts/generate_image.py "abstract pattern" -m openai/gpt-image-2 --background transparent
Single-image edit
python scripts/generate_image.py "Add sunglasses to the person" -i portrait.png
More from scientific-agent-skills
All skills →
About this skill
What does the generate-image skill do?

Generate or edit images with AI models through the OpenRouter Image API (Gemini, Seedream, Recraft, GPT-Image, Riverflow). Use for photos, illustrations, artwork, concept art, visual assets, logos, and image editing or compositing from reference images. For flowcharts, circuits, pathways, and other technical diagrams, use the scientific-schematics skill instead.

How do I install it?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill generate-image --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From K-Dense-AI/scientific-agent-skills, a repository with 32,619 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going