9Router Image Generation Skill
Call text-to-image models from OpenAI, Gemini, FLUX, Stability and 40+ providers through one 9Router endpoint, letting AI coding agents generate images on demand.
Doc-only skill: credentials and URL passed via env vars, no file writes, destructive defaults, or covert data flows; prompts are sent to the user-configured 9Router instance and upstream providers, which is fairly transparent. Deducted for: no disclosure of which third-party servers receive prompts/images, no sensitive-data guidance, no confirmation/rollback mechanisms, and incomplete attribution due to unverified publisher.
Internally consistent: endpoint, field table, response examples and provider-quirk table agree, and ping.js in the repo corroborates the /v1/images/generations path and data-array shape. Deducted for: static read only with no test/reproduction evidence (cap 10); no coverage of error shapes, timeouts, or async polling details; failure feedback on abnormal input is delegated to upstream without explanation.
Clear trigger description (create/generate/draw/txt2img), clear audience, and declared provider limitations (e.g. gemini ignores size/n). Deducted for: fluctuating free-provider availability, core dependence on overseas services with no mainland-China reachability statement, and setup dependency on a separate SKILL file making prerequisites not self-contained.
Well-layered (Discover/Endpoint/Examples/Response/Quirks), MIT-licensed repo with versioning and Docker publish CI. Deducted for: no per-skill version/changelog, install instructions outsourced to another path, no FAQ or known-limitations list beyond a brief quirks table, maintenance ownership only implicit.
If 9Router is deployed, the curl/JS examples are complete and directly adaptable, offering real marginal value. Deducted for: static review cannot verify output quality, value depends entirely on an external service, and model names in examples (gemini-3-pro-image-preview, gpt-5.4-image) cannot be verified and may need user adjustment.
Response structure is partially corroborated by ping.js's image branch — limited primary material. Deducted for: no test suite covering the skill's key paths, no third-party execution evidence, no independently reproducible verification; the 40+ provider behavior claims rest on documentation alone.
- Prompts and generated images transit the user-configured 9Router and upstream providers; assess sensitive content yourself.
- The skill depends on NINEROUTER_URL/KEY env vars and a deployed 9Router instance; some providers may be unreachable from mainland-China networks.
- Model names and provider quirks in the doc are execution-unverified; check /v1/models/image before use.
- Publisher is unverified and the repo contains no test coverage for this skill.
What does this skill do, and when should you use it?
9router-image is one of 9 skills bundled in the decolua/9router repository (MIT licensed) that teaches an AI agent to generate images via 9Router's /v1/images/generations endpoint. It documents model discovery (/v1/models/image), request fields, response formats (URL, base64, and raw binary bytes), and per-provider quirks across ten-plus providers. It requires a running 9Router instance and the NINEROUTER_URL environment variable. The skill is documentation-only with no scripts, so any Agent Skills client with shell access can use it.
Reads NINEROUTER_URL (and NINEROUTER_KEY if auth is enabled) from the environment; lists image models via GET /v1/models/image and queries per-model options (size/quality enums, edit capability) via /v1/models/info; sends POST requests to /v1/images/generations with model, prompt, and optional n, size, quality, response_format fields; supports ?response_format=binary to receive raw PNG/JPEG bytes suitable for saving directly to a file; returns JSON responses (data[].url or data[].b64_) or binary output. The SKILL.md also documents provider-specific overrides for openai, gemini, codex, huggingface, fal-ai, stability-ai, black-forest-labs, runwayml, sdwebui, and comfyui — e.g., Gemini ignores size/n, some providers support img2img or async polling.
- A front-end developer needs an AI coding agent to generate placeholder artwork or icons during a session and save them as PNG files.
- A content creator batch-generates illustrations through Claude Code, using ?response_format=binary to write files in one step.
- A team already running 9Router wants to switch between DALL-E 3, Gemini image models, and a local ComfyUI without changing client code.
- An integrator needs provider-specific tuning, such as OpenAI's quality/style fields or FLUX's exact width/height mapping.
- A user with a local, no-auth Stable Diffusion WebUI (:7860) or ComfyUI (:8188) wants local image generation wired into their agent workflow.
What are this skill's strengths and limitations?
- One OpenAI-compatible endpoint reaches OpenAI, Gemini, FLUX, MiniMax, Stability, local ComfyUI, and more image providers.
- Detailed provider-quirk table reduces trial-and-error when tuning parameters.
- Three response formats (URL, base64, raw binary) make saving files straightforward.
- Documentation-only skill with no scripts — highly portable across Agent Skills clients.
- Requires a running 9Router deployment; it cannot be used standalone.
- Hard provider limits exist: codex image models require a ChatGPT Plus/Pro subscription; gemini/nano-banana ignores size and n.
- fal-ai, nanobanana, and black-forest-labs use async polling, complicating the flow.
- The README describes the whole 9Router project (RTK token saving, auto-fallback); those capabilities belong to the platform, not this image skill. No test suite for the skill is shown in the source.
How do you install this skill?
The skill lives in the 9router repository at skills/9router-image/SKILL.md. Clone the repo and copy the skills/9router-image folder into your Agent Skills directory (e.g., your Claude Code skills folder). No dedicated install script is documented. Prerequisite: install and run 9Router first (npm install -g 9router, then run 9router; dashboard at http://localhost:20128), and set NINEROUTER_URL (plus NINEROUTER_KEY if auth is enabled). Full setup steps are in skills/9router/SKILL.md, as referenced by this skill.
How do you use this skill?
Trigger it by asking your agent something like "generate an image of a watercolor mountain sunrise"; the agent follows the SKILL.md instructions to call the endpoint. Example: curl -X POST "$NINEROUTER_URL/v1/images/generations?response_format=binary" -H "Authorization: Bearer $NINEROUTER_KEY" -H "Content-Type: application/" -d '{"model":"gemini/gemini-3-pro-image-preview","prompt":"watercolor mountains at sunrise","size":"1024x1024"}' --output out.png. Discover models first with curl $NINEROUTER_URL/v1/models/image.