Kong AI Gateway is the set of AI plugins that turns Kong Gateway into a single governed entry point for large language model traffic. It sits between your applications and model providers such as OpenAI, Anthropic and AWS Bedrock, routing requests, enforcing guardrails and tracking token use. The central question is whether it is the right way to manage LLM traffic, and the short answer is yes for teams running several models or several applications, because it puts the controls that otherwise spread across every codebase in one place.
Kong AI Gateway is not a separate product. It is a collection of plugins layered on Kong Gateway, the API gateway Kong has shipped for years, and the first AI plugins arrived with Kong Gateway 3.6 in February 2024. The base plugins, including AI Proxy and AI Prompt Guard, are open source, while the more advanced governance plugins need an Enterprise licence.
That history matters: the AI features sit on a proxy teams already trust with production API traffic.
Key takeaways
- Kong AI Gateway is a set of plugins on Kong Gateway, not a separate product, with the first AI plugins shipping in Kong Gateway 3.6 in February 2024.
- AI Proxy gives applications one provider-neutral request format, while AI Proxy Advanced adds multi-model load balancing and failover.
- Guardrails run before and after the model call, covering prompt safety, PII redaction and semantic checks on both directions.
- AI Semantic Cache and token-based rate limiting attack the two costs that surprise teams most: repeated prompts and runaway usage.
- It fits best when several applications or several models share one organisation, and it is overkill for a single application calling one model.
What is Kong AI Gateway?
Kong AI Gateway is Kong’s name for the AI capabilities of Kong Gateway, delivered as plugins. A request from your application arrives at a Kong route, passes through an ordered chain of AI plugins, and is then forwarded to a model provider. The response travels back through the same gateway, where response guardrails can inspect or rewrite it before it reaches the caller.
The design follows the same pattern as any API gateway. One entry point handles authentication, routing, rate limiting and logging for every caller, so each application does not have to implement those controls itself. Language model traffic brings its own problems: prompts can leak sensitive data, costs are charged per token, and the same question asked twice costs twice as much unless something remembers the first answer.
That is why the plugin set covers more than proxying. It includes routing between providers, safety checks on prompts and responses, redaction of personal data, caching by meaning rather than exact text, and limits counted in tokens rather than requests. Our guide to AI gateway architecture explains the wider pattern.
How the request pipeline works
When several AI plugins sit on one route, Kong runs them in a fixed priority order across three stages. The pre-LLM stage runs before anything reaches the model provider. It checks rate limits, rewrites or decorates the request, redacts personal data, and tests the prompt against safety rules.
A request that fails any of these checks never reaches the model, which saves both money and risk.
The second stage is dispatch. The AI Proxy plugin, or AI Proxy Advanced for several targets, translates your request into the provider’s native format and sends it on. Because translation happens in the gateway, your application sends one standard chat format and Kong adapts it for each provider.
Best for: teams that want to switch or compare models without rewriting application code.
The third stage runs after the model answers. Response guardrails inspect the completion, check it against forbidden topics, and can rewrite it into a required shape, such as structured JSON. Logging plugins record token counts and payloads, which is how the gateway feeds usage and cost reporting.
The plugins that matter most
AI Proxy is the foundation. It normalises one request format across providers and translates it to the target’s native format, then converts the response back. It is open source and it is the plugin to start with, because even a single-model deployment gains a standard interface and centralised logging from it.
Best for: any team that wants provider independence without building its own translation layer.
AI Proxy Advanced extends the base plugin to several providers and models at once. It adds load balancing between targets, with round-robin, weighted, consistent-hashing, lowest-latency, usage-based and semantic routing, plus retries and failover when a provider is slow or unavailable. Best for: production systems that cannot afford a single provider outage to stop them.
AI Prompt Guard checks requests against lists of allowed or denied expressions, using pattern matching. AI Semantic Prompt Guard does the same job by meaning, matching the prompt against forbidden topics with embeddings, so a paraphrased attempt at a blocked topic is still caught. Best for: blocking known misuse patterns, such as attempts to extract system instructions or discuss disallowed subjects.
AI Semantic Cache stores model responses and serves them again when a new prompt is close enough in meaning, using an embedding similarity threshold and a vector store such as Redis. Repeated questions are common in support and internal tools, so this is often where the gateway pays for itself. Best for: applications with repeated or near-repeated questions, such as help desks and internal knowledge assistants.
AI Rate Limiting Advanced limits usage by token count and cost, not just request count, which is the unit that drives the bill. AI Sanitizer, also called the AI PII Sanitizer, detects and redacts sensitive data across around twenty categories and nine languages before a prompt leaves your network. Best for: organisations that must show auditors that personal data never reaches a third-party model.
Comparing Kong AI Gateway with the alternatives
| Approach | How it works | Main strength | Main weakness |
|---|---|---|---|
| Kong AI Gateway | AI plugins on Kong Gateway, managed centrally | Full governance: routing, guardrails, cache and cost control in one place | Needs Kong expertise and an Enterprise licence for advanced plugins |
| Direct provider calls | Each application calls the model provider SDK itself | Simplest start, no extra infrastructure | Every control must be rebuilt in every application |
| A hand-built proxy | Your team writes a small service in front of the providers | Exactly fitted to your needs | You own the maintenance, failover and guardrails forever |
| Managed cloud gateway | Your cloud provider hosts the gateway control plane | Less infrastructure to run | Less control over the data plane and the plugin set |

Choosing between Kong AI Gateway and building your own
The honest test is how many applications and models you run. One application calling one model gains little from a gateway, because the controls it needs can live in that one codebase. The case for Kong grows with every additional application, model and team, because each one would otherwise reimplement authentication, logging, rate limiting and safety checks in its own way.
Cost is the second test. The open source plugins cost nothing but the infrastructure to run them, while the advanced plugins need an Enterprise licence, so the total price depends on which features you actually need. Compare that with the cost of one incident: prompts leaking customer data, or a runaway process spending a large token budget, can cost far more than the licence.
Operational skill is the third test. Kong Gateway is a mature product with a large plugin ecosystem and a declarative configuration tool called decK, which manages routes and plugins from Git. Teams that already run Kong for ordinary APIs will find the AI plugins a small step, while teams new to gateways should start with the open source plugins on one route.
See our guide to AI control plane architecture for how the configuration and policy side of this kind of system is organised.
What to watch out for
Plugin ordering is the most common source of confusion. Plugins run in a fixed priority order, so a cache check that runs after a guardrail behaves differently from one that runs before it, and a rate limit that runs after the model call cannot prevent the spend it was meant to stop. Check the priority of each plugin and test the order with real requests before going live.
Failover needs testing too. Load balancing and retries only help if they are exercised, and a fallback that has never been triggered is a guess, not a safeguard. Simulate a provider outage in staging and confirm traffic moves and the logs show what happened.
Our guide to AI inference failover covers the same discipline for model serving itself.
Finally, the gateway cannot fix a bad prompt or a weak model. Guardrails catch misuse and leakage, caching cuts repetition, and routing picks the best available model, but the quality of the answer still depends on the model and the prompt it receives. Treat the gateway as governance around the model, not as a substitute for prompt design and evaluation.
LLM production monitoring is the companion practice that tells you whether answers are actually good once the gateway is in place.
Kong AI Gateway checklist
- Start with AI Proxy on one route, so applications share a single provider-neutral format.
- Add AI Prompt Guard and the PII sanitizer before any route carries real user data.
- Set token-based rate limits per team or application, not just per request.
- Enable the semantic cache on routes with repeated questions and measure the hit rate.
- Configure AI Proxy Advanced with at least two providers or models and test failover in staging.
- Check the plugin order on every route, so guards run before dispatch and response checks after it.
- Log token counts per consumer and review cost weekly until usage is stable.
- Keep gateway configuration in Git with decK so changes are reviewed and reversible.
- Test a provider outage in staging before relying on failover in production.
- Review which plugins need an Enterprise licence before promising a feature to a team.
Frequently asked questions
Is Kong AI Gateway a separate product from Kong Gateway?
No. It is a set of AI plugins that runs on Kong Gateway, managed through the same routes, services and control plane. The first AI plugins shipped in Kong Gateway 3.6 in February 2024, and the set has grown since, with the most advanced governance plugins requiring an Enterprise licence.
Which model providers does Kong AI Gateway support?
Because the gateway translates between formats, your application sends one standard request and Kong adapts it.
Can Kong AI Gateway stop prompts leaking personal data?
Yes, with the AI Sanitizer plugin, which detects and redacts sensitive data before a prompt leaves your network, and the prompt guard plugins, which block disallowed content. No filter is perfect, so they should sit alongside data handling rules that keep the most sensitive data out of prompts entirely.
How does the semantic cache differ from an ordinary cache?
An ordinary cache only matches identical requests. The semantic cache compares the meaning of a new prompt with cached ones using embeddings, so a differently worded version of a question already answered can be served from the cache without a model call, saving cost and latency.
Do I need Kong Enterprise to use Kong AI Gateway?
No, not for the base plugins. AI Proxy, AI Prompt Guard and the prompt decorator are open source. The advanced plugins, including AI Proxy Advanced, the semantic guards, the semantic cache and token-based rate limiting, need an Enterprise licence.
When is Kong AI Gateway the wrong choice?
When one application calls one model and has no compliance requirements, a gateway adds infrastructure without much benefit. It is also a poor fit if your team has no one to run Kong Gateway, since an unmaintained gateway is worse than no gateway at all.







