generate-image
Helps your agent create and edit images using AI. It can generate photos, illustrations, and art from descriptions.
What it does
This tool uses artificial intelligence to create or modify images based on text descriptions. You can ask for photos, illustrations, logos, and more.
When to use it
- ✓Creating an image for a presentation.
- ✓Designing a logo for a new project.
- ✓Editing an existing photo, like changing colors.
Example of what to ask your AI
“Create an image of a cat astronaut floating in space with Earth in the background.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
You describe the image you want, and the AI generates it. If you have an existing image, you can ask to edit it, such as changing the sky to purple.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add K-Dense-AI/scientific-agent-skills --skill generate-imageOr download just the file:
curl -L https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/main/skills/generate-image/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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"
# Edit an existing image
python scripts/generate_image.py "Make the sky purple" -i photo.jpg -o edited.png
Run these commands from the skill directory; input and output paths resolve from the working
directory. Output defaults to generated_image.<ext>, using each image's returned media type
(or .bin when unknown). An explicit output suffix is kept, with a warning on mismatch; the
script does not transcode. OpenRouter and upstream costs are printed separately when supplied.
Then look at the image. Read the file back and check it before using it anywhere: composition, aspect ratio, and any text are all things models get wrong silently.
Choosing a model
Default: google/gemini-3.1-flash-image.
| Need | Model |
|---|---|
| General quality, prompt adherence | google/gemini-3.1-flash-image |
| Highest Gemini tier | google/gemini-3-pro-image |
| Cheap iteration | google/gemini-3.1-flash-lite-image (1K only), openai/gpt-image-1-mini |
| Photoreal control, seeded generation | bytedance-seed/seedream-4.5 |
| Several images per request | bytedance-seed/seedream-4.5, openai/gpt-image-2 (up to 10) |
| Vector / SVG output | recraft/recraft-v4.1-vector |
| Transparent background | openai/gpt-image-1 with --background transparent |
| Legible text inside the image | recraft/recraft-v4.1, sourceful/riverflow-v2.5-pro — see the caveat below |
references/models.md carries the reviewed capability and pricing snapshot. The live listing is authoritative and free:
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
Parameter support varies by model
This is the main thing to get right. Models advertise different parameter sets and different allowed values. The CLI conservatively rejects unadvertised options; individual providers may ignore or normalize some fields. The generic guide can lag the discovery records.
The script checks the model catalogue and requires at least one provider endpoint to accept the complete combination before generation. Model capabilities are a union across endpoints, not a promise that every provider supports them. Unsupported requests fail locally with legal values:
$ python scripts/generate_image.py "abstract pattern" -m openai/gpt-image-2 --background transparent
Error: Request rejected before billing (1 problem):
- background=transparent is not allowed; this model accepts: auto, opaque
Current examples of capability differences (reviewed 2026-09-30):
--resolution: Gemini 3.1 Flash accepts512,1K,2K,4K; Flash Lite and Krea accept only1K. Seedream 5.0 Lite accepts2K/4K, while 5.0 Pro accepts1K/2K.--output-format: Riverflow 2.5 Pro acceptspng/jpeg/webp; its Fast variant accepts onlyjpeg. Recraft vector models acceptsvg. OpenAI models do not advertise this flag.--quality: GPT Image 2.5 Flare/Sunburst also acceptxhigh/max; Grok 2.0 accepts onlylow/medium. Inspect the specific model before selecting a quality value.--background transparentis not available ongpt-image-2orgpt-5.4-image-2.
…
FAQ
Can I create any type of image?
You can create photos, illustrations, concept art, logos, and edit existing images. For technical diagrams like flowcharts, use a different tool.
Do I need an API key to use this?
Yes, you need an OpenRouter API key. Instructions on how to get one are in the documentation.
How do I know which AI model to use?
There are various models available, each with its specialties. Some are better for realistic photos, others for vector illustrations, or for generating multiple images at once. The documentation lists the options.
Details
Original description by the author
Generates or edits 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.
Popularity
- GitHub stars
- 51k
- Ranking position
- #1873
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
13c-metabolic-flux
Estimates metabolic fluxes using carbon-13 isotope tracing data. It is useful for analyzing cellular metabolism and biochemical pathways.
K-Dense-AI/scientific-agent-skills
adaptyv
Designs protein characterization experiments using the Adaptyv API. It helps estimate costs, submit sequences, and monitor lab results.
K-Dense-AI/scientific-agent-skills
aeon
Performs machine learning tasks on time series data. It is useful for classifying, forecasting, detecting anomalies, and finding patterns in sequential data.
K-Dense-AI/scientific-agent-skills
alphagenome
Looks up precomputed genomic effects for genetic variants. It provides scores and explanations to understand the impact of variants on the genome.
K-Dense-AI/scientific-agent-skills
Similar skills
ios-icon-gen
Lets your agent generate icons for iOS apps. It uses Apple symbols or icons from other sources to create the correct files.
affaan-m/ECC
algorithmic-art
Helps your agent create art using code, generating unique images. It's useful when you want original computer-generated art.
anthropics/skills
canvas-design
Helps your agent create beautiful visual art in files. It's useful when you ask for a poster, art, or any static design.
anthropics/skills