OpenAI-compatible
Point any OpenAI SDK, LangChain or curl at /v1. Unknown fields pass through to your backend.
Your gateway is running
localgate sits in front of Ollama, llama.cpp, vLLM or any OpenAI-compatible server and adds what they leave out: API keys, token accounting, memory past the context window, a dashboard, and a coding agent.
Point any OpenAI SDK, LangChain or curl at /v1. Unknown fields pass through to your backend.
Per-app keys you can rate-limit and revoke, with prompt and completion tokens counted per key and model.
Send an X-Session-ID and earlier turns are stored, embedded and recalled, so a small model remembers more than its window.
localgate code edits your project with a local model: diffs before every write, undo, @file, !shell, Esc to stop.
localgate doesn't run models itself; it talks to your model server. With Ollama:
ollama serve
ollama pull llama3
ollama pull nomic-embed-text # optional: enables memory
The first localgate serve asked you to create a login. Use that email and password at the dashboard. Skipped it, or need another account?
localgate users create
Scripts can use the server's admin key instead (localgate admin-key shows it); keep it to yourself and never put it in an app.
In the dashboard under API keys, or from a terminal on this machine:
localgate keys create --name my-app
The key (lg_…) is shown once. Revoke it any time without touching the others.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="lg_...")
reply = client.chat.completions.create(
model="llama3",
messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)
curl http://localhost:8000/v1/chat/completions \
-H "Authorization: Bearer lg_..." \
-H "Content-Type: application/json" \
-d '{"model": "llama3", "messages": [{"role": "user", "content": "Hello!"}]}'
On the machine with your models, no key or login needed:
cd your-project
localgate code
/init writes LOCALGATE.md project instructions@file attaches a file, !cmd runs a shell command/undo reverts the last writeOn a laptop with no models of its own, install localgate and run the agent — it asks where models should run:
pip install localgate
localgate code
Owner: Dashboard → Share creates a key for each device — which models, which networks, how many tokens — with a QR code that sets it up. Turn on Internet access there for devices on other networks.