FreeRouter Gateway
Self-hosted, OpenAI-compatible gateway for free LLM providers — with a dashboard, encrypted key storage, gateway-key auth, and usage analytics.
@freerouter/gateway is a self-hosted server that wraps @freerouter/sdk in a deployable package. It exposes OpenAI-compatible /v1/chat/completions and /v1/models endpoints, stores your free-provider API keys encrypted at rest, issues gateway keys so clients never see provider secrets, and ships a bundled web dashboard for management and analytics.
Getting Started
Install, run, and make your first request.
Configuration
Data directory, env vars, CORS, and encryption.
Provider Keys
Connect free-tier provider keys via the API.
Gateway Keys
Issue and use gateway keys in clients.
Analytics
Usage summary, timeseries, and events.
API Reference
All management and proxy routes.
Development
Run the dev server with HMR and the Vite proxy.
Why a gateway?
- One key for clients. Issue a
fr-live-...gateway key; clients use it instead of provider keys. Provider secrets stay server-side and encrypted. - Bring your own free keys. Connect Groq, Google, OpenRouter, and more — the gateway routes to them at $0 cost.
- Dashboard + analytics. Manage providers, keys, and watch usage from a local web UI.
- OpenAI-compatible. Any OpenAI SDK client works by pointing
baseURLat the gateway.
Packages
| Package | Description |
|---|---|
@freerouter/sdk | Core routing SDK (BYOK, failover, alias resolution). |
@freerouter/api | Stateless Hono server exposing OpenAI-compatible endpoints. |
@freerouter/gateway | Self-hosted gateway: SDK + encrypted key storage + dashboard + analytics + gateway-key auth. |
Quick Links
- Getting Started — install, run, first request
- Configuration —
FREEROUTER_HOME, CORS, encryption - Provider Keys — connect free provider keys
- Gateway Keys — issue and use client keys
- Analytics — usage endpoints
- API Reference — every route
- Development —
bun run devand route testing
Source
- GitHub: github.com/r2hu1/freerouter