← AI glossary

AI glossary · Advanced · AI platforms & solutions · MLOps & LLMOps

LLM gateway

An LLM gateway is an intermediate layer that places a single entry point between multiple apps and the multiple AI models they use, routing every request through it. This entry point handles authentication, model selection (routing), cost management, logging and security checks in one place.

About this term
Level
Advanced · Specialist terms that need the inner workings
Added
2026-10-08
In plain words It is like a company's main switchboard. Employees only need to know the switchboard number, and the switchboard connects them to the right department while also keeping call records and managing charges. However, just as all calls drop if the switchboard goes down, a gateway failure can bring all AI features down at once.

How it works

Apps such as internal chatbots, coding tools and workflow automation send requests to a single gateway address instead of calling each model provider's API separately. The gateway checks whether the requesting person or team has permission, then forwards the request to an external model or a model served in-house according to predefined rules. When the response comes back, it returns it to the app unchanged while logging the number of tokens used, the time taken and the cost. Many gateways convert multiple providers' APIs into one common format, so models can be switched without major changes to app code.

Where an LLM gateway sitsInternal chatbot → LLM gateway; Coding tool → LLM gateway; Workflow automation → LLM gateway; LLM gateway → External model A(Routing); LLM gateway → External model B; LLM gateway → In-house model(Fallback); LLM gateway → Usage logs(Logging)Internal chatbotCoding toolWorkflowautomationLLM gatewayAuthentication ·routingGuardrails · cachingExternal model AAPIExternal model BAPIIn-house modelSelf-servedUsage logsTokens · cost · timeRoutingFallbackLogging
Where an LLM gateway sits Apps on the left send requests to a single gateway, which forwards them to the appropriate model and keeps usage logs. App and model names are examples.

Why it matters

As more teams inside a company use AI, API keys end up scattered everywhere, and it becomes hard to track who is using how much and what data is leaving the company. A gateway lets you handle key management, per-team usage limits and cost allocation in one place. You can also set up fallbacks that automatically route requests to another model when one model slows down or goes down. Guardrails that mask personal information or block risky requests, and caching that reuses answers to identical questions, also fit well at this point.

Things to know

Because every request passes through one point, a slow or stalled gateway affects the whole service. That is why it needs to run on multiple instances with continuous health monitoring. Fitting many models into a single format can also make it hard to use features unique to a particular model right away. In addition, prompt and response logs accumulate in the gateway, so these logs should themselves be treated as sensitive data, with defined access permissions and retention periods.

Example

In companies where several departments build their own generative AI features, a platform team typically sets up a single LLM gateway and requires every team to access models only through it. For example, rules might send a customer support chatbot to a fast, cheap model and a contract review tool to a high-performance model, and at the end of the month the gateway logs are used to split usage and costs by department. Open-source gateways and managed AI gateway services from cloud providers are used for this purpose.

Related terms