openrouter-images
Generate images from text prompts and edit existing images using OpenRouter's dedicated Image API. Use when the user asks to create, generate, or make an…
от OpenRouterTeam★ 334 звезды на GitHub
Установить openrouter-images в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
OpenRouter Images
Generate images from text prompts and edit existing images via OpenRouter's dedicated Image API (POST /api/v1/images). The skill also discovers which models exist and which parameters each one accepts, so you pick a valid model and options instead of guessing.
Prerequisites
The OPENROUTER_API_KEY environment variable must be set. Get a key at https://openrouter.ai/keys
Discovery (discover.ts) is public and works without a key; generation and editing require one.
First-Time Setup
cd <skill-path>/scripts && npm install
Decision Tree
Pick the right script based on what the user is asking:
| User wants to... | Script | Example |
|---|---|---|
| See which image models exist and what they support | discover.ts |
"What image models can I use?" |
| Check the exact params a specific model accepts | discover.ts <model> |
"Does seedream support 4K?" |
| Generate an image from a text description | generate.ts "prompt" |
"Create an image of a sunset over mountains" |
| Generate with specific options | generate.ts "prompt" --aspect-ratio 16:9 |
"Make a wide landscape image of a forest" |
| Generate with a different model | generate.ts "prompt" --model <id> |
"Generate using gemini 3.1 flash lite image" |
| Edit or modify an existing image | edit.ts path "prompt" |
"Make the sky purple in photo.png" |
| Transform an image with instructions | edit.ts path "prompt" |
"Add a party hat to the animal in this image" |
Discover Capabilities First
Different models accept different parameters. Rather than hardcoding flags and hitting 400s, discover what's available before generating.
List every image model with a compact capability summary:
cd <skill-path>/scripts && npx tsx discover.ts
Each entry reports the model id, input_modalities / output_modalities (image input means it supports editing / image-to-image), supports_streaming, and a supported_parameters map — the union of what any endpoint of that model accepts.
Inspect one model's definitive per-endpoint capabilities:
cd <skill-path>/scripts && npx tsx discover.ts bytedance-seed/seedream-4.5
This calls GET /api/v1/images/models/{author}/{slug}/endpoints and returns, per provider endpoint:
| Field | Meaning |
|---|---|
provider_name / provider_slug |
The serving provider. Use provider_slug as the key in --provider-options. |
supported_parameters |
The exact parameters this endpoint accepts, with allowed values. |
allowed_passthrough_parameters |
Provider-specific keys you can pass under --provider-options (e.g. steps, guidance). |
supports_streaming |
Whether this endpoint streams. |
pricing |
Per-image / per-token pricing lines. |
Capability values print as readable strings: an enum shows as 1K | 2K | 4K, a range as 0–100, a boolean as supported. A parameter that's absent is unsupported — don't send it.
Generate Image
Create a new image from a text prompt:
cd <skill-path>/scripts && npx tsx generate.ts "a red panda wearing sunglasses"
cd <skill-path>/scripts && npx tsx generate.ts "a futuristic cityscape at night" --aspect-ratio 16:9
cd <skill-path>/scripts && npx tsx generate.ts "pixel art of a dragon" --output dragon.png
cd <skill-path>/scripts && npx tsx generate.ts "a watercolor painting" --model google/gemini-3.1-flash-lite-image --resolution 1K
Edit Image
Modify an existing image with a text prompt. The source image is sent as an image-to-image reference (input_references), so use a model whose input_modalities include image — check with discover.ts <model>.
cd <skill-path>/scripts && npx tsx edit.ts photo.png "make the sky purple"
cd <skill-path>/scripts && npx tsx edit.ts avatar.jpg "add a party hat" --output avatar-hat.png
cd <skill-path>/scripts && npx tsx edit.ts scene.png "convert to watercolor style" --model google/gemini-3.1-flash-lite-image
Supported input formats: .png, .jpg, .jpeg, .webp, .gif
Options
Both generate.ts and edit.ts accept the same flags. Only pass parameters the target model supports — verify with discover.ts <model>.
| Flag | Description | Default |
|---|---|---|
--model <id> |
OpenRouter model ID | google/gemini-3.1-flash-image-preview |
--output <path> |
Output file path | image-YYYYMMDD-HHmmss.png |
--aspect-ratio <r> |
Aspect ratio (e.g. 16:9, 1:1, 4:3) |
Model default |
--resolution <t> |
Resolution tier (512, 1K, 2K, 4K) |
Model default |
--size <s> |
Shorthand: a tier (2K) or explicit pixels (2048x2048) |
Model default |
--quality <q> |
auto, low, medium, or high |
Model default |
--output-format <f> |
png, jpeg, webp, or svg (vector models) |
Model default |
--background <b> |
auto, transparent, or opaque |
Model default |
--output-compression <n> |
Compression 0–100 for webp/jpeg | Model default |
--n <count> |
Number of images t |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- README.md
- scripts/discover.ts
- scripts/edit.ts
- scripts/generate.ts
- scripts/lib.ts
- scripts/package-lock.json
- scripts/package.json
FAQ
Что делает скилл openrouter-images?
Generate images from text prompts and edit existing images using OpenRouter's dedicated Image API. Use when the user asks to create, generate, or make an image, picture, or illustration from a description, or wants to edit, modify, transform, or alter an existing image with a text prompt.
Как установить скилл openrouter-images?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл openrouter-images запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…