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.
npx agentmods add skills/mydisha/keirouter/keirouter-imagenpx skills add mydisha/keirouter --skill keirouter-imagegit clone --depth 1 https://github.com/mydisha/keirouterWrote 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.
[](https://agentmods.dev/skills/mydisha/keirouter/keirouter-image)<a href="https://agentmods.dev/skills/mydisha/keirouter/keirouter-image"><img src="https://agentmods.dev/badge/skills/mydisha/keirouter/keirouter-image.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00068 | $0.00838 |
| Opus 5 | $0.00034 | $0.00419 |
| Sonnet 5 | $0.00014 | $0.00168 |
| Haiku 4.5 | $0.00007 | $0.00084 |
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 5d 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' How it starts
The opening of the file, as written. The whole thing — 82 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
| Field | Required | Notes |
|---|---|---|
model |
yes | from /v1/models/image |
prompt |
yes | image description |
n |
no | count (provider-dependent) |
size |
no | 1024x1024, 1792x1024, ... |
quality |
no | standard / hd (OpenAI) |
response_format |
no | url (default) or b64_json |
Add query ?response_format=binary to receive raw image bytes (handy for saving file).
Examples
Save to file (binary):
curl -X POST "$KEIROUTER_URL/v1/images/generations?response_format=binary" \
-H "Authorization: Bearer $KEIROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gemini/gemini-3-pro-image-preview","prompt":"watercolor mountains at sunrise","size":"1024x1024"}' \
--output out.png
JS (URL response):
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: "gemini/gemini-3-pro-image-preview", prompt: "neon city", size: "1024x1024" }),
});
const { data } = await r.json();
console.log(data[0].url || data[0].b64_json.slice(0, 40));
Response shape
JSON (default response_format=url):
{ "created": 1735000000, "data": [{ "url": "https://..." }] }
response_format=b64_json:
{ "created": 1735000000, "data": [{ "b64_json": "iVBORw0KGgo..." }] }
Query ?response_format=binary returns raw image bytes (Content-Type image/png or image/jpeg).
Provider quick reference
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.
- 5d ago First seen · 82 lines · 68 tokens per session scan A 0f97ca0e18b1
keirouter-image is a skill published in the GitHub repository mydisha/keirouter (129 stars, last pushed 8d ago), licensed MIT. It adds 68 tokens to every session and 838 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
10router-add-provider
Self-serve adding a custom OpenAI/Anthropic-compatible upstream provider (baseUrl + its own API key + models) to a running 10Router — no source change, no repackage, live immediately. Use when the user wants to register a self-hosted gateway / sk-xxx / baseUrl as a routable node, or an agent needs to add a custom…
10router
Entry point for 10Router — local/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch. Use when the user mentions 10Router, TENROUTERURL, or wants AI without writing provider boilerplate. This skill covers setup + indexes capability skills; fetch the relevant capability…
10router-chat
Chat / code generation via 10Router using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos. Use when the user wants to ask an LLM, generate code, summarize text, or run prompts through 10Router.
10router-dev
Develop / troubleshoot 10Router on NAS. Use when debugging why a client or model 'doesn't work' through the gateway, deploying to NAS, or deciding whether to fix or work around a third-party bug. 10Router 开发排障:排查客户端/模型经网关报错、部署 NAS、判断是否适配第三方 bug。.
10router-image
Generate images via 10Router /v1/images/generations using OpenAI / Gemini Imagen / DALL-E / FLUX / MiniMax / SDWebUI / ComfyUI / Codex models. Use when the user wants to create, generate, draw, or render an image, picture, or text-to-image (txt2img).
10router-web-fetch
Fetch URL → markdown / text / HTML via 10Router /v1/web/fetch using Firecrawl / Jina Reader / Tavily Extract / Exa Contents. Use when the user wants to scrape a webpage, extract URL content, read article, or convert a URL to markdown.