API Gateway
9router-hub
A lightweight OpenAI-compatible API gateway that routes requests to multiple AI providers through a unified interface.
Get StartedOverview
9router-hub acts as a proxy server that aggregates multiple AI providers (like OpenRouter) behind a single OpenAI-compatible API endpoint. It allows you to switch between different AI models and providers without changing your client code.
Key Features
OpenAI-compatible API
Drop-in replacement for OpenAI API clients — swap the base URL and keep your existing code.
Multi-provider support
Route requests to OpenRouter, Groq, DeepSeek, and any OpenAI-compatible provider — all from one endpoint.
Configurable providers
Define providers via providers.json or use built-in defaults — add new models in seconds.
Docker support
Ready-to-deploy containerized application with multi-architecture builds — ship anywhere.
Zero dependencies
Lightweight Node.js server with no external packages — pure runtime, minimal footprint.
Quick Start
Configuration
Providers are configured via providers.json or environment variables:
Tech Stack
Built with modern, lightweight tooling:
- Node.js 22 (Alpine Linux)
- Pure Node.js HTTP server
- Docker multi-arch
- OpenAI-compatible API
Project structure:
- ├── server.js — Main application server
- ├── providers.json — Provider configuration (optional)
- ├── 9router-dashboard.html — Web dashboard interface
- └── Dockerfile — Container configuration