AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Image Gen 9router

skill-fajrisilmi12-cyber-hermes-socmed-function-image-gen-9router · by fajrisilmi12-cyber

Generate images via 9Router. FLUX, Imagen, DALL-E, SD.

No reviews yet
0 installs
4 views
0.0% view→install

Install

$ agentstack add skill-fajrisilmi12-cyber-hermes-socmed-function-image-gen-9router

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-fajrisilmi12-cyber-hermes-socmed-function-image-gen-9router)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Image Gen 9router? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Image Generation via 9Router

9Router is a local OpenAI-compatible gateway that exposes image generation through /v1/images/generations. The same service handles LLM routing (it's the AGY model Hermes uses) and image gen. Image gen is genuinely free via the Cloudflare provider.

When to use this skill

  • User wants to generate an image from a text prompt
  • User wants AI art for an Instagram post / story / reel
  • User wants to compare multiple image models (FLUX vs DALL-E vs Imagen)
  • User has a working 9Router setup (NINEROUTERURL + NINEROUTERKEY in env)

9Router is the same service as AGY

Discovery: cat ~/.hermes/config.yaml shows

model:
  base_url: http://localhost:20128/v1

That localhost:20128 is 9Router. Image gen and LLM chat go through the same gateway, but with different endpoints and different model IDs. The key (NINEROUTER_KEY) is shared.

Endpoints

| Endpoint | Purpose | |---|---| | GET /v1/models/image | List available image models (with owned_by provider) | | GET /v1/models/info?id= | Per-model params, capabilities, size enum | | POST /v1/images/generations | Generate image(s) | | POST /v1/images/generations?response_format=binary | Generate and return raw bytes |

Auth: Authorization: Bearer $NINEROUTER_KEY (required even for local 9Router).

Discover available models

curl -s $NINEROUTER_URL/v1/models/image \
  -H "Authorization: Bearer $NINEROUTER_KEY" | jq '.data[].id'

Common models:

  • cf/@cf/black-forest-labs/flux-2-klein-4b — small, fast, free (Cloudflare)
  • cf/@cf/black-forest-labs/flux-2-klein-9b — larger, more detail (Cloudflare)
  • cf/@cf/black-forest-labs/flux-2-dev — development build (Cloudflare)
  • gemini/gemini-3-pro-image-preview — Google's Imagen 3
  • openai/dall-e-3 — OpenAI DALL-E 3
  • cf/@cf/leonardo/phoenix-1.0 — Leonardo Phoenix via Cloudflare

Generate an image (Python)

import httpx, os

resp = httpx.post(
    f"{os.environ['NINEROUTER_URL']}/v1/images/generations?response_format=binary",
    headers={"Authorization": f"Bearer {os.environ['NINEROUTER_KEY']}"},
    json={"model": "cf/@cf/black-forest-labs/flux-2-klein-4b",
          "prompt": "your prompt here",
          "size": "1024x1024"},
    timeout=120,
)
resp.raise_for_status()
open("/tmp/out.png", "wb").write(resp.content)

Or use the template:

python3 templates/generate_image.py "your prompt" -o /tmp/out.png
python3 templates/generate_image.py "your prompt" --post --caption "IG caption"

Response formats

| Query / Field | Returns | |---|---| | default (URL response) | JSON with data[0].url to a hosted image | | ?response_format=binary | raw image bytes | | response_format: b64_json in body | JSON with data[0].b64_json base64 string |

For posting to social media, use binary and save to disk, then upload to your CDN.

Pitfalls

  • Always set Authorization header even though 9Router is local. Without it, returns 401 Invalid API key. The env var name is NINEROUTER_KEY, value typically sk-... 35 chars.
  • Some providers ignore size and n. gemini (nano-banana) and huggingface providers only respect prompt; they return one image at their own size.
  • codex (gpt-5.4-image) requires ChatGPT Plus/Pro and uses SSE streaming. Not for batch use. Zernio will return 400.
  • FLUX.2 Klein 4B is small but free — quality is good for stylized art, weaker for photorealistic faces. Use 9B for higher fidelity.
  • Image content from Cloudflare is moderated. NSFW prompts return 400 with moderation error. Don't try to bypass.
  • timeout=120 — first call can take 30-60s for cold model load. Set generous timeout.

Available templates

  • templates/generate_image.py — CLI: generate + optional IG post via Zernio. Uses FLUX.2 Klein 4B by default. Supports --list to dump available models.

Reference docs

  • references/upstream-skill.md — full upstream decolua/9router SKILL.md for /v1/images/generations
  • references/model-catalog.md — full model list with owned_by and known params

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.