Skip to content
Development
Skill

/9router-image

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).

From plugin
9router
32k9 skills

Claude Code

$ npx -y skills add decolua/9router --skill 9router-image --agent claude-code

SKILL.md

9router-image.SKILL.md
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

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`

| 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 "$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):

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`):

{ "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 quirks

Common fields above work everywhere. These add/override:

| Provider | Extra/changed fields | Notes | |---|---|---| | `openai`, `minimax`, `openrouter`, `recraft` | `quality`, `style`, `response_format` | Standard OpenAI shape | | `gemini` (nano-banana) | — | Only `prompt`; ignores `size`/`n` | | `codex` (gpt-5.4-image) | `image`, `images[]`, `image_detail`, `output_format`, `background` | SSE stream; **ChatGPT Plus/Pro required** | | `huggingface` | — | Only `prompt`; returns single image | | `nanobanana` | `image`, `images[]` (edit mode) | `size` → aspect ratio; async polling | | `fal-ai` | `image` (img2img) | `n` → `num_images`; `size` → ratio; async | | `stability-ai` | `style` (preset), `output_format` | `size` → `aspect_ratio` | | `black-forest-labs` (FLUX) | `image` (ref) | `size` → exact `width`/`height`; async | | `runwayml` | `image` (ref) | `size` → ratio; async; video models exist | | `sdwebui`, `comfyui` | — | Localhost noAuth (`:7860` / `:8188`) |

Read more
@decolua
Ships with9router

Never stop coding. Save 20-40% tokens with RTK + auto-fallback to FREE & cheap AI models. Connect All AI Code Tools (Claude Code, Cursor, Antigravity, Copilot, Codex, Gemini, OpenCode, Cline, OpenClaw...) to 40+ AI Providers & 100+ Models.

Stars on GitHub

Momentum

stars in total
32.4k
Star history of decolua/9router on GitHub, a chart by star-history.com

Other skills on 9router.

9router-chat

9router-chat

Chat / code generation via 9Router using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming +…

@decolua@decoluaInstall Skill
9router-embeddings

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models…

@decolua@decoluaInstall Skill
9router-stt

9router-stt

Speech-to-text via 9Router /v1/audio/transcriptions using OpenAI Whisper / Groq / Gemini / Deepgram / AssemblyAI / NVIDIA /…

@decolua@decoluaInstall Skill
9router-tts

9router-tts

Text-to-speech via 9Router /v1/audio/speech using OpenAI / ElevenLabs / Deepgram / Edge TTS / Google TTS / Hyperbolic / Inworld…

@decolua@decoluaInstall Skill
9router-video

9router-video

Generate videos via 9Router /v1/videos/generations using xAI Grok Imagine (grok-imagine-video). Async job flow - submit, poll…

@decolua@decoluaInstall Skill
9router-web-fetch

9router-web-fetch

Fetch URL → markdown / text / HTML via 9Router /v1/web/fetch using Ollama Cloud / Firecrawl / Jina Reader / Tavily Extract / Exa…

@decolua@decoluaInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about 9router-image.

Which coding agents can use 9router-image?
9router-image installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.