keirouter-image

keirouter-image is a skill for Claude Code, Codex from mydisha/keirouter. It costs 74 tokens per session (840 once invoked), scanned A, original, MIT.

An image-generation tool that sends a text description to KeiRouter and returns an image from supported image models.

In plain words
What is it for?
Use it to create pictures, illustrations, or other text-to-image outputs, with options such as image size, quality, count, and response format.
Why use it?
It gives an application one interface for creating images through different providers, instead of integrating each image service separately.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create pictures, illustrations, or other text-to-image outputs, with options such as image size, quality, count, and response format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mydisha/keirouter/keirouter-image
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mydisha/keirouter --skill keirouter-image
Clone the repo
git clone --depth 1 https://github.com/mydisha/keirouter

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for keirouter-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/mydisha/keirouter/keirouter-image/github.svg)](https://agentmods.dev/skills/mydisha/keirouter/keirouter-image)
Your own site
<a href="https://agentmods.dev/skills/mydisha/keirouter/keirouter-image"><img src="https://agentmods.dev/badge/skills/mydisha/keirouter/keirouter-image/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for keirouter-image

Your own site · 80×15
<a href="https://agentmods.dev/skills/mydisha/keirouter/keirouter-image"><img src="https://agentmods.dev/badge/skills/mydisha/keirouter/keirouter-image.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 840 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 8
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Data Exfiltration · line 38
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.00840
Opus 5.5 $0.00030 $0.00336
Sonnet 5.5 $0.00015 $0.00168
Haiku 4.5 $0.00007 $0.00084

Measured 12d ago against content hash 157daa49e475, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

keirouter-image scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl $KEIROUTER_URL/v1/models/image | jq '.data[].id'
skills/keirouter-image/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

KeiRouter — Image Generation

Requires KEIROUTER_URL (and KEIROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/mydisha/keirouter/main/skills/keirouter/SKILL.md for setup.

Discover

curl $KEIROUTER_URL/v1/models/image | jq '.data[].id'
# Per-model params/options (size enum, quality enum)
curl "$KEIROUTER_URL/v1/models/info?id=openai/dall-e-3"

Endpoint

POST $KEIROUTER_URL/v1/images/generations (OpenAI-compatible)

Field Required Notes
model yes provider/model from /v1/models/image
prompt yes image description
n no count (provider-dependent; Venice supports 1)
size no 1024x1024, 1792x1024, ...
quality no standard / hd (OpenAI)
style no provider-specific style preset
response_format no url or b64_json

Examples

Save to file:

curl -s -X POST "$KEIROUTER_URL/v1/images/generations" \
  -H "Authorization: Bearer $KEIROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/dall-e-3","prompt":"watercolor mountains at sunrise","size":"1024x1024","response_format":"b64_json"}' \
  | jq -r '.data[0].b64_json' | base64 -d > out.png

JS (URL or base64):

const r = await fetch(`${process.env.KEIROUTER_URL}/v1/images/generations`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.KEIROUTER_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "xai/grok-2-image-1212", prompt: "neon city", n: 1 }),
});
const { data } = await r.json();
console.log(data[0].url || data[0].b64_json.slice(0, 40));

Response shape

Always JSON, in the OpenAI shape:

{ "created": 1735000000, "data": [{ "url": "https://..." }] }

With response_format=b64_json:

{ "created": 1735000000, "data": [{ "b64_json": "iVBORw0KGgo..." }] }

Provider quick reference

Provider ID Notes
OpenAI openai DALL-E 3, gpt-image; standard/hd quality
xAI xai Grok image models
Venice AI venice One image per request; url is a data URL
Recraft recraft OpenAI-compatible endpoint
Custom provider <provider> Any server that speaks OpenAI /images/generations

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · -3 lines · +6 tokens per session 157daa49e475
  2. 1mo ago First seen · 82 lines · 68 tokens per session scan A 0f97ca0e18b1

Subscribe to this mod's changes

keirouter-image is a skill published in the GitHub repository mydisha/keirouter (154 stars, last pushed 5d ago), licensed MIT. It adds 74 tokens to every session and 840 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.