Skip to main content

AI Gateway

Stacklok Enterprise

The AI Gateway is a component of Stacklok Enterprise.

Learn more about Stacklok Enterprise.

The AI Gateway is a self-hosted control point between AI clients and large language model (LLM) providers. Platform and security teams use it to enforce identity, budget, routing, data protection, and audit policies for model traffic.

The AI Gateway governs model access. The Connector Gateway governs MCP tool access.

What you can do

  • Set cost budgets for users and groups.
  • Route model names across providers with weighting and failover.
  • Screen requests and responses for prompt injection, payment card data, and personally identifiable information (PII).
  • Record structured audit events and forward them to a security information and event management (SIEM) system.
  • Associate requests with identities while keeping provider credentials in the gateway.

How configuration works

Apply AIGateway and AIPolicy custom resources to configure providers, routing, resilience, and screening. The AI Gateway operator reconciles those resources into running infrastructure.

Manage budgets in the console or use the management API for automation and bulk import. See Manage budgets and Budgets and pricing.

Before you start

Install the AI Gateway before applying the examples in this section. See Configure the AI Gateway.

Examples on these pages use -n <NAMESPACE>, where <NAMESPACE> is the namespace your AI Gateway is installed into.

Contents