- Home
- Skills
- K Dense Ai
- Claude Scientific Skills
- Generate Image
generate-image_skill
- Python
7.4k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill k-dense-ai/claude-scientific-skills --skill generate-image- SKILL.md7.6 KB
Overview
This skill generates and edits high-quality images using OpenRouter models such as FLUX.2 Pro and Gemini 3 Pro. It is designed for general-purpose image creation: photos, illustrations, concept art, and visual assets for presentations and documents. The tool handles both generation from text prompts and image editing using an input file.
How this skill works
The script sends text prompts (and optional input images) to OpenRouter image models and receives base64-encoded image results which are saved as PNG files. It detects an OpenRouter API key from a .env file or environment variables, supports model selection, and provides clear error messages for missing keys, API errors, or dependency issues.
When to use it
- Create photorealistic images or stylized artwork from text prompts
- Edit existing images (remove text, change colors, add objects)
- Generate visuals for presentations, posters, or scientific illustrations
- Produce concept art and visual assets for marketing or documentation
- Quickly prototype multiple image variants with different prompts or models
Best practices
- Be specific and concrete in prompts (mention colors, lighting, composition and focal elements)
- For editing, reference exact elements in the image (e.g., "change sky to orange sunset")
- Choose model by need: gemini-3-pro or flux.2-pro for high quality and editing; flux.2-flex for cheap generation-only runs
- Keep input images in supported formats (PNG, JPEG, GIF, WebP) and provide high-resolution inputs for best edits
- Store your OpenRouter API key securely in a .env file or environment variable; the script can be given an --api-key override
Example use cases
- Generate a photorealistic lab scene for a poster background
- Create a concept illustration for a scientific paper (e.g., immune cells vs tumor cells)
- Edit a portrait to add or remove accessories (sunglasses, text removal)
- Produce slide backgrounds or hero images for conference posters
- Batch-generate multiple asset variants by running the script with different prompts and output paths
FAQ
Use google/gemini-3-pro-image-preview or black-forest-labs/flux.2-pro for high-quality generation and editing. Use flux.2-flex for cheaper, generation-only runs.
How do I provide my API key?
Place OPENROUTER_API_KEY=your-key in a .env file or set the environment variable. You can also pass --api-key to the script to override.
What image formats are supported for editing?
Supported input formats include PNG, JPEG, GIF, and WebP. Outputs are saved as PNG by default.