Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yanstd888/9routerx --skill 9routerx-image -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/9routerx-image/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/9routerx-image/

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

Similar skills

SKILL.md skills catalog →

From the same set9

9routerx-embeddings The 9routerx-embeddings Claude Code skill creates text embeddings through the 9RouterX API. The agent uses it for RAG, semantic search, and text similarity tasks. CX Codex +1 ★ 259repo stars 9routerx-chat The 9routerx-chat Claude Code skill sends language-model requests through 9RouterX. It activates for code generation, text summaries, and other prompts to a model. CX Codex +1 ★ 259repo stars 9routerx Claude Code skill connects your agent to the 9RouterX gateway. It routes OpenAI-compatible REST calls for chat, speech, embeddings, and web fetch to multiple AI models. CX Codex +1 ★ 259repo stars 9routerx-tts The 9routerx-tts Claude Code skill turns text into speech through the 9RouterX API. It runs for voiceovers, generated audio, or reading text aloud. CX Codex +1 ★ 259repo stars 9routerx-stt 9routerx-stt — a skill for Claude Code and Codex that routes audio transcription requests through 9RouterX. Transcribes voice recordings and generates subtitle files across multiple model backends. CX Codex +1 ★ 259repo stars 9routerx-web-fetch The 9routerx-web-fetch Claude Code skill retrieves webpage content as Markdown, plain text, or HTML. The agent uses it to read an article or extract material from a URL. CX Codex +1 ★ 259repo stars 9routerx-video The 9routerx-video Claude Code skill creates videos through xAI Grok Imagine. It runs when asked to generate a clip from text or an image. CX Codex +1 ★ 259repo stars 9routerx-web-search The 9routerx-web-search Claude Code skill searches the web and public X posts through 9RouterX. It runs when an agent is asked to find articles, information, or posts on X. CX Codex +1 ★ 259repo stars

Project sponsors

Companies that keep this analytics open