API Platform AI Gateway¶
A gateway for managing and securing AI traffic, including Large Language Model (LLM) APIs, Model Context Protocol (MCP) servers, and Agent2Agent (A2A) agents.
Why use the AI Gateway¶
Run the AI Gateway when AI traffic needs the controls you already apply to your APIs. With it, you can:
- Apply guardrails that validate, filter, or transform content before it reaches a model or a client. See Guardrails.
- Serve one OpenAI-compatible endpoint that routes requests to multiple LLM providers. See Multi-provider routing.
- Expose MCP servers through a central gateway, and apply authentication and access control to MCP traffic. See MCP proxy.
- Give an A2A agent one governed address, serve its Agent Card from the gateway, and apply policies to individual A2A operations. See Agent governance.
- Collect logs, traces, and analytics for the traffic the gateway handles. See Gateway logs.
- Run the gateway on its own, or register it with AI Workspace to govern the gateways across your organization. See Connect to AI Workspace.
Who it is for¶
Two roles share the gateway. A platform administrator configures LLM providers, the credentials they use, and the policies that apply organization-wide. An AI developer creates LLM proxies on top of those providers, and adds the policies a single application needs.
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 AI Workspace: The gateway still runs in your infrastructure, and you manage its artifacts from AI Workspace. AI Workspace runs either in API Platform Cloud or on your infrastructure. To connect to AI Workspace in API Platform Cloud, follow the AI Gateway LLM quick start guide in API Platform Cloud. For a self-hosted AI Workspace, see Connect to AI Workspace.
Where to go next¶
- To install the gateway and route a first request through it, see the quick start guide.
- To learn which artifacts a request passes through, see How it works.
- To expose an MCP server through the gateway, see MCP proxy.
- To put an A2A agent behind the gateway, see Agent governance.