01
User console
Provide account access, plans, top-ups, API key management, model discovery, and per-user usage and billing views.
Open Source LLM Infrastructure
Self-hostableA public, self-hosted LLM gateway with user and admin consoles, an OpenAI-compatible API, provider routing, quota enforcement, and usage billing.
The repository contains the complete web, administration, and API services required to operate the gateway yourself. A direct FastAPI relay is available for simple deployments, while an optional Envoy path handles higher-throughput traffic without moving billing work onto the request path.
Included in the repository
01
Provide account access, plans, top-ups, API key management, model discovery, and per-user usage and billing views.
02
Manage users, orders, upstream channels, models, rates, plans, routing policies, route weights, and operational statistics.
03
Expose OpenAI-compatible chat completions, embeddings, and model discovery while connecting to OpenAI, Anthropic, and Gemini upstreams.
04
Apply authentication, balance and quota checks, rate limiting, usage recording, and billing through one control plane.
05
Configure channels, models, routes, policies, and weights from the admin application, with changes propagated to running gateway instances.
06
Run a C++ hot path with external authorization and asynchronous gRPC access logs while retaining the direct FastAPI relay for smaller deployments.
Architecture
Technology stack
Quick start
git clone https://github.com/wilsonwu/llmxy.git
cd llmxy
cp .env.example .env
docker compose up -d --buildProject repositories