← Back to Skills Marketplace
Openrouter Image Generation
by
Yihan Wang
· GitHub ↗
· v1.0.0
572
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install openrouter-image-generation
Description
Generate or edit images through OpenRouter's multimodal image generation endpoint (`/api/v1/chat/completions`) using OpenRouter-compatible image models. Use...
Usage Guidance
Before installing: (1) Expect to provide an OpenRouter API key (OPENROUTER_API_KEY or pass --api-key) — the registry metadata did not declare this, so verify you are comfortable supplying that secret. (2) The script sends your prompt and any input image to https://openrouter.ai; do not pass sensitive images or prompts you don't want sent to that service. (3) Examples use 'uv run' and require Python 3.10+; ensure your environment supports the recommended runtime or run the script directly with Python. (4) Review the included generate_image.py yourself (it's small and readable); it only posts to openrouter.ai and writes the base64 image result locally, but you should confirm the endpoint and headers are what you expect. (5) If you need the metadata to be accurate for policy/audit purposes, ask the publisher to update required env vars and declared binaries before deploying broadly.
Capability Analysis
Type: OpenClaw Skill
Name: openrouter-image-generation
Version: 1.0.0
The skill is classified as suspicious due to critical vulnerabilities in `scripts/generate_image.py`. It allows for Local File Inclusion (LFI) by reading arbitrary files specified by `--input-image` and sending their base64-encoded content to the OpenRouter API. Furthermore, it is vulnerable to Local File Write (LFW) and path traversal, as it writes generated images to an unsanitized path specified by `--filename`, potentially allowing an attacker to write files to arbitrary locations on the filesystem. While the `SKILL.md` does not contain malicious prompt injection, it exposes these vulnerable parameters to the agent, which could lead to shell injection if the agent's command execution is not properly sanitized.
Capability Assessment
Purpose & Capability
Name/description, SKILL.md, and the Python script all implement OpenRouter image generation and editing (text->image and image->image). However the registry metadata declares no required environment variables or binaries, while the runtime clearly expects an OPENROUTER_API_KEY (or --api-key) and the README examples use 'uv run'. The missing declared requirements are disproportionate to the skill's real needs and are an inconsistency.
Instruction Scope
SKILL.md instructions and the script stay within the stated purpose: constructing a chat/completions request to openrouter.ai, optionally embedding a local input image as a data URL, and saving the returned base64 image to ~/.openclaw/media/outbound. The instructions do not ask for unrelated files or credentials beyond OpenRouter-specific values. Notes: the doc insists on running the script via an absolute path and examples use 'uv run' (a runtime not declared in metadata).
Install Mechanism
There is no install spec (instruction-only skill plus a local Python script). No external downloads or archive extracts are used. The included Python script is readable and uses only the stdlib for HTTP and base64; no unusual install-time behavior is present.
Credentials
The script requires an OpenRouter API key (OPENROUTER_API_KEY or --api-key) to operate and optionally reads OPENROUTER_SITE_URL and OPENROUTER_APP_NAME. The registry metadata nonetheless lists no required env vars or primary credential. That omission is a meaningful mismatch: the skill cannot function without that secret, so it should have declared it. Other than that, requested environment variables are proportional to the task and there are no unrelated credential requests.
Persistence & Privilege
The skill does not request 'always: true', does not modify other skills, and does not persist or elevate privileges. It only reads local files provided by the user and writes generated images to a contained OpenClaw media directory.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install openrouter-image-generation - After installation, invoke the skill by name or use
/openrouter-image-generation - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of OpenRouter Image Generation skill.
- Allows generating and editing images via OpenRouter-compatible models using the Chat Completions API.
- Supports both text-to-image and image-to-image workflows.
- Fully configurable: choose model, aspect ratio, image size, and advanced provider-specific image configs.
- Handles API key via argument or environment variable, with optional attribution headers.
- Saves generated images to the OpenClaw default outbound media directory for easy integration into other flows.
Metadata
Frequently Asked Questions
What is Openrouter Image Generation?
Generate or edit images through OpenRouter's multimodal image generation endpoint (`/api/v1/chat/completions`) using OpenRouter-compatible image models. Use... It is an AI Agent Skill for Claude Code / OpenClaw, with 572 downloads so far.
How do I install Openrouter Image Generation?
Run "/install openrouter-image-generation" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Openrouter Image Generation free?
Yes, Openrouter Image Generation is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Openrouter Image Generation support?
Openrouter Image Generation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Openrouter Image Generation?
It is built and maintained by Yihan Wang (@bawerlacher); the current version is v1.0.0.
More Skills