Install
$ agentstack add skill-fajrisilmi12-cyber-hermes-socmed-function-image-gen-9router ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →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 3openai/dall-e-3— OpenAI DALL-E 3cf/@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
Authorizationheader even though 9Router is local. Without it, returns 401Invalid API key. The env var name isNINEROUTER_KEY, value typicallysk-...35 chars. - Some providers ignore
sizeandn.gemini(nano-banana) andhuggingfaceproviders only respectprompt; 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--listto dump available models.
Reference docs
references/upstream-skill.md— full upstreamdecolua/9routerSKILL.md for/v1/images/generationsreferences/model-catalog.md— full model list withowned_byand known params
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: fajrisilmi12-cyber
- Source: fajrisilmi12-cyber/hermes-socmed-function
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.