Skip to main content

API Platform AI Gateway Overview

You're reading AI Gateway 1.0.0. The newest release is 1.2.0. Go to the newest release

A gateway for managing and securing AI traffic, including Large Language Model (LLM) APIs and Model Context Protocol (MCP) servers.

Quick start guides​

  • LLM quick start guide—Install the gateway, confirm the Gateway Controller admin health endpoint reports it healthy, and route traffic to an LLM provider such as OpenAI.
  • MCP quick start guide—Install the gateway, confirm the Gateway Controller admin health endpoint reports it healthy, and route traffic to an MCP server.

Deployment options​

You can run the AI Gateway in two ways:

  • Standalone: You configure LLM providers, LLM proxies, and MCP proxies through YAML files or the gateway's REST API. The gateway doesn't need a control plane.
  • Connected to a control plane: The gateway still runs in your infrastructure, and it receives artifacts from API Platform Cloud or WSO2 API Manager. To set up the connection, see Connect to a control plane. AI Workspace works with AI Gateway 1.2.0 and later, so a 1.0.0 gateway can't register with it.

Key Concepts​

LLM Provider Template​

An LLM Provider Template defines the characteristics and behaviors specific to an AI service provider, such as OpenAI, Azure OpenAI, or other LLM platforms. It describes how the gateway should interpret and extract usage and operational metadata, including prompt, completion, total, and remaining token information, as well as request and response model metadata.

Following templates are shipped out-of-the-box

  • OpenAI
  • Azure OpenAI
  • Anthropic
  • AWS Bedrock
  • Azure AI Foundry
  • Gemini

LLM Provider​

An LLM Provider represents a connection to an AI backend service such as OpenAI, Azure OpenAI, or other LLM APIs. Platform administrators configure LLM Providers to define:

  • The LLM Provider Template
  • The upstream LLM service URL
  • Authentication credentials (API keys, tokens)
  • Access control rules for which endpoints are exposed
  • Budget control policies, such as token-based rate limiting
  • Organization-wide policies such as guardrails

Once configured, the LLM Provider allows traffic to flow through the gateway to the AI backend.

LLM Proxy​

An LLM Proxy allows developers to create custom API endpoints that consume an LLM Provider, while inheriting administrator-enforced access control, budgeting and organization-wide policies defined at the provider level. Each proxy gets its own URL context (e.g., /assistant) and can have its own policies applied. This enables:

  • Multiple AI applications to share a single LLM Provider
  • Per-application policies such as prompt management and guardrails
  • Separation between platform administration and application development

MCP Proxy​

An MCP Proxy routes Model Context Protocol traffic to MCP servers. MCP is a protocol that enables AI assistants to interact with external tools and data sources. With MCP Proxies, you can:

  • Expose MCP servers through a centralized gateway
  • Apply authentication and access control to MCP traffic
  • Manage multiple MCP servers from a single control plane

Default Ports​

PortServiceDescription
8080RouterHTTP traffic
8443RouterHTTPS traffic
9090Gateway-ControllerREST API
9094Gateway-Controller AdminHealth and admin endpoints

Architecture​

┌─────────────────┐
│ LLM Providers │
│ (OpenAI, etc.) │
└────────▲────────┘
│
┌──────────┐ ┌──────────────┐ │
│ AI Apps │───▶│ AI Gateway │────┤
└──────────┘ └──────────────┘ │
│
┌────────▼────────┐
│ MCP Servers │
└─────────────────┘

How it works:

  1. Administrators verify the Gateway-Controller admin health endpoint and configure LLM Providers and MCP Proxies via the Gateway-Controller API
  2. Developers create LLM Proxies to build AI applications on top of available providers
  3. The gateway routes traffic, applies policies, and manages authentication

AI Guardrails​

AI Guardrails allow you to enforce safety, content, and compliance policies on AI traffic flowing through the AI Gateway. They can be applied at the LLM Provider level (organization-wide), at the LLM Proxy level (per-application), or on MCP Proxies.

The complete and up-to-date guardrail catalogue — with configuration references and examples — is maintained in the gateway-controllers repository: https://github.com/wso2/gateway-controllers/blob/main/docs/README.md

A guardrail is a gateway policy. To add a guardrail to the gateway, or update one to a different version, build a custom gateway image with the ap CLI and see Add or Update Policies in a Gateway. To write your own guardrail policy, see Writing a Custom Policy.

Documentation​

The following table lists the AI Gateway documentation sections and what each one covers:

SectionDescription
LLMLLM provider configuration, guardrails, prompt management, and semantic caching
MCPMCP proxy setup and policies
ObservabilityLogging and tracing configuration
AnalyticsAnalytics integrations (Moesif)
Policies and GuardrailsGateway policies and guardrails for AI traffic control
REST APIsREST API authentication and usage
Production deploymentHardened Kubernetes deployment with Helm: encryption, TLS, replica sizing, and AI workload tuning

Was this page helpful?