Open Keyboard LLM Gateway
A lightweight TypeScript gateway for privacy-first AI writing workflows and local model routing.
This project supports Open Keyboard, an AI writing workflow where the keyboard client can call a controlled backend instead of talking directly to a model provider.
The gateway authenticates client keys, rate-limits requests, exposes OpenAI-compatible chat completions, and routes requests to local Ollama models. It keeps model infrastructure under user control while preserving a simple client integration surface.
What this demonstrates: Practical backend architecture for self-hosted AI tools, including auth, model access control, admin operations, Docker deployment, and tests around critical API behavior.
Technical Highlights
API Key Authentication
Validates bearer keys, supports key enablement and revocation, and restricts access before model requests reach the proxy layer.
Rate Limiting
Applies per-key request limits so keyboard clients and experiments can share the backend without uncontrolled traffic.
Local Model Routing
Routes OpenAI-compatible chat requests to Ollama, enabling local model use without changing the client integration pattern.
Admin Operations
Includes an admin API and UI path for key management, model configuration, and operational control of client access.
Technology Stack
Gateway
Runtime
Repository Entry Points
The project is structured around a small gateway core, middleware for request control, and deployment files for local hosting.
Review the gateway implementation, the client project it supports, and the self-hosted AI workflow behind the keyboard experience.