Keep one client endpoint
Map a client model name to upstream models. Use OpenAI Chat Completions, Responses, Anthropic Messages, or native Gemini requests.
Open source LLM gateway
Connect your apps, scripts, and agents through one endpoint. Manage model mappings, upstream providers, and access from the included console.

Gateway features
Map a client model name to upstream models. Use OpenAI Chat Completions, Responses, Anthropic Messages, or native Gemini requests.
Route across eligible channels by weight. Retry on another eligible channel after rate limits, server errors, timeouts, or network errors.
Grant household members access to specific upstream keys. Each user sees their permitted models and can track usage by access key.
Model mappings and user grants determine which channels can handle a request. Another eligible channel can take over after a retryable error.
POST /v1/chat/completionsRun Docker with SQLite on your server, or deploy on Cloudflare Workers with D1.
Create the first administrator, add providers, upstream keys, and model mappings, then grant users access.
Set the gateway as the client API base URL, enter the user’s access key, and send a request with a configured model name.
Run it with Docker and SQLite on your own server, or deploy on Cloudflare Workers with D1. Both options include the web console.
Yes. Point the client API base URL at the gateway, provide an lgk_ access key, and select a configured client model name. Chat Completions supports streaming.
For 429 and 5xx responses, timeouts, and network errors, the gateway tries another eligible channel. It passes through other upstream 4xx responses.
Yes. An administrator can create individual users and grant access to specific upstream keys. Users manage their own access keys and see the models they can reach.
The console shows requests, token usage, and latency. Users can see their own usage by access key, and administrators can see activity across the gateway.
The server, Worker, and admin console use AGPL 3.0. The shared and core packages use the MIT license.
Start with Docker or Cloudflare Workers, then connect your clients using the provider API keys you already have.
View setup guide