9routerx-image — Claude Code skill: what it does, how to install
The 9routerx-image Claude Code skill creates images through the 9RouterX API. It activates when a request asks for a picture or text-to-image generation.
MIT ★ 259 updated 2026-11-16
npx skills add yanstd888/9routerx --skill 9routerx-image -a claude-codeWhat 9routerx-image does
The skill submits an image prompt to POST /v1/images/generations and can return a URL, base64 data, or raw image bytes. It gets available image models from /v1/models/image; supported options vary by provider. Some providers process jobs asynchronously, and gemini may ignore the requested size and image count.
Set 9ROUTERX_URL to connect to the service. Add 9ROUTERX_KEY when server authentication is enabled. Codex models require ChatGPT Plus or Pro. Local sdwebui and comfyui use :7860 and :8188.
What it helps with
- generate a picture from a text prompt
- choose an image model through 9RouterX
- save generated output as a file or retrieve its URL
- send a reference image to a model that supports image editing
Example prompts for the agent
- Generate an image of mountains at sunrise.
- Draw a neon-lit city and save the result to a file.
- Create an image from my description using a Gemini model.
How to install 9routerx-image
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-image -a claude-code2Manually: put the files in place
~/.claude/skills/9routerx-image/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/9routerx-image/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-image -a codex2Manually: put the files in place
.agents/skills/9routerx-image/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-image -a cursor2Manually: put the files in place
.cursor/skills/9routerx-image/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install yanstd888/9routerx skills/9routerx-image2Manually: put the files in place
.github/skills/9routerx-image/SKILL.md1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-image -a gemini-cli2Platform CLI
gemini skills install https://github.com/yanstd888/9routerx --path skills/9routerx-imageManually: put the files in place
.devin/skills/9routerx-image/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 9routerx-image
How do I install 9routerx-image in Claude Code?
Run npx skills add yanstd888/9routerx --skill 9routerx-image -a claude-code. The skill file is at ~/.claude/skills/9routerx-image/SKILL.md.
What does 9routerx-image do?
It sends a text prompt to the 9RouterX API to generate an image. The response can be a URL, base64 data, or raw image bytes.
What does 9routerx-image need to run?
Set 9ROUTERX_URL; add 9ROUTERX_KEY if authentication is enabled. Codex models require ChatGPT Plus or Pro. Local sdwebui and comfyui use :7860 and :8188.
Source text
SKILL.md · MIT
---
name: 9routerx-image
description: Generate images via 9RouterX /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).
---
# 9RouterX — Image Generation
Requires `9ROUTERX_URL` (and `9ROUTERX_KEY` if auth enabled). See https://raw.githubusercontent.com/yanstd888/9routerx/refs/heads/main/skills/9routerx/SKILL.md for setup.
## Discover
```bash
curl $9ROUTERX_URL/v1/models/image | jq '.data[].id'
# Per-model params/options (size enum, quality enum, capabilities like edit)
curl "$9ROUTERX_URL/v1/models/info?id=openai/dall-e-3"
```
## Endpoint
`POST $9ROUTERX_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):
```bash
curl -X POST "$9ROUTERX_URL/v1/images/generations?response_format=binary" \
-H "Authorization: Bearer $9ROUTERX_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.9ROUTERX_URL}/v1/images/generations`, {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.9ROUTERX_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:
| 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`) |
© yanstd888 · MIT · yanstd888/9routerx