Skip to content
Skills Library
AI & agents · Tool integration

9router-image

/9router-image

Image generation via 9Router local gateway (cx/gpt-5.5-image etc.). Use when generating images for articles, reports, or social media, and 9Router is the available image backend.

Licence
MIT
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
7
Scripts
3
HTML comments
0
URLs in SKILL.md
5
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 3 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: references/9router-plugin/__init__.py, scripts/9router-generate.sh, scripts/9router-list-models.sh

What it does and when to use it

Image generation via 9Router local gateway (cx/gpt-5.5-image etc.). Use when generating images for articles, reports, or social media, and 9Router is the available image backend.

Original author description

Image generation via 9Router local gateway (cx/gpt-5.5-image etc.). Use when generating images for articles, reports, or social media, and 9Router is the available image backend.

How it works

  1. 快速验证(确认可用)
  2. 完整架构
  3. 配置(缺一不可)
  4. 插件源码
  5. 可用模型
  6. 常见错误排查
  7. 生成图像(标准流程)
  8. Prompt 优化建议
Original SKILL.md headings · 90 lines, 353 words
SKILL.md preview
---
name: 9router-image
description: Image generation via 9Router local gateway (cx/gpt-5.5-image etc.). Use when generating images for articles, reports, or social media, and 9Router is the available image backend.
permissions:
  - http://127.0.0.1:20128/  # local 9Router gateway only; no external hosts, no remote script fetching
---

# 9Router Image Generation

通过本地 9Router 网关生成图像(text-to-image),复用 Hermes `image_generate` 工具,零额外 SDK 依赖。

## 快速验证(确认可用)

```bash
# 探测生图可用模型
curl -s http://127.0.0.1:20128/v1/models/image | python3 -m json.tool

# 预期:返回 cx/gpt-5.5-image / cx/gpt-5.4-image / cx/gpt-5.3-image

# curl 直测(需先填入 KEY)
KEY="sk-your-9router-key"
curl -s -X POST http://127.0.0.1:20128/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $KEY" \
  -d '{"model":"cx/gpt-5.5-image","prompt":"a red rose","n":1,"size":"1024x1024"}' \
  --max-time 120 | python3 -m json.tool
```

## 完整架构

```
image_generate 工具(Hermes 统一入口)
  → image_gen_registry.get_active_provider()
    → config.yaml image_gen.provider = "9router"  ← 必须
    → NineRouterImageGenProvider.generate()
      → POST http://127.0.0.1:20128/v1/images/generations
        → 9Router 识别 model 前缀 "cx/" → 路由到内置 cx provider
        → cx/gpt-5.5-image API(真正生图)
        → 返回 base64 PNG
      → 保存到 $HERMES_HOME/cache/images/9router_image_*.png
```

## 配置(缺一不可)

**文件:** `~/.hermes/config.yaml`

```yaml
providers:
  9router:
    api: http://127.0.0.1:20128/v1
    api_key: sk-你的9router-gateway-key   # 9Router 网关自身的 key,不是 cx 的 key

image_gen:
  provider: 9router     # ← 必须写死
  model: cx/gpt-5.5-image   # 可选,默认 cx/gpt-5.5-image
```

⚠️ `api_key` 是 **9Router 网关** 的 key(注册 9Router 时拿到的),**不是 cx 或 qwen 的 key**。9Router 在内部路由到 cx provider,cx 的认证在 9Router 服务端配置。

## 插件源码

完整源码在 `references/9router-plugin/`(含 `__init__.py` + `plugin.yaml`)。也可直接参考该目录复制到其他 Hermes 安装。

## 可用模型

| model id | 说明 | 推理时间 |
|---|---|---|
| `cx/gpt-5.5-image` | 推荐默认 | ~99s/张 |
| `cx/gpt-5.4-image` | 次新 | ~90s/张 |
| `cx/gpt-5.3-image` | 较旧 | ~80s/张 |

⚠️ **`image` 是 chat 模型**(归属 combo,在 `/v1/models` 里),**不是生图模型**,不能用于 `/v1/images/generations`。实测报错:`Provider does not support image generation`。

## 常见错误排查

| 错误信息 | 原因 | 解决 |
|---|---|---|
| `No credentials for provider: openai` | model `image` 无前缀,9Router 按 OpenAI 路由 | 改用 `cx/gpt-5.5-image` |
| `No credentials for provider: qwen` | model 带 `qwen/` 前缀,但 9Router 未配 qwen key | 改用 `cx/gpt-5.5-image` |
| `Provider does not support image generation` | model 是 chat 模型(如 `image`、`qwen-image-2.0`) | 改用 `cx/gpt-5.5-image` |
| 401 Unauthorized | 9Router key 错误或过期 | 检查 `providers.9router.api_key` |
| Connection refused | 9Router 网关未启动 | 启动 9Router:`9router serve` 或对应命令 |

## 生成图像(标准流程)

1. 确保 `config.yaml` 中 `image_gen.provider: 9router`
2. 直接调用 `image_generate` 工具,prompt 即可
3. 图像保存在 `~/.hermes/cache/images/9router_image_*.png`,也可指定输出路径

## Prompt 优化建议

- portrait(1024×1792)比 landscape(1792×1024)更大,prompt **宜精简**避免 120s 超时
- 简短、明确的英文描述效果最佳
- 示例(portrait):`A worried small furniture store owner staring at a glowing AI recommendation screen`
- 示例(landscape):`Split-screen: left shows traditional SEO ranking battlefield, right shows AI overview answer box with brand highlighted`
Files in this package (7)
  • SKILL.md 4 KB
  • references/MIGRATION.md 3 KB
  • references/config.yaml.example 1 KB
  • references/9router-plugin/__init__.py 10 KB
  • references/9router-plugin/plugin.yaml 1 KB
  • scripts/9router-generate.sh 3 KB
  • scripts/9router-list-models.sh 1 KB

Versions

RepositoryScoreLicence
This page · jacardl/viceroy-skills100MIT
decolua/9router95MIT

Database snapshot: 13.11.2026 · package version ee83b767b3f5 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100image-gen
    AI image generation via gpt-image-2 and nano-banana. Use when the user wants to generate or create an image / picture / still through the backend image-generation jobs.
  • 100imagegen
    Generate or edit raster images with an OpenAI-compatible Images API (default model gpt-image-2). Use when the user asks for image generation, image edits, GPT Image, gpt-image-2, or image outputs that should be saved into the current project.
  • 100gpt-image-skill
    Generate or edit images when the user names OpenAI, GPT Image, or a gpt-image model. Use the default image skill when no provider is named.
  • 100vectronode-image
    VectorNode 中转站 GPT Image 图片生成与编辑(按提示词长度自动路由 gpt-image-2 Token 计费 / gpt-image-2-all 按次计费)。Use when: 画图、生图、生成图片、gpt生图、VectorNode、gpt-image、image generate、image edit、编辑图片。Requires VECTORNODE_API_KEY in ~/.openclaw/.env.
  • 100codex-image
    Generate images using OpenAI's Codex backend API with gpt-image-2 tool. Use when the user asks to generate images via Codex, ChatGPT image generation, or gpt-image-2. Triggers on "codex image", "codex generate", "gpt-image", "chatgpt generate image". Token is auto-fetched from…
  • 95openai-gpt-image
    Generate, edit, composite, stream, and production-review still images with OpenAI GPT Image models. Use when an agent must choose between GPT Image 2 and legacy GPT Image/DALL-E integrations, select the Image API or Responses API, build prompts and reference-image workflows, use…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.