-
AI Gateway Overview
Overview of AI gateway capabilities
-
Quickstart
Get started quickly with AI Gateway setup and usage.
-
AI Gateway Capabilities
Learn about the core capabilities of AI Gateway.
-
AI Usage Governance
Understand how to manage and govern AI usage effectively.
-
Data Governance
Explore how AI Gateway helps enforce data governance policies.
-
Prompt Engineering
Best practices and tools for designing effective prompts.
-
Guardrails and Content Safety
Implement safeguards to ensure safe and compliant AI outputs.
-
Request Transformations
Customize and transform AI requests with Gateway features.
-
Streaming
Learn how AI Proxy streaming works.
-
Audit log
Learn about AI Gateway logging capabilities.
-
Monitor AI LLM Metrics
Explore how to monitor AI LLM metrics in AI Gateway.
-
Advanced Analytics
Access advanced analytics features in AI Gateway.
All AI Gateway documentation
Overview
AI providers
-
AI Gateway providers
This page is an introduction to the AI providers available in Kong Gateway.
-
Anthropic Chat Route - AI Proxy Advanced
Set up Anthropic chat routing with the AI Proxy Advanced plugin.
-
Azure AI with Managed Identity - AI Proxy Advanced
Connect Azure AI services using Managed Identity through the AI Proxy Advanced plugin.
-
Azure Chat Route - AI Proxy Advanced
Configure Azure chat routing with the AI Proxy Advanced plugin.
-
Bedrock Chat Route - AI Proxy Advanced
Set up Bedrock chat routing with the AI Proxy Advanced plugin.
-
Cohere Chat Route - AI Proxy Advanced
Integrate Cohere chat routing with the AI Proxy Advanced plugin.
-
Gemini Chat Route - AI Proxy Advanced
Configure Gemini chat routing with the AI Proxy Advanced plugin.
-
Hugging Face Chat Route - AI Proxy Advanced
Set up Hugging Face chat routing with the AI Proxy Advanced plugin.
-
Llama 2 Chat Route - AI Proxy Advanced
Integrate Llama 2 chat routing with the AI Proxy Advanced plugin.
-
Mistral Chat Route - AI Proxy Advanced
Set up Mistral chat routing with the AI Proxy Advanced plugin.
-
OpenAI Chat Route - AI Proxy Advanced
Configure OpenAI chat routing with the AI Proxy Advanced plugin.
-
Anthropic Chat Route - AI Proxy
Set up Anthropic chat routing with the AI Proxy plugin.
-
Azure Chat Route - AI Proxy
Configure Azure chat routing with the AI Proxy plugin.
-
Bedrock Chat Route - AI Proxy
Set up Bedrock chat routing with the AI Proxy plugin.
-
Cohere Chat Route - AI Proxy
Integrate Cohere chat routing with the AI Proxy plugin.
-
Gemini Chat Route - AI Proxy
Configure Gemini chat routing with the AI Proxy plugin.
-
Hugging Face Chat Route - AI Proxy
Set up Hugging Face chat routing with the AI Proxy plugin.
-
Llama 2 Chat Route - AI Proxy
Integrate Llama 2 chat routing with the AI Proxy plugin.
-
Mistral Chat Route - AI Proxy
Set up Mistral chat routing with the AI Proxy plugin.
-
OpenAI Chat Route - AI Proxy
Configure OpenAI chat routing with the AI Proxy plugin.
AI Gateway plugins
-
AI Azure Content Safety
Use Azure AI Content Safety to check and audit AI Proxy plugin messages before proxying them to an upstream LLM
-
AI Prompt Decorator
Prepend or append an array of llm/v1/chat messages to a user's chat history
-
AI Prompt Guard
Check llm/v1/chat or llm/v1/completions requests against a list of allowed or denied expressions
-
AI Prompt Template
Provide fill-in-the-blank AI prompts to users
-
AI Proxy
The AI Proxy plugin lets you transform and proxy requests to a number of AI providers and models.
-
AI Proxy Advanced
The AI Proxy Advanced plugin lets you transform and proxy requests to multiple AI providers and models at the same time. This lets you set up load balancing between targets.
-
AI RAG Injector
Create RAG pipelines by automatically injecting content from a vector database
-
AI Rate Limiting Advanced
Provides rate limiting for the providers used by any AI plugins.
-
AI Request Transformer
Use an LLM service to transform a client request body prior to proxying the request to the upstream server
-
AI Response Transformer
Use an LLM service to transform the upstream HTTP(S) prior to forwarding it to the client
-
AI Semantic Prompt Guard
Semantically and intelligently create allow and deny lists of topics that can be requested across every LLM.
-
AI Sanitizer
Protect sensitive information in client request bodies before they reach upstream services
Plugin configuration reference
-
AI Prompt Decorator
Prepend or append an array of llm/v1/chat messages to a user's chat history
-
AI Prompt Guard
Check llm/v1/chat or llm/v1/completions requests against a list of allowed or denied expressions
-
AI Prompt Template
Provide fill-in-the-blank AI prompts to users
-
AI Proxy
The AI Proxy plugin lets you transform and proxy requests to a number of AI providers and models.
-
AI Proxy Advanced
The AI Proxy Advanced plugin lets you transform and proxy requests to multiple AI providers and models at the same time. This lets you set up load balancing between targets.
-
AI RAG Injector
Create RAG pipelines by automatically injecting content from a vector database
-
AI Rate Limiting Advanced
Provides rate limiting for the providers used by any AI plugins.
-
AI Request Transformer
Use an LLM service to transform a client request body prior to proxying the request to the upstream server
-
AI Response Transformer
Use an LLM service to transform the upstream HTTP(S) prior to forwarding it to the client
-
AI Semantic Prompt Guard
Semantically and intelligently create allow and deny lists of topics that can be requested across every LLM.
-
AI Sanitizer
Protect sensitive information in client request bodies before they reach upstream services
Plugin configuration examples
-
Create a complex chat history
Creates a detailed chat history by configuring the plugin to prepend and append multiple messages, allowing any user to continue the conversation.
-
Engineer a prompt with prepending
Prepends a prompt with specific instructions, such as responding in French, to control how the prompt responds.
-
Allow and deny
Configure the AI Prompt Guard plugin with a combination of allow and deny rules.
-
Allow only
Configure the AI Prompt Guard plugin to allow messages following a specific pattern.
-
Deny only
Configure the AI Prompt Guard plugin to deny messages following a specific pattern.
-
Block untemplated requests
Configure the AI Prompt Template plugin with a template and block any requests that don't include a template.
-
Chat route templates
Configure the AI Prompt Template plugin with two templates to use for chat routes.
-
Completion route template
Configure the AI Prompt Template plugin with a template to use for completions routes.
-
OpenAI SDK: Use the Azure deployment relevant to a specific model name
Configure a dynamic route to target multiple Azure OpenAI model deployments.
-
OpenAI SDK: Chat route with dynamic model selection
Configure a chat route that reads the target model from the request path instead of hardcoding it in the configuration.
-
OpenAI SDK: Proxy multiple models deployed in the same Azure instance
Configure one route to proxy multiple models deployed in the same Azure instance.
-
OpenAI SDK: Use an unsupported LLM model
Kong Gateway can attempt to support models that aren’t pre-configured with format transformers or are untested.
-
OpenAI SDK: One chat route with dynamic Azure OpenAI deployments
Configure a dynamic route to target multiple Azure OpenAI model deployments.
-
OpenAI SDK: Chat route with dynamic model selection
Configure a chat route that reads the target model from the request path instead of hardcoding it in the configuration.
-
OpenAI SDK: Use an unsupported LLM model
Kong Gateway can attempt to support models that aren’t pre-configured with format transformers or are untested.
-
RAG injection with OpenAI and Redis
Configure the AI RAG Injector plugin to inject content to use Redis as vector database and the OpenAI text-embedding-3-large model for embedding.
-
Enable LLM provider rate limiting
Protect your LLM services with rate limiting.
-
Request prompt function
Protect your LLM services by rate limiting requests based on a custom token.
-
Add data to a request body
Configure the AI Request Transformer plugin to use OpenAI GPT-4 to add an element to the client request body before proxying it.
-
Translate a request body
Configure the AI Request Transformer plugin to use OpenAI GPT-4 to translate the client request to a different language. In this example, we'll translate the client's question to French.
-
Add data to a response body
Configure the AI Response Transformer plugin to use OpenAI GPT-4 to add an element to the response body before returning it to the client.
-
Add a header to a response body
Configure the AI Response Transfomer plugin to use OpenAI GPT-4 to add a header to the response before returning it to the client.
-
Allow and deny messages
Allows messages about a topic as long as they don't contain information about another topic.
-
Only allow messages related to a topic
Only allows messages about a specific topic. For example, only allow messages about cats.
-
Only deny messages related to a topic
Only denies messages about a specific topic. For example, only deny messages about dogs.
-
Anonymize phone numbers
Configure the plugin to use your sanitizer service to anonymize phone numbers in requests before they reach the upstream service.
Plugin changelogs
-
AI Prompt Decorator Changelog
See the latest updates and improvements for the AI Prompt Decorator plugin.
-
AI Prompt Guard Changelog
See the latest updates and improvements for the AI Prompt Guard plugin.
-
AI Prompt Template Changelog
See the latest updates and improvements for the AI Prompt Template plugin.
-
AI Proxy Changelog
See the latest updates and improvements for the AI Proxy plugin.
-
AI Proxy Advanced Changelog
See the latest updates and improvements for the AI Proxy Advanced plugin.
-
AI RAG Injector Changelog
See the latest updates and improvements for the AI RAG Injector plugin.
-
AI Rate Limiting Advanced Changelog
See the latest updates and improvements for the AI Rate Limiting Advanced plugin.
-
AI Request Transformer Changelog
See the latest updates and improvements for the AI Request Transformer plugin.
-
AI Response Transformer Changelog
See the latest updates and improvements for the AI Response Transformer plugin.
-
AI Semantic Prompt Guard Changelog
See the latest updates and improvements for the AI Semantic Prompt Guard plugin.
-
AI Sanitizer Changelog
See the latest updates and improvements for the AI Sanitizer plugin.
AI load balancing
-
Consistent Hashing - AI Proxy Advanced
Set up consistent hashing for load balancing.
-
Lowest Latency - AI Proxy Advanced
Configure load balancing based on the lowest latency.
-
Lowest Usage - AI Proxy Advanced
Set up load balancing based on the lowest usage.
-
Priority - AI Proxy Advanced
Configure priority-based load balancing.
-
Round Robin - AI Proxy Advanced
Set up round-robin load balancing.
-
Semantic - AI Proxy Advanced
Set up semantic load balancing.
How-tos
-
Ensure chatbots adhere to compliance policies with the AI RAG Injector plugin
Learn how to configure the AI RAG Injector plugin.
-
Get started with AI Gateway
Learn how to quickly get started with AI Gateway
-
Set up AI Proxy Advanced with Anthropic in Kong Gateway
Configure the AI Proxy Advanced plugin to create a chat route using Anthropic.
-
Set up AI Proxy Advanced with OpenAI in Kong Gateway
Configure the AI Proxy Advanced plugin to create a chat route using OpenAI.
-
Set up AI Proxy with OpenAI in Kong Gateway
Configure the AI Proxy plugin to create a chat route using OpenAI.
-
Store a Mistral API key as a secret in Konnect Config Store
Learn how to set up Konnect Config Store as a Vault backend and store a Mistral API key.
-
Store and rotate Mistral API keys as secrets in Google Cloud
Learn how to store and rotate secrets in Google Cloud with Kong Gateway, Mistral, and the AI Proxy plugin.
-
Use AI to protect sensitive information in requests
Use the AI Sanitizer plugin to protect sensitive information in requests.
-
Use Azure Content Safety plugin
Learn how to use the Azure AI Content Safety plugin.
-
Use LangChain with AI Proxy in Kong Gateway
Connect your LangChain integrations with Kong Gateway with no code changes.
-
Visualize AI Gateway metrics
Use a sample Elasticsearch, Logstash, and Kibana stack to visualize data from the AI Proxy plugin.