openrouter

Generate branded images via OpenRouter chat completions with image-to-image style transfer.

8|1|Updated Jan 21, 2024
One-click install
npx skills add https://github.com/azigler/dotfiles --skill openrouter-azigler
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: openrouter
Source: https://github.com/azigler/dotfiles/tree/main/agents/skills/openrouter
Command: npx skills add https://github.com/azigler/dotfiles --skill openrouter-azigler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you generate high-quality branded images (and optional text) through the OpenRouter API while preventing accidental spend by requiring explicit user invocation and cost awareness before any call.

Core Features & Use Cases

  • Cost-aware image generation: Safely gates execution with explicit user requests and encourages confirming expected per-image cost before generating.
  • Image-to-image with references: Supports multi-reference style transfer by embedding one or more reference images into the request payload.
  • Local asset output: Saves generated images directly to a user-specified path (so you don’t re-pay for results you didn’t persist).
  • Auth handling: Reads OPENROUTER_API_KEY from the environment or from ~/.config/openrouter/api-key, then calls the OpenRouter OpenAI-compatible endpoint.

Quick Start

Ask to generate an image and save it to disk by running: openrouter-image.sh "Create a logo for my brand: ..." ./logo-v1.png.

Frequently Asked Questions about openrouter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate branded images using the OpenRouter API?▼

To generate branded images with OpenRouter, you use the chat completions endpoint with an OpenAI-compatible image response payload, providing your API key and output path to save the base64-decoded image locally.

Can I use reference images for style transfer with OpenRouter image generation?▼

Yes, OpenRouter image generation supports image-to-image transformations by embedding one or more reference images into the request payload, enabling cohesive style transfer across your generated assets and documents.

Do I need an OpenRouter API key to generate images?▼

Yes, you need an OPENROUTER_API_KEY set in your environment or stored at ~/.config/openrouter/api-key to authenticate requests to the OpenRouter endpoint for image generation.

How does cost tracking work for image generation via OpenRouter?▼

Cost tracking for OpenRouter image generation works by requiring explicit user invocation and confirming expected per-image cost before generating, then reporting token usage data after the API response is received.

What's the best way to save generated images locally from an OpenAI-compatible API?▼

The best way to save generated images locally is to decode the returned base64 data URL from the API response directly into a user-specified file path, ensuring you persist results without re-paying for them.

Are there limitations to using OpenRouter for brand asset generation?▼

OpenRouter brand asset generation requires explicit user invocation to prevent accidental spend, is limited to OpenAI-compatible image response payloads, and depends on valid API authentication via OPENROUTER_API_KEY for execution.