# openrouter-images

This skill talks to OpenRouter's Image API to draw from a text prompt or rework an existing picture with instructions. It also lists which models exist and what they accept.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 471 installs · ★ 306
- Author: OpenRouterTeam
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/OpenRouterTeam/skills/tree/HEAD/skills/openrouter-images/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/openrouter-images

## What it does

Two TypeScript scripts do the work. `generate.ts` posts your prompt to `/api/v1/images` and writes the result to disk. `edit.ts` takes a local file, sends it as an image-to-image reference, and applies whatever change you described. A third script, `discover.ts`, prints the available image models with their parameters.

Models differ in what they accept, so guessing flags gets you a 400. Run `npx tsx discover.ts <model>` first: it reports allowed values per provider endpoint, including passthrough keys usable in `--provider-options`. Editing has its own condition: only a model whose `input_modalities` include `image` can take a source picture.

Set `OPENROUTER_API_KEY` in your environment before generating or editing; keys are issued at openrouter.ai/keys. Then run `npm install` inside the skill's `scripts` folder. Discovery works without a key, which is handy for picking a model. `generate.ts` and `edit.ts` share flags like `--model`, `--aspect-ratio`, `--resolution`, `--output-format` and `--n`.

Editable inputs: `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`. Unless you name another model, calls go to `google/gemini-3.1-flash-image-preview`. The script prints the USD cost to stderr whenever the API reports it.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-images -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/openrouter-images/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/openrouter-images/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-images -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/openrouter-images/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-images -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/openrouter-images/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install OpenRouterTeam/skills openrouter-images
```

2. **Manually: put the files in place**
- File: `.github/skills/openrouter-images/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-images -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/OpenRouterTeam/skills --path skills/openrouter-images
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/openrouter-images/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add OpenRouterTeam/skills --skill openrouter-images -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/OpenRouterTeam/skills/tree/HEAD/skills/openrouter-images/SKILL.md

## When to use it
- produce an illustration from a written description
- change the sky or style in an existing photo
- check which image models exist and what each one accepts
- get a wide image at a given aspect ratio
- save several variants from a single request

## Example prompts
- Generate a wide sunset over mountains at 16:9
- Make the sky purple in `photo.png`
- Which models support a 4K resolution?

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 349800 installs

From the same set: [openrouterteam/skills](https://affpapa.org/en/nevibecode/by/openrouterteam/skills.md) — 8 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
