openrouter-image-generate
БесплатноЗапускает вложенные скриптыНе проверенGenerate images through OpenRouter's dedicated Image API. Use this skill whenever the user wants to create, render, generate, or save images with OpenRouter…
от Yuki001★ 133 звезды на GitHubОб этом скилле
OpenRouter Image Generation
Use this skill to generate images with OpenRouter's dedicated Image API and save the returned base64 image bytes to files.
Default workflow
- Use the OpenRouter API key from the current environment first. If it is missing, rely on the bundled script's automatic lookup of the nearest project
.envfile containingOPENROUTER_API_KEY, unless the user explicitly provides another environment variable name or env file path. - Pick a model from the user's request. If no model is specified, use
bytedance-seed/seedream-4.5as a practical default and mention that the user can override it. - Use the bundled script at
scripts/openrouter_image_generate.pyrather than constructing requests manually. - Save generated images to a user-visible output directory, defaulting to the current working directory if the user did not specify one.
- When the user or agent requires transparency, prefer a model/endpoint that supports native transparent output and pass
--background transparentwithout--remove-background. - Use
--remove-backgroundonly when the user or agent requires transparency and the selected model/endpoint does not support native transparent backgrounds. Follow the transparent-background workflow below; the flag assumes a chroma-key prompt and always processes final PNG/WebP outputs locally. - Do not print API keys. Do not put API keys directly on the command line because shell history may capture them.
Bundled script
Run from this skill directory or pass the script path directly:
python scripts/openrouter_image_generate.py generate \
--prompt "a red panda astronaut floating in space, studio lighting" \
--model "bytedance-seed/seedream-4.5" \
--resolution 2K \
--aspect-ratio 16:9 \
--output-dir ./outputs
The script reads OPENROUTER_API_KEY from the current environment first. If it is not set, it automatically searches from the current working directory upward for the nearest .env file and reads OPENROUTER_API_KEY=... from there. Use --api-key-env MY_OPENROUTER_KEY if the key uses a different variable name, or --env-file ./path/to/.env to force a specific env file.
Common generation options
Pass only the options the user asks for or that are clearly needed:
--prompt TEXTis required for generation.--model MODEL_IDdefaults tobytedance-seed/seedream-4.5.--n 1..10requests multiple images when supported by the endpoint.--resolution 512|1K|2K|4Ksets the normalized resolution tier.--aspect-ratio 1:1|16:9|9:16|4:3|3:4|...sets the normalized ratio.--size 2048x2048or--size 2Kis the shorthand alternative. Do not combine explicit pixel sizes with mismatched--resolutionor--aspect-ratio.--quality auto|low|medium|highcontrols provider quality where supported.--output-format png|jpeg|webp|svgcontrols the saved file type when supported.--background auto|transparent|opaquesets background where supported.--remove-backgroundalways runs the bundled chroma-key remover on final PNG/WebP outputs. It is a local option and is not sent to OpenRouter.--output-compression 0..100applies to jpeg/webp where supported.--seed INTEGERrequests deterministic generation where supported.--reference PATH_OR_URLcan be passed multiple times for image-to-image/reference inputs. Local files are converted to data URLs.--provider-options-json '{"black-forest-labs":{"steps":40,"guidance":3}}'passes provider-specific options underprovider.options.--provider-options-file options.jsonis safer for larger provider options.--raw-json payload.jsoncan merge additional OpenRouter-compatible request fields into the payload.--dry-runprints the request payload without making a network call.
Model discovery
List available image models:
python scripts/openrouter_image_generate.py models
Show endpoint/provider capabilities for one model:
python scripts/openrouter_image_generate.py endpoints --model bytedance-seed/seedream-4.5
Use discovery before passing unusual parameters. OpenRouter image models differ by provider, and unsupported parameters may be ignored or rejected.
Output behavior
The script writes a single generated image as <output-prefix>.<ext> and multiple generated images as <output-prefix>_001.<ext>, <output-prefix>_002.<ext>, and so on. SVG outputs are decoded as text bytes and saved with .svg; raster outputs are decoded from base64 and saved with the requested or returned media type.
The script also writes a JSON metadata file by default with the request payload minus secrets, OpenRouter usage, created timestamp, and generated file paths. Use --no-metadata to skip it.
When --remove-background is present, every final PNG/WebP output is processed with the bundled scripts/remove_chroma_key.py copy, regardless of its existing alpha values. JPEG, SVG, and streaming partial previews are never proces
Установить openrouter-image-generate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл openrouter-image-generate?
Generate images through OpenRouter's dedicated Image API. Use this skill whenever the user wants to create, render, generate, or save images with OpenRouter, including text-to-image, image-to-image/reference images, choosing OpenRouter image models, listing image models, setting resolution/aspect ratio/quality/output format, or passing provider-specific image options. Prefer the bundled Python script so API options are passed explicitly as command-line arguments instead of hand-written ad hoc curl requests.
Как установить скилл openrouter-image-generate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл openrouter-image-generate запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This 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…
от Anthropic