generate-image
Generates or edits images with AI models through the OpenRouter Image API (Gemini, Seedream, Recraft, GPT-Image, Riverflow).
Skill by K-Dense-AI
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/k-dense-ai-generate-image
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing, research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/generate-image
Tools it pre-approves 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadWriteEditBash
What's inside
- Skill name
generate-image- Description
- 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.
- License
- MIT
- Compatibility
- Requires Python 3.9+ and network access to openrouter.ai. The bundled script uses only the standard library. Image generation requires the OPENROUTER_API_KEY credential and bills per request; listing models, inspecting a model, and --dry-run do not. Targets the OpenRouter Image API (POST /api/v1/images) documentation and public discovery reviewed on 2026-09-30.
- Allowed tools
- Read, Write, Edit, Bash
- Metadata
- version: 3.3 · skill-author: K-Dense Inc. · last-reviewed: 2026-09-30
- Instructions
- 323 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Pre-approves any shell command
- Instructions call the network
Files (3)
- SKILL.md
- models.md · references/
- generate_image.py · scripts/
SKILL.md (first lines)
# 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 ```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" -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](references/models.md) carries the reviewed capability and pricing snapshot. The live listing is authoritative and free: ```bash 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: ```console $ 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`. It is advertised on GPT Image 1 and 2.5. Do not combine transparency with JPEG; when no output format is selectable, inspect the returned file for an actual alpha channel. - `--aspect-ratio`: GPT-5 Image and Mini now accept `1:1`, `3:2`, `2:3`, `auto`; GPT-5.4 Image 2 also accepts wider ratios. None accept a resolution flag in this snapshot. - `--n` is an upper bound, not a guarantee: providers may return fewer images. Seedream 4.5 caps at 10, Seedream 5.0 Lite at 4, and 5.0 Pro at 1. Krea does not advertise `n`. - `--seed` is available on Seedream, Krea, Qwen and FLUX, but not Gemini or OpenAI. Keep the model/provider, prompt and parameters fixed; a seed is not a cross-version guarantee. `--dry-run` performs free discovery and prints the request without generating. If discovery fails, the command stops; `--no-preflight` explicitly bypasses it. Combining both flags is an offline payload inspection, **not** validation of provider support. ## Writing the prompt Prompt quality decides output quality more than model choice does. Name, in one sentence each: 1. **Subject** — what is in frame, and how much of it. "A single pipette tip above a 96-well plate." 2. **Medium and style** — photograph, watercolour, 3D render, flat vector, scientific illustration. 3. **Lighting and palette** — "soft diffuse lighting, cool blue and white palette." 4. **Composition** — "wide shot, subject left of centre, empty space on the right for a title." 5. **What to avoid** — "no text, no labels, no watermark." Asking for empty space where a caption or title will go is the single most useful compositional instruction for posters and slides.
From K-Dense-AI/scientific-agent-skills, MIT.
More from K-Dense-AI/scientific-agent-skills
- 0.699score
13c-metabolic-flux
K-Dense-AI
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps, mfapy isotope simulation…
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
adaptyv
K-Dense-AI
Uses the Adaptyv Bio Foundry API and Python SDK to design protein characterization experiments, estimate costs, submit sequences, monitor laboratory progress…
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
exploratory-data-analysis
K-Dense-AI
Performs bounded, local exploratory analysis of explicitly supported scientific files.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
openpiv
K-Dense-AI
Performs Particle Image Velocimetry (PIV) analysis with OpenPIV.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
citation-management
K-Dense-AI
Comprehensive citation management for academic research.
SkillAFreshness: A★ 54.4KClaude Code - 0.699score
parallel-web
K-Dense-AI
Uses Parallel CLI for web search, URL extraction, deep research, structured data enrichment, entity discovery, and recurring web monitoring.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
scientific-schematics
K-Dense-AI
Generates scientific diagram drafts using Nano Banana 2 AI with smart iterative refinement.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
glycoengineering
K-Dense-AI
Analyzes and engineers protein glycosylation by scanning canonical N-glycosylation sequons, describing S/T-rich regions, checking curated glycan evidence, and…
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
venue-templates
K-Dense-AI
Prepares journal manuscripts, conference papers, research posters, and grant documents using venue-specific formatting guidance and bundled LaTeX scaffolds.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
uncertainty-and-units
K-Dense-AI
Tracks physical units and propagates measurement uncertainty in scientific calculations using pint and uncertainties.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
ginkgo-cloud-lab
K-Dense-AI
Guides protocol selection, input preparation, pricing checks, and browser ordering on Ginkgo Bioworks Cloud Lab (cloud.ginkgo.bio).
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
alphagenome
K-Dense-AI
Looks up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and…
SkillAFreshness: A★ 54.4KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 54,411
- Forks
- 4,797
- Open issues
- 8
- Last commit (this folder)
- Oct 1, 2026 (26 days ago)
- Last release
- Oct 1, 2026 (26 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 3.3
- License
- MIT
- Website
- arxiv.org/abs/2609.00065
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from K-Dense-AI
- 0.699score
exploratory-data-analysis
K-Dense-AI
Performs bounded, local exploratory analysis of explicitly supported scientific files.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
citation-management
K-Dense-AI
Comprehensive citation management for academic research.
SkillAFreshness: A★ 54.4KClaude Code - 0.699score
glycoengineering
K-Dense-AI
Analyzes and engineers protein glycosylation by scanning canonical N-glycosylation sequons, describing S/T-rich regions, checking curated glycan evidence, and…
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
openpiv
K-Dense-AI
Performs Particle Image Velocimetry (PIV) analysis with OpenPIV.
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
ginkgo-cloud-lab
K-Dense-AI
Guides protocol selection, input preparation, pricing checks, and browser ordering on Ginkgo Bioworks Cloud Lab (cloud.ginkgo.bio).
SkillAFreshness: A★ 54.4KClaude Code +9 - 0.699score
parallel-web
K-Dense-AI
Uses Parallel CLI for web search, URL extraction, deep research, structured data enrichment, entity discovery, and recurring web monitoring.
SkillAFreshness: A★ 54.4KClaude Code +9
Cite this page
generate-image skill. Agent Mart. https://agentmart.dev/skills/k-dense-ai-generate-image (last updated 2026-10-24)