What every AI gateway does

The common ground

  • One API in front of several providers
  • Provider keys held in one place
  • Routing, with a fallback
  • Limits per caller
  • A log of each call

Analysts and vendors describe the category in much the same words: an intermediary between applications and AI models. Gartner tracks AI gateways as a market of their own, and IBM’s explainer gives the same outline.

In practice that comes down to a short list. Applications call one API instead of each provider’s own. Provider keys are held at the gateway, not in every application. Requests are routed to a model, with another to fall back on. Usage is limited per caller, and each call is logged. Newer products extend the same idea from model calls to the tools and agents a model reaches.

An ordinary API gateway does some of this for any traffic. The AI kind is its own category because of what the traffic carries: prompts with company data in them, usage counted in tokens, and answers produced by a model.

Where gateways differ: convenience or control

Two products can share that whole list and still do different jobs. The difference is what happens at the moment a request passes.

Built for convenience

  • What it is for

    Making providers interchangeable, so a developer can change model quickly.

  • What it reads

    Where the request is going and how large it is.

  • A request no rule mentions

    Goes through, unless a limit is reached.

  • What it keeps

    A log of calls, for debugging and for cost.

Built for control

  • What it is for

    Deciding what may leave the organisation, before anything does.

  • What it reads

    What the request contains: its data class, the identity behind it, the tools it asks for.

  • A request no rule mentions

    Is refused. A rule has to allow it first.

  • What it keeps

    An audit record of each decision: the rule that produced it, the data class and the constraints in force.

The first kind answers a developer’s question: how do I call any model without rewriting my code. The second answers the question a security, data protection or risk lead is asked: what left, where did it go, and who allowed it.

Four questions to ask of any AI gateway

  1. Where is the decision made? Before the request is routed, by rules, or afterwards, from logs. See Should an AI policy decision be made by an AI model?
  2. What happens to a request no rule matches? See What does deny-by-default mean for AI use in an organisation?
  3. What does the record of a call hold, and whose identity is on it? See Can you attribute AI token usage to the team that spent it?
  4. What does changing provider cost your applications? See Can you change AI provider without rewriting your integrations?

Where PreRoute sits

PreRoute is the second kind. Policy is evaluated on every request against the data class, the requesting identity and the tools involved, before a provider is chosen. A request no rule matches is refused. The identifiers it recognises are redacted before the call. Every decision is written to an audit record that holds no request content.

PreRoute is the control plane every AI call passes through: policy is decided before a model is chosen, and every decision is written down.

Read next