2.6k
GitHub Stars
2
Bundled Files
6 months ago
Catalog Refreshed
7 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill openrouter-image-generation- _meta.json311 B
- SKILL.md5.7 KB
Overview
This skill integrates OpenRouter image-capable models to generate or edit images via the Chat Completions endpoint. It provides a CLI-driven workflow for text-to-image and image-to-image requests, supports provider-specific image_config options, and respects OpenRouter API key and attribution headers. Use it when you need reproducible image outputs saved to the OpenClaw outbound delivery path for downstream automation.
How this skill works
The script calls OpenRouter's /api/v1/chat/completions with modalities for image and text, sending a user prompt plus an optional input image for edits. You must specify an OpenRouter-compatible model and may pass aspect ratio, image size, or a JSON image_config for provider-specific options. The first returned image is decoded (base64 or data URL) and saved to the configured outbound filename, with the path printed on success.
When to use it
- Create new images from text descriptions using OpenRouter models.
- Perform targeted edits on existing images (image-to-image) with explicit instructions.
- Require OpenRouter-specific model features or provider image_config options.
- Automate image production into an OpenClaw pipeline using the outbound directory.
- Iterate quickly on drafts before switching to higher quality settings.
Best practices
- Always set --model explicitly; there is no built-in default model.
- Use small/fast settings for drafts (e.g., --image-size 1K), then increase for final outputs.
- Save outputs to ~/.openclaw/media/outbound so other flows can pick them up.
- Provide explicit editing prompts (use the provided "Change ONLY:" template for precise edits).
- If a request fails, remove unsupported image_config keys or try a different model.
Example use cases
- Generate product photos for marketing iterations and save them with timestamped filenames.
- Edit skies or backgrounds in photos by providing an input image and a precise edit prompt.
- Quickly iterate design variations by changing prompts and output filenames between runs.
- Use provider-specific image_config JSON to enable advanced features supported by a model.
- Integrate into CI/CD or content pipelines that expect new images in the OpenClaw outbound folder.
FAQ
It checks --api-key first, then the OPENROUTER_API_KEY environment variable.
What if I get no image in the response?
That usually means the chosen model or request format doesn't support image output; try a different model or remove unsupported image_config fields.