imagegen

imagegen is a skill for Claude Code, Codex from BlockRunAI/ClawRouter. It costs 45 tokens per session (1,750 once invoked), scanned A, original, MIT.

An image-generation and editing skill that uses BlockRun's image API to create or change images from written instructions.

In plain words
What is it for?
Generating new images and editing existing ones through the listed API or tools.
Why use it?
It gives a coding agent a defined way to request images, choose supported models, and display the results.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/blockrunai/clawrouter/imagegen
Any agent
npx skills add BlockRunAI/ClawRouter --skill imagegen
Clone the repo
git clone --depth 1 https://github.com/BlockRunAI/ClawRouter

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 imagegen

README.md
[![agentmods](https://agentmods.dev/badge/skills/blockrunai/clawrouter/imagegen.svg)](https://agentmods.dev/skills/blockrunai/clawrouter/imagegen)
Your own site
<a href="https://agentmods.dev/skills/blockrunai/clawrouter/imagegen"><img src="https://agentmods.dev/badge/skills/blockrunai/clawrouter/imagegen.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00045 $0.01750
Opus 5 $0.00023 $0.00875
Sonnet 5 $0.00009 $0.00350
Haiku 4.5 $0.00005 $0.00175

Measured 4d ago against content hash 39663f6e7a3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

imagegen scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/imagegen/SKILL.md · 145 lines

How it starts

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

Image Generation & Editing

Generate or edit images through ClawRouter. Payment is automatic via x402.

Shortcuts:

  • Slash: /cr-imagegen <prompt> [--model=<alias>] [--size=1024x1024] [--n=1] (/imagegen still accepted in chat for backward compatibility)
  • Partner tool: blockrun_image_generation (LLM-callable) / blockrun_image_edit (inpainting)

Generate an Image

POST to http://localhost:8402/v1/images/generations:

{
  "model": "google/nano-banana",
  "prompt": "a golden retriever surfing on a wave",
  "size": "1024x1024",
  "n": 1
}

Response:

{
  "created": 1741460000,
  "data": [{ "url": "http://localhost:8402/images/abc123.png" }]
}

Display inline: ![generated image](http://localhost:8402/images/abc123.png)

Model Selection

Alias Full ID Price Sizes Best for
nano-banana google/nano-banana $0.05 1024×1024 Default — fast, cheap, good quality
banana-2 google/nano-banana-2 $0.09 1024×1024 Gemini 3.1 Flash imagegen — sharper than nano-banana at 1K
banana-pro google/nano-banana-pro $0.10–$0.15 1024×1024, 2048×2048, 4096×4096 High-res, large format
gpt-image openai/gpt-image-1 $0.02–$0.04 1024×1024, 1536×1024, 1024×1536 Budget option; supports editing
gpt-image-2 openai/gpt-image-2 $0.06–$0.12 1024×1024, 1536×1024, 1024×1536 Photorealistic, reasoning-driven, text rendering (slow — proxy polls up to 5min); legacy dalle alias routes here
seedream bytedance/seedream-5-pro $0.045–$0.09 up to 2848×1600 / 2304×1728 Flagship quality, reference-image support
grok-imagine xai/grok-imagine-image $0.02 1024×1024 xAI Grok image style
grok-imagine-pro xai/grok-imagine-image-pro $0.07 1024×1024 Grok high-quality
cogview zai/cogview-4 $0.015–$0.02 512×512 to 1440×1440 Cheapest — Zhipu CogView

Read the full file on GitHub · 145 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. 4d ago First seen · 145 lines · 45 tokens per session scan A 39663f6e7a3c

Subscribe to this mod's changes

imagegen is a skill published in the GitHub repository BlockRunAI/ClawRouter (6,578 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 1,750 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.