Agent skill

9Router Image Generation

by decolua in decolua/9router

Generates images through a 9Router gateway's image endpoint, with model discovery, the request fields and per-provider quirks for OpenAI, Gemini, MiniMax and others.

MITAuto-check passedMedia & Creative

Install 9Router Image Generation

skills CLI
$ npx skills add decolua/9router --skill 9router-image -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install decolua/9router 9router-image --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/decolua/9router.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/9router-image .claude/skills/9router-image && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
9router-image
GitHub stars
30k
Token cost
~830 tokens
SKILL.md length
178 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Generates images through a 9Router gateway's image endpoint, with model discovery, the request fields and per-provider quirks for OpenAI, Gemini, MiniMax and others.

  • Generating an image from a text prompt through 9Router
  • SKILL.md covers Discover, Endpoint, Examples and Response shape, plus 1 more section
  • Calls curl and jq; needs NINEROUTER_KEY
  • Listing which image models a 9Router instance offers

What it does

The skill calls the `/v1/images/generations` endpoint of a 9Router instance, which fronts models from OpenAI, Gemini Imagen, DALL-E, FLUX, MiniMax, SDWebUI, ComfyUI and Codex. It starts by listing available models from `/v1/models/image` and reading per-model options from `/v1/models/info`. A request carries a model and prompt, plus optional count, size, quality and response format.

Responses come back as a URL by default, as base64 JSON, or as raw image bytes when `?response_format=binary` is added, which suits saving a file. A provider table lists the quirks: some models take only a prompt and ignore size and count, the Codex route needs a ChatGPT Plus or Pro plan and streams its result, and edit or image-to-image modes exist for some providers, with asynchronous polling for a few. The skill needs `NINEROUTER_URL`, and `NINEROUTER_KEY` when authentication is on.

When your agent uses it

  • Generating an image from a text prompt through 9Router
  • Listing which image models a 9Router instance offers
  • Saving a generated image straight to a file
  • Choosing size and quality options for a particular provider's model

Example prompts

  • “Generate a watercolor lighthouse at dusk with 9Router and save it as lighthouse.png.”
  • “List the image models available on our 9Router and show what options dall-e-3 supports.”
  • “Make four logo concepts for a bakery called Crumb and return the URLs.”

Requirements

  • A reachable 9Router instance with `NINEROUTER_URL` set
  • `NINEROUTER_KEY` when authentication is enabled
  • curl or a JavaScript runtime to call the endpoint

What it can do on your machine

Read from SKILL.md and the folder at commit ce4460e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • NINEROUTER_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

9Router Image Generation loads about 830 tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 178 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~830

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from decolua/9router at commit ce4460e, republished under its MIT licence (© decolua). 178 words, ~830 tokens.

Download SKILL.mdSave it as .claude/skills/9router-image/SKILL.md (or your agent's skills folder).
name
9router-image
description
Generate images via 9Router /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).

9Router — Image Generation

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Discover

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

Endpoint

POST $NINEROUTER_URL/v1/images/generations

FieldRequiredNotes
modelyesfrom /v1/models/image
promptyesimage description
nnocount (provider-dependent)
sizeno1024x1024, 1792x1024, ...
qualitynostandard / hd (OpenAI)
response_formatnourl (default) or b64_json

Add query ?response_format=binary to receive raw image bytes (handy for saving file).

Examples

Save to file (binary):

bash
curl -X POST "$NINEROUTER_URL/v1/images/generations?response_format=binary" \
  -H "Authorization: Bearer $NINEROUTER_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):

js
const r = await fetch(`${process.env.NINEROUTER_URL}/v1/images/generations`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.NINEROUTER_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):

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

response_format=b64_json:

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

Query ?response_format=binary returns raw image bytes (Content-Type image/png or image/jpeg).

Provider quirks

Common fields above work everywhere. These add/override:

ProviderExtra/changed fieldsNotes
openai, minimax, openrouter, recraftquality, style, response_formatStandard OpenAI shape
gemini (nano-banana)—Only prompt; ignores size/n
codex (gpt-5.4-image)image, images[], image_detail, output_format, backgroundSSE stream; ChatGPT Plus/Pro required
huggingface—Only prompt; returns single image
nanobananaimage, images[] (edit mode)size → aspect ratio; async polling
fal-aiimage (img2img)n → num_images; size → ratio; async
stability-aistyle (preset), output_formatsize → aspect_ratio
black-forest-labs (FLUX)image (ref)size → exact width/height; async
runwaymlimage (ref)size → ratio; async; video models exist
sdwebui, comfyui—Localhost noAuth (:7860 / :8188)

© decolua, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/9router-image of decolua/9router.

Open the folder on GitHubat commit ce4460e

Compare with similar skills

9Router Image Generation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

9Router Image Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
9Router Image Generation this skilldecolua/9router30k—~830Automated safety check: PassMIT
Character Refseternityspring/shuohao-skills4.3k—~1.7kAutomated safety check: WarnApache-2.0
Image Genopen-octo/octo-agent125—~3.1kAutomated safety check: NotesMIT
AI Image Creatorevolution-foundation/evo-nexus545—~5.1kAutomated safety check: NotesCustom licence
ComfyUI Local DriverSlavaSexton/ComfyUI-Agent-Kit105—~12kAutomated safety check: PassApache-2.0
Minimax H3calesthio/OpenMontage66k—~580Automated safety check: PassAGPL-3.0

Similar skills

  • Character Refs

    eternityspring/shuohao-skills

    给任何故事里的角色真出参考图(小说改编、自己原创的故事、单独设计一个角色都行,不需要小说原文): 一段话描述角色,拆成分层字段、补全后确认, 先出一张正面全身锚点,其余视图(大头照、90° 侧面、背面、细节、45° 大头照)都只参考这张锚点, 按需分档出图。每张图带标识、可单独重出,重出后自动标出哪些图过期。

    4.3k GitHub stars~1.7k tokensUpdated yesterday
    Media & CreativeAuto-check: warnings
  • Image Gen

    open-octo/octo-agent

    Acquire images as files — generate them with an AI image model (14 providers: OpenAI/gpt-image, Gemini, Qwen, Zhipu, Volcengine, Stability, FLUX, Ideogram, MiniMax, and more), search openly-licensed…

    125 GitHub stars~3.1k tokensUpdated today
    Media & CreativeAuto-check: notes
  • AI Image Creator

    evolution-foundation/evo-nexus

    Generates PNG images through OpenRouter models, with transparent backgrounds and reference-image edits, and describes existing images with multimodal vision.

    545 GitHub stars~5.1k tokensUpdated 4 mo ago
    Media & CreativeAuto-check: notes
  • ComfyUI Local Driver

    SlavaSexton/ComfyUI-Agent-Kit

    Drives a local ComfyUI install over its HTTP API to generate and edit images, video and audio, with per-model prompt recipes and workflow guidance.

    105 GitHub stars~12k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Minimax H3

    calesthio/OpenMontage

    Generate MiniMax H3 (Hailuo 3.0) video through the official MiniMax v2 API, fal.ai, Runway, ComfyUI Partner Nodes, or local open weights in ComfyUI.

    66k GitHub stars~580 tokensUpdated 6 days ago
    Media & CreativeAuto-check passed
  • Model Routing

    fal-ai-community/skills

    Choose default fal.ai endpoint IDs for genmedia production skills.

    250 GitHub stars~1.5k tokensUpdated 10 days ago
    Media & CreativeAuto-check passed

More from decolua/9router

All 9 skills in this repo
  • Sets up access to the 9Router AI gateway, an OpenAI-compatible REST endpoint for chat, images, speech, embeddings, web search and web fetch, and indexes its capability skills.

    30k GitHub stars~744 tokensUpdated yesterday
    Auto-check passed
  • Sends chat and code-generation requests through a 9Router gateway using OpenAI or Anthropic message formats, with streaming and auto-fallback combos.

    30k GitHub stars~635 tokensUpdated yesterday
    Auto-check passed
  • Embeddings via 9Router

    decolua/9router

    Generates vector embeddings through the 9Router /v1/embeddings endpoint, using models from providers such as OpenAI, Gemini, Mistral and Voyage for RAG and semantic search.

    30k GitHub stars~604 tokensUpdated yesterday
    Auto-check passed
  • 9Router Speech-to-Text

    decolua/9router

    Transcribes audio files into text or subtitles through 9Router's Whisper-compatible endpoint, using models from OpenAI, Groq, Gemini, Deepgram and others.

    30k GitHub stars~914 tokensUpdated yesterday
    Auto-check passed
  • 9Router Text to Speech

    decolua/9router

    Turns text into spoken audio through a 9Router server, choosing among voices from OpenAI, ElevenLabs, Deepgram, Edge TTS and other providers.

    30k GitHub stars~765 tokensUpdated yesterday
    Auto-check passed
  • Submits text-to-video or image-to-video jobs to xAI Grok Imagine through 9Router, then polls the job and downloads the finished MP4.

    30k GitHub stars~992 tokensUpdated yesterday
    Auto-check passed

Questions about 9Router Image Generation

What does 9Router Image Generation do?

Generates images through a 9Router gateway's image endpoint, with model discovery, the request fields and per-provider quirks for OpenAI, Gemini, MiniMax and others. The skill calls the `/v1/images/generations` endpoint of a 9Router instance, which fronts models from OpenAI, Gemini Imagen, DALL-E, FLUX, MiniMax, SDWebUI, ComfyUI and Codex. It starts by listing available models from `/v1/models/image` and reading per-model options from `/v1/models/info`.

When should I use 9Router Image Generation?

9Router Image Generation fits situations like: generating an image from a text prompt through 9Router; listing which image models a 9Router instance offers; saving a generated image straight to a file; choosing size and quality options for a particular provider's model.

How do I install 9Router Image Generation in Claude Code?

Run `npx skills add decolua/9router --skill 9router-image -a claude-code`. Or copy the skill folder (skills/9router-image in decolua/9router) into .claude/skills/9router-image in your project. Claude Code loads it when a task matches its description.

How do I install 9Router Image Generation in Codex?

Run `npx skills add decolua/9router --skill 9router-image -a codex`. Or copy the skill folder (skills/9router-image in decolua/9router) into .agents/skills/9router-image in your project. Codex loads it when a task matches its description.

Can I use 9Router Image Generation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add decolua/9router --skill 9router-image -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/9router-image, .gemini/skills/9router-image, .github/skills/9router-image and .opencode/skills/9router-image in your project.

What does 9Router Image Generation need to run?

Going by SKILL.md and its folder, 9Router Image Generation needs the command-line tools its instructions call (curl and jq) and credentials named NINEROUTER_KEY. Our summary lists: A reachable 9Router instance with `NINEROUTER_URL` set; `NINEROUTER_KEY` when authentication is enabled; curl or a JavaScript runtime to call the endpoint.

Does 9Router Image Generation access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is 9Router Image Generation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does 9Router Image Generation use?

9Router Image Generation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does 9Router Image Generation use?

About 830 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to 9Router Image Generation?

Skills that share tags, products or a category with 9Router Image Generation: Character Refs (eternityspring/shuohao-skills, 4.3k stars), Image Gen (open-octo/octo-agent, 125 stars), AI Image Creator (evolution-foundation/evo-nexus, 545 stars) and ComfyUI Local Driver (SlavaSexton/ComfyUI-Agent-Kit, 105 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains 9Router Image Generation?

decolua (a GitHub user) maintains it in decolua/9router, which has 30,491 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

Source: decolua/9router on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.