image-gen

Installation
SKILL.md

image-gen — generate any image via OpenRouter

One general image generator: describe what you want, optionally pick a model, get a PNG. No forced style — the look comes entirely from your prompt.

API key (one-time setup)

Resolved in order: (1) OPENROUTER_API_KEY env var (preferred), (2) key.txt in this skill folder (one line: the key). key.txt is gitignored — never commit it. Get a key at https://openrouter.ai/keys. Never read another project's .env — keys are per-project. If a key was pasted into chat, suggest rotating it.

Generate

Stdlib Python only — no pip install needed.

python scripts/generate.py --prompt "<your prompt>" --output "out.png"

Options:

  • --model <id> — pick a model (see menu). Default google/gemini-3.1-flash-image-preview.
  • --ref <img> ... — reference image(s) for identity/brand/style or image-to-image (works best with the Gemini default, which blends up to ~14 refs).
  • --aspect <ratio> — e.g. 16:9, 1:1, 9:16 (for the FLUX/Seedream/Grok models).
  • --api {auto|chat|images} — endpoint override; auto picks correctly per model.

Saves the PNG + a <name>.prompt.txt sidecar and prints the path.

Installs
1
First Seen
Aug 28, 2026