Imagegen logo

Imagegen

OrganizationPopular
BlockRunAI
imagegen

Generate or edit images via BlockRun's image API. Trigger when the user asks to generate, create, draw, make an image — or to edit, modify, change, or retouch an existing image.

Overview

PublisherBlockRunAI
RepositoryClawRouter
Skill nameimagegen
Stars
6.6K
Forks
650
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by BlockRunAI on GitHub. Read the source before you install it.

Installation

Install the Imagegen AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/BlockRunAI/ClawRouter.git /tmp/ClawRouter
mkdir -p .claude/skills
cp -r /tmp/ClawRouter/skills/imagegen .claude/skills/imagegen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Imagegen in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Imagegen on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Imagegen is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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:

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

Response:

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

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

Model Selection

AliasFull IDPriceSizesBest for
nano-bananagoogle/nano-banana$0.051024×1024Default — fast, cheap, good quality
banana-2google/nano-banana-2$0.091024×1024Gemini 3.1 Flash imagegen — sharper than nano-banana at 1K
banana-progoogle/nano-banana-pro$0.10–$0.151024×1024, 2048×2048, 4096×4096High-res, large format
gpt-imageopenai/gpt-image-1$0.02–$0.041024×1024, 1536×1024, 1024×1536Budget option; supports editing
gpt-image-2openai/gpt-image-2$0.06–$0.121024×1024, 1536×1024, 1024×1536Photorealistic, reasoning-driven, text rendering (slow — proxy polls up to 5min); legacy dalle alias routes here
seedreambytedance/seedream-5-pro$0.045–$0.09up to 2848×1600 / 2304×1728Flagship quality, reference-image support
grok-imaginexai/grok-imagine-image$0.021024×1024xAI Grok image style
grok-imagine-proxai/grok-imagine-image-pro$0.071024×1024Grok high-quality
cogviewzai/cogview-4$0.015–$0.02512×512 to 1440×1440Cheapest — Zhipu CogView

Choosing a model:

  • Default → nano-banana
  • "high res" / "large" → banana-pro
  • "photorealistic" / complex scenes → gpt-image-2
  • "flagship quality" / reference image → seedream
  • "budget" / "cheap" → cogview
  • "editable" / "inpainting" → gpt-image (only edit-capable model)
  • "artistic" / flexible content → grok-imagine
  • "grok style" → grok-imagine or grok-imagine-pro

Choosing a size:

  • Default: 1024x1024 (the only size every model accepts)
  • Portrait: 1024x1536 (gpt-image / gpt-image-2) or 1728x2304 (seedream)
  • Landscape: 1536x1024 (gpt-image / gpt-image-2), 1344x768 (cogview), or 2048x1024 / 1280x720 (seedream)
  • High-res: 2048x2048 / 4096x4096 with banana-pro; 2848x1600 with seedream
  • The gateway validates size per model BEFORE payment and rejects unknown ones — do not invent sizes outside each model's list above

Edit an Existing Image

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

json
{
  "model": "openai/gpt-image-1",
  "prompt": "make the background a snowy mountain landscape",
  "image": "https://example.com/photo.jpg",
  "size": "1024x1024",
  "n": 1
}

ClawRouter automatically downloads URLs and reads local file paths — pass them directly, no manual base64 conversion needed.

Optional mask field: a second image (URL or path) that marks which areas to edit (white = edit, black = keep).

Response is identical to generation:

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

Supported models for editing: openai/gpt-image-1 only ($0.02)


Example Interactions

User: Draw me a cyberpunk city at night → POST to /v1/images/generations, model nano-banana, prompt as given.

User: Generate a high-res portrait of a samurai → POST to /v1/images/generations, model seedream, size 1728x2304.

User: Edit this photo to add a sunset background: https://example.com/portrait.jpg → POST to /v1/images/image2image, model gpt-image, image = the URL, prompt = "add a warm sunset background".

User: Change the background in my image to a beach (attaches local file) → POST to /v1/images/image2image, image = the local file path, prompt describes the change.


Notes

  • Payment is automatic, and which rail it uses depends on how ClawRouter was started: an x402 USDC micropayment from the user's wallet, or a draw on account credit if a BlockRun API key is configured. Either way the agent does nothing.
  • If the call fails with a payment error, check GET http://localhost:8402/health and read authMode before telling the user how to fix it: wallet → fund the wallet at blockrun.ai; api-key → top up account credit at user.blockrun.ai/dashboard/credits. Naming the wrong one sends the user to a page that cannot fix their error.
  • Google models may return base64 internally — ClawRouter uploads automatically and returns a hosted URL
  • OpenAI image models enforce OpenAI content policy; use nano-banana or grok-imagine for more flexibility
  • Image editing is only available with gpt-image-1; generation supports all listed models

Frequently asked questions

What does the Imagegen AI skill do?

Generate or edit images via BlockRun's image API. Trigger when the user asks to generate, create, draw, make an image — or to edit, modify, change, or retouch an existing image.

Why use Imagegen on TypingMind?

Because you install it once and use it with any model. Imagegen is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Imagegen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/BlockRunAI/ClawRouter/tree/main/skills/imagegen. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Imagegen?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Imagegen?

As many as you like. As long as a model supports skills, you can use Imagegen with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Imagegen AI skill free?

Yes. It is published on GitHub by BlockRunAI under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇