AI Gateway Overview
Elchi AI Gateway puts one governed entry point for LLM providers and MCP tools on your edges: provider keys stay in the control plane, consumers get their own keys and quotas, and every request is measured.
Get Started with the AI Gateway
The shortest complete path to a first LLM request through Elchi AI Gateway: a provider, a gateway, a consumer key and an AI listener, in the UI or through the REST API.
Installation
Run elchi-ai-gateway on an edge: built into Elchi OS 0.8.0+, or installed on a plain Linux edge with its own installer, including offline installs, the engine version gate, config.yaml, sinks, upgrades and removal.
Providers
Every provider type the AI gateway accepts, its credential, endpoint and defaults, a client's own provider key, request changes, model lists, checks and provider status.
Gateways and Models
How a gateway is selected by host, which models it serves on which providers, models served by several providers with weights and fallbacks, the model lists, and what clients get for an unknown model.
AI Listeners
Creating the Envoy listeners that serve the AI gateways — HTTPS and plain HTTP entries, the 308 redirect, binding gateways and a default gateway, deploying, live changes and removal.
Consumers and Keys
Consumers of keyed gateways, their elchi virtual keys, the headers a key is accepted in, what each consumer may use, and what a missing, unknown or revoked key gets.
Quotas, Limits and Costs
Consumer quotas on requests, tokens and cost, how and when they count, the price table and how cost is computed, and the gateway and global token limits with CEL.
Calling the Gateway
How applications and agents call an AI gateway — base URL, endpoints, keys, streaming, OpenAI and Anthropic SDKs, curl, LangChain, Claude Code — and every error a client can get.
Sensitive Data
Find credentials, payment numbers and personal data in LLM requests on the edge, flag or block them before any provider sees them, and record every decision without the values.
Request Log
One row per LLM request — who, what model, which provider, tokens, status and timing — with optional prompt and answer content that is masked and encrypted on the edge and only the control plane can open.
Usage and Costs
Where the AI gateway's usage, cost, error rate, latency, refusals and provider status come from, how to read them in the UI and the API, and what each ClickHouse table keeps and for how long.
Operations
How an AI gateway change reaches the edges and how to verify it: deploy jobs and their per-edge results, Sync, per-edge status and files, refused pushes and last-good, older edges, loopback endpoints, logs, restarts, upgrades and removal.
Security Model
Where provider, consumer and MCP secrets live and travel, how the request path is isolated on the edge, and which headers, ports and logs the AI gateway protects.
Troubleshooting
Symptom, cause and fix for Elchi AI Gateway problems, from pushes that never reach an edge to 4xx/5xx answers, empty usage and MCP tool calls, with the exact place to check each.
MCP tools
7 items
Reference
3 items