openrouter-image-generate
Installation
SKILL.md
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: