Skip to content
Conduit

skill

9router-v2

Self-hosted AI gateway — one endpoint, many providers, auto-fallback. OpenAI-compatible REST API with Cloudflare Workers AI automation.

feril3/9router-v2communitylistedunreviewed

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/feril3/9router-v2 itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 26, 2026

9Router v2

A self-hosted AI gateway — one endpoint, many providers, auto-fallback.

9Router v2 is a decoupled rewrite of 9Router with a clean separation between a dedicated Express backend and a Vite + React frontend. It exposes an OpenAI-compatible REST API that proxies requests across dozens of AI providers with automatic load balancing, fallback, and key rotation.


Screenshots

Login PageQuota Tracker

Features

  • OpenAI-compatible API — works with any client that supports /v1/chat/completions, /v1/images/generations, /v1/audio/speech, /v1/embeddings, etc.
  • Multi-provider routing — Cloudflare Workers AI, OpenAI, Anthropic, Gemini, Groq, and many more
  • Cloudflare Workers AI Automation — automates account registration and API key extraction with Playwright + 2Captcha + Ammail temp mail
  • Dashboard UI — manage providers, connections, proxy pools, CLI tools, and automation from a modern dark-mode interface
  • OIDC / Password authentication — single sign-on or local credentials
  • Agent Skills — ready-to-use SKILL.md files for Claude, Gemini, Codex, and other AI coding agents
  • SQLite backend — zero-dependency local database, no external services required

Architecture

9router-v2/
├── backend/          # Express server (port 3001)
│   └── src/
│       ├── routes/   # Auto-routed endpoints (/v1, /api, /auth, ...)
│       ├── db/       # SQLite via better-sqlite3
│       └── automation/ # Playwright automation scripts
├── frontend/         # Vite + React SPA (port 5177)
│   └── src/
│       ├── pages/    # Dashboard pages
│       └── shared/   # Components, hooks, constants
└── skills/           # Agent SKILL.md files

Quick Start

Requirements

  • Node.js 20+
  • Python 3.10+ (for automation features)
  • Chromium (for Playwright automation)

Install

git clone https://github.com/ahwanulm/9router-v2.git
cd 9router-v2
npm install

Development

npm run dev          # Start both backend + frontend concurrently
npm run backend      # Backend only (port 3001)
npm run frontend     # Frontend only (port 5177)

Environment Variables

Copy and configure the backend environment:

cp backend/.env.template backend/.env

Key variables:

VariableDescription
PORTBackend server port (default: 3001)
REQUIRE_LOGINEnable authentication (true/false)
JWT_SECRETSecret for JWT signing
ADMIN_PASSWORDDashboard admin password

Production Deployment

1. Build Frontend

cd frontend && npm run build

2. Start Backend

cd backend && npm start

3. Nginx Reverse Proxy

Use the included nginx.conf to proxy /api and /v1 to the backend while serving the built frontend statically. See docs/deployment-linux.md for a full Linux deployment guide.


Cloudflare Workers AI Automation

The automation module automatically registers Cloudflare Workers AI accounts:

  1. Configure Ammail temp mail credentials in Dashboard → Automation → Settings
  2. Add a 2Captcha API key for Turnstile solving
  3. Add email accounts in the Automation tab and click Run
  4. API keys are extracted and added to 9Router automatically

Agent Skills

Skills are SKILL.md files for AI coding agents. Paste the entry skill URL into your AI:

Read this skill and use it:
https://raw.githubusercontent.com/ahwanulm/9router-v2/refs/heads/master/skills/9router/SKILL.md

Browse all skills in the Dashboard → Skills page or in the skills/ directory.


API Reference

EndpointDescription
GET /api/healthHealth check
GET /v1/modelsList available chat/LLM models
POST /v1/chat/completionsChat completions (streaming supported)
POST /v1/images/generationsImage generation
POST /v1/audio/speechText-to-speech
POST /v1/audio/transcriptionsSpeech-to-text
POST /v1/embeddingsText embeddings
GET /v1/searchWeb search

License

MIT — see LICENSE


Acknowledgements

🙏 Thanks to 9Router — this project is a fork and architectural rewrite of the original 9Router monolith. The core routing logic, provider integrations, and many features were inspired by and built upon the excellent work of the 9Router project.

↑↓ navigate openesc close