AI GLOSSARY · AGENTS AND AGENT TOOLING

LLM gateway

Markdown version

Definition

An LLM gateway is a service that sits between applications and language-model providers, giving them one endpoint and handling routing, keys, usage tracking and limits. IBM describes an AI gateway as middleware that extends standard API gateways.

Also called: AI gateway, LLM proxy, LLM API gateway, AI gateway proxy.

In plain language

If a company's apps call several AI providers, each app needs its own keys, its own billing view and its own error handling. An LLM gateway is a single front door: apps send their requests there, and the gateway forwards each one to the right provider and reports the usage. Think of a company switchboard that connects each call to the correct line and keeps a log. A gateway can also set spending limits and switch to a backup model when one provider is down. It adds one more service to run and secure, and it sees your prompts, so a mistake or breach there reaches every app behind it.

Technical definition

A gateway exposes one API, often OpenAI-compatible, and translates each request into the format of the chosen provider. LiteLLM's documentation describes a proxy server that exposes one OpenAI-compatible endpoint, virtual keys that set models, budgets and rate limits per user, team or project, spend tracking, and load balancing, fallbacks and retries. Cloudflare's AI Gateway page lists analytics, logging, caching, rate limiting and fallback. IBM describes AI gateways as extending standard API gateways with multi-model access, token tracking and rate limiting, and says they can scrub sensitive data such as personally identifiable information. Features differ by product, so read each one's docs.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    llm-cost-estimator 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A monthly LLM cost range worked out from a usage profile and your own price table, with cache, batch and subscription effects.
    Why it exercises the concept
    A gateway reports spend after the fact. This estimates it beforehand, so the budget a gateway enforces is not a guess.
  2. Skill by Skill Almanac · Illustrative, not executed

    agent-session-cost-review 58/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A review of where a coding-agent session spent its tokens, found by parsing the saved session transcript.
    Why it exercises the concept
    It answers the question a gateway's usage log answers, but from a coding agent's own transcript when no gateway sits in the path.
  3. Guide · Illustrative, not executed

    Autonomous AI Agents: Risks and Guardrails

    What you see
    What goes wrong when an AI agent acts unattended, and the limits, approvals and stopping rules that contain it.
    Why it exercises the concept
    Budgets and rate limits at a gateway are one place such limits can live, outside the agent itself.

How it shows up when you use agents

A gateway matters when an agent, or a team of agents, makes many model calls. Instead of putting a provider key in each tool, you point the tool at the gateway's address and give it a gateway key. The gateway then forwards the request, records the cost, and can apply a budget or a rate limit.

What breaks when it is misunderstood: people expect a gateway to cut inference cost by itself. It reports and caps spend, and features such as caching or fallback help only when switched on and configured. Another failure is forgetting that a gateway deployed without adequate redundancy can become a single point of failure, and it holds your keys, so it needs the same care as a password vault.

Next action: list which of your apps call model providers, decide whether you need shared keys, budgets or logs, and read the docs of the product you pick. For a hosted option see OpenRouter, which is a different kind of service. For tracing individual requests see observability.

Common confusions

  • LLM gateway versus API gateway. An API gateway routes ordinary web traffic. IBM describes an AI gateway as extending one with model-specific functions such as token tracking.
  • LLM gateway versus model router. A gateway is the layer that connects and controls access. Routing between models is one function it may offer, not its whole purpose.
  • Self-hosted gateway versus hosted marketplace. A self-hosted gateway runs on your infrastructure with your provider accounts. A hosted marketplace is a service run by someone else.
  • Myth: a gateway makes prompts private. The gateway sees the prompts it forwards. Any filtering is something you configure.

Terms that mention LLM gateway

3 terms mention this one

More in Agents and agent tooling

Next steps

  1. Autonomous AI Agents: Risks and Guardrails The long-form guide.
  2. llm-cost-estimator A skill that exercises it.
  3. AI observability (LLM observability) Related term.
  4. Rate limit Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by Claude (original draft) and Codex (targeted revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : First version.
  • : Verifier pass: applied verifier corrections to unsourced or overstated claims.
  • : Scoped claims and exceptions from independent batch02 review; affected-claim recheck pending.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.