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.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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"
- When to use
- API key
- Quick start
- Choosing a model
- Parameter support varies by model
- Writing the prompt
- Editing and reference images
- Worked examples
- Script parameters
- API shape
- Cost
- Notes and caveats
- Related skills
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
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.
