
Generate Image
This is a straightforward wrapper around OpenRouter's image generation APIs, specifically FLUX.2 and Gemini 3.1 Flash Image Preview. You call a Python script with a text prompt and it spits out a PNG. It handles both generation and editing if you pass an input image. The documentation is clear about when to use this versus their scientific-schematics skill, which is helpful since that's a real decision point. Setup requires an OpenRouter API key in a .env file. It's basic glue code, but sometimes that's exactly what you need when you want to generate images from the command line without writing your own base64 encoding logic.
- skills.sh installs
- 2.1K
- GitHub stars
- 56.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add k-dense-ai/scientific-agent-skills --skill generate-image --agent claude-codeInstalls into .claude/skills of the current project.
Files
Generate Image
Generate and edit images through OpenRouter's Image API, which reaches Gemini, Seedream, Recraft, GPT-Image, Riverflow, and 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:
--api-key- the
OPENROUTER_API_KEYenvironment variable OPENROUTER_API_KEY=in a.envfile, 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
# Generate
python scripts/generate_image.py "A beautiful sunset over mountains"
Sponsors
Details
- Repository
- github.com/k-dense-ai/scientific-agent-skills
- Categories
- Backend & APIs, AI & Agent Building, Design & UI/UX
- First seen
- Jun 3, 2026
More from k-dense-ai/scientific-agent-skills
All 137- Dask2.1K
- Infographics2.1K
- Market Research Reports2.1K
- Matlab2.1K
- Get Available Resources2.1K
- Optimize For Gpu2.1K
- Pymc2.1K
- Umap Learn2.1K
- Parallel Web2.1K
- Venue Templates2.1K
- Scikit Survival2.1K
- Open Notebook2.1K
- Torch Geometric2.1K
- Biopython2.1K
- Research Lookup2.1K
- Timesfm Forecasting2.1K
- Geopandas2.1K
- Stable Baselines32.1K
- Consciousness Council2.1K
- Simpy2.1K
- Pymoo2.1K
- Scikit Bio2.1K
- Geomaster2.1K
- What If Oracle2.1K