Skip to main content
skill CX Codex

openrouter-images — Claude Code skill: image generation and editing via OpenRouter

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OpenRouterTeam/skills --skill openrouter-images -a claude-code
Open on GitHub

What openrouter-images 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.

What it helps with

  • 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 for the agent

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

How to install openrouter-images

1Skills CLI (Vercel)

npx skills add OpenRouterTeam/skills --skill openrouter-images -a claude-code

2Manually: put the files in place

~/.claude/skills/openrouter-images/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/openrouter-images/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about openrouter-images

How do I install openrouter-images in Claude Code?

Run npx skills add OpenRouterTeam/skills --skill openrouter-images -a claude-code. The skill lands at ~/.claude/skills/openrouter-images/SKILL.md.

What does openrouter-images do?

It creates images from prompts and modifies existing ones through OpenRouter's Image API. A discovery script tells you which models and parameters are valid.

What do I need before using it?

An OPENROUTER_API_KEY environment variable and npm install in the skill's scripts directory. For editing, the chosen model must accept image input.

Similar skills

All skills for AI and ML →

From the same set8

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor