Agent skill · AI & Agents

openrouter-text2image

Generate images via OpenRouter. Default model openai/gpt-5.4-image-2; any image-modality model can be passed via --model.

QinghongLingithub.com/QinghongLinGitHub ↗
claude-codeships scriptsMIT
Install
npx skills add QinghongLin/data2story-skill --skill openrouter-text2image --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 1 KB
Bundled scripts: yes
Path: skills/data2story-pro/designer/scripts/openrouter-text2image/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 149
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# openrouter-text2image Text → image via OpenRouter. Default model: `openai/gpt-5.4-image-2`. Other supported models (override with `--model`): - `google/gemini-3.1-flash-image-preview` (Nano Banana 2) - any other OpenRouter image-modality model ## Usage Resolve `TOOL_DIR` = the directory containing this `SKILL.md`. Commands below use `TOOL_DIR` as a symbolic placeholder; replace it with the resolved, quoted path before running Bash. ```bash export OPENROUTER_API_KEY=sk-or-v1-... python3 TOOL_DIR/scripts/generate_image.py \ --prompt "Editorial illustration: a neon-lit skateboard at dusk, dramatic shadows" \ --download PROJECT_DIR/assets/teaser.png ``` ## Flags | Flag | Default | Description | |---|---|---| | `--prompt` | required | Text prompt | | `--download` | required | Output file path (PNG) | | `--model` | `openai/gpt-5.4-image-2` | Override with any OpenRouter image-modality model | ## Notes - Request uses `POST /api/v1/chat/completions` with `modalities: ["image","text"]`. - Images are returned as base64 data URLs in the assistant message; the script decodes and writes to disk. - For edits/inpainting, include `messages` with both text and image-URL content parts — the script

What's inside
Steps it walks through
  1. Usage
  2. Flags
  3. Notes
Ships with 2 files
  • config.json
  • scripts/generate_image.py
Commands it runs
export OPENROUTER_API_KEY=sk-or-v1-...
python3 TOOL_DIR/scripts/generate_image.py \
More from data2story-skill
All skills →
About this skill
What does the openrouter-text2image skill do?

Generate images via OpenRouter. Default model openai/gpt-5.4-image-2; any image-modality model can be passed via --model.

How do I install it?

Run `npx skills add QinghongLin/data2story-skill --skill openrouter-text2image --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From QinghongLin/data2story-skill, a repository with 149 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going