omnigate-ai
v1.0.3
Published
Privacy-first, self-hosted LLM API Gateway and Proxy for tracking token usage.
Maintainers
Readme
OmniGate AI 🌌
The Privacy-First LLM API Gateway for Developers & AI Agents
OmniGate AI is a self-hosted, local proxy server designed to sit between your code editors (like VS Code, Roo Code, Cline) and your LLM providers (OpenAI, DeepSeek, Anthropic). It intercepts API requests to securely inject your real API keys, count tokens, and calculate costs in real-time—all without your secret keys ever leaving your machine.
🚀 Quick Start
No complex installations required. If you have Node.js installed, simply run:
npx omnigate-aiThis will instantly download and start the proxy server on port 8080.
💻 The Dashboard
Once the server is running, open your web browser and navigate to: http://localhost:8080/dashboard
You will be greeted by a beautiful, glassmorphic UI where you can:
- Secure Your Gateway: Create a local "Gateway Secret Key" to lock down your proxy.
- Add API Keys: Securely store your real OpenAI or DeepSeek API keys locally.
- Track Usage: Watch real-time gauges spin as your tokens are consumed, showing you exact costs and RPM (Requests Per Minute).
- Audit Logs: View a live feed of every single request your AI tools are making behind the scenes.
🛠️ Integrating with VS Code / AI Agents
Continue Extension (VS Code)
Replace your ~/.continue/config.yaml with the following:
name: OmniGate Local Config
version: 1.0.0
schema: v1
models:
- name: DeepSeek (via OmniGate)
provider: openai
model: deepseek-v4-pro
apiBase: http://localhost:8080/v1/
apiKey: your-gateway-secret-key
roles:
- chat
- edit
- apply
requestOptions:
headers:
X-Gateway-Key: your-gateway-secret-key
X-Gateway-User-ID: your-name
X-Gateway-Project-ID: your-project-nameImportant: Continue v2.0+ requires
name(nottitle),roles, and the top-levelschema: v1field. Without these, you'll see a "config error" in the VS Code status bar.
Roo Code / Cline / Other Agents
- Set the Provider to
OpenAI Compatible. - Set the Base URL to
http://localhost:8080/v1. - Set the API Key to your Gateway Secret Key (the one you created in the dashboard, not your real OpenAI key).
Now, start coding! OmniGate AI will silently intercept the requests, inject your real API key, forward it to the provider, and track your tokens on the dashboard.
🤖 Routing Your Custom AI Apps (Python & Node.js)
Are you building your own AI apps? You can easily route them through OmniGate AI to track their token usage too! Just change the base URL in your official OpenAI SDK to point to your local proxy.
Python Example:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1", # Point to your proxy
api_key="your-gateway-secret-key" # Use your local secret
)Node.js Example:
import OpenAI from 'openai';
const openai = new OpenAI({
baseURL: "http://localhost:8080/v1", // Point to your proxy
apiKey: "your-gateway-secret-key" // Use your local secret
});✨ Features
- 🔒 100% Local Privacy: Your real API keys are saved locally. Cloud-based AI tools never see them.
- 💸 Token & Cost Tracking: Accurate token counting and real-time cost estimation for OpenAI and DeepSeek models.
- 🛡️ Rate Limit Protection: Monitor your RPM to prevent accidental massive API bills from rogue agents.
- 📡 Live Audit Log: Total transparency into what your automated agents are actually sending to the LLMs.
- ⚡ Zero Configuration: Starts instantly with a single
npxcommand.
🌐 Website
Visit our Landing Page for more information.
📄 License
MIT License
