The self-hosted gateway for your LLM keys

LutraGate puts your OpenAI, DeepSeek, Kimi and Groq keys behind one OpenAI-compatible endpoint: weighted routing, automatic failover and a built-in web admin — up the moment the container starts.

OpenAI-compatible · AGPL-3.0 · one SQLite file

The admin UI ships with the gateway. Open the root URL: config, logs and usage are already there.

The dashboard aggregates request volume, success rate, token usage and per-provider latency percentiles; logs sync into your browser every 5 minutes.

Weighted LLM routing, automatic failover. Clients see one endpoint.

Upstream 5xx, 429, timeouts and network errors retry on the next channel; three straight failures cool a channel down for 60 seconds, recovering lazily. /v1/models narrows to each key grants.

Two-tier API credentials, per-user grants. lgm_ manages config; lgk_ calls models.

OpenAI-compatible drop-in

Point your client at the gateway with a lgk_ access key — nothing else changes.

Grant LLM channels per user

Tick only the channels a family key may use; save the set, live in seconds.

Keys never leave your self-hosted gateway

Provider keys are stored AES-GCM-encrypted and decrypted only in the forwarding instant; credentials are hashed, plaintext shown once.

Provider presets built into the gateway

Endpoints and model presets for six providers are ready to fill in; probe each one from the admin.

One command starts the gateway. The admin UI is at the root URL.

Clone the repository, configure .env, then start LutraGate with Docker Compose. SQLite data lives in a Docker volume. You can also deploy to Cloudflare Workers with D1.

Questions.

Anything else? Open an issue on the repo. Ask on GitHub

Is LutraGate free?

Yes, open source: the apps are AGPL-3.0, the shared and core packages MIT and free to reuse.

Where do my API keys live?

Only in your own database (SQLite or D1), AES-GCM-encrypted, decrypted in the forwarding instant.

Which API formats are supported?

OpenAI-compatible /v1/chat/completions first; Anthropic, Responses and Gemini native formats pass straight through too.

How does a family share one gateway?

The admin creates a user per person, ticks their grants and mints a lgk_ access key; every log line carries its owner, usage aggregates per key.

Docker or Cloudflare?

Docker and SQLite run on your server. Cloudflare Workers and D1 provide a hosted runtime and database. Both use the same gateway core.