Skip to content
Skillpedia
Images & icons51k · #1873

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

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/generate-image/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/generate-image/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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-image

Or download just the file:

curl -L https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/main/skills/generate-image/SKILL.md -o SKILL.md
Technical 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:

  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

# 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 accepts 512, 1K, 2K, 4K; Flash Lite and Krea accept only 1K. Seedream 5.0 Lite accepts 2K/4K, while 5.0 Pro accepts 1K/2K.
  • --output-format: Riverflow 2.5 Pro accepts png/jpeg/webp; its Fast variant accepts only jpeg. Recraft vector models accept svg. OpenAI models do not advertise this flag.
  • --quality: GPT Image 2.5 Flare/Sunburst also accept xhigh/max; Grok 2.0 accepts only low/medium. Inspect the specific model before selecting a quality value.
  • --background transparent is not available on gpt-image-2 or gpt-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.

repo: K-Dense-AI/scientific-agent-skills

Popularity

GitHub stars
51k
Ranking position
#1873
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills