Lightweight open-source gateway that routes requests to hundreds of language, vision, audio and image models through one API. It adds fallbacks, guardrails and logging, and includes an MCP Gateway for managing MCP servers.
Overview
Portkey AI Gateway is an open-source gateway that sits between applications and LLM providers. It offers a single API for routing to a large number of language, vision, audio and image models, so an application can switch providers without rewriting its integration. Initial setup is intended to take about two minutes.
Routing behaviour is controlled through configs, which let you define routing rules, add reliability features and set up guardrails. The gateway works with common client libraries and frameworks, including the JavaScript and Python SDKs, REST, the OpenAI SDKs, Langchain, LlamaIndex, Autogen and CrewAI. A local Gateway Console shows the logs of requests passing through it.
An MCP Gateway is also included. It acts as a central control plane for MCP servers across an organization, with authentication at the gateway, access control by team and user, logging of each tool call, and forwarding of user identity to the servers. It works with Claude Desktop, Cursor, VS Code and other MCP-compatible clients.
The gateway can run locally or be deployed through Docker, Node.js, Cloudflare or Replit, or used through Portkey Cloud. An enterprise version for private deployments on AWS, Azure, GCP, OpenShift and Kubernetes adds key management, caching, access rules, PII redaction and compliance support. An open pricing database for models supports cost tracking in the gateway.
Key features
- Single API for routing to many LLM providers
- Config-based routing rules and reliability settings
- Built-in guardrails
- Local Gateway Console for request logs
- MCP Gateway with auth, access control and audit logs
- Cost tracking from an open model pricing database
- Works with OpenAI SDKs, Langchain, LlamaIndex, CrewAI
- Enterprise private deployments with PII redaction and caching
Use cases
- Routing app traffic across multiple LLM providers
- Adding guardrails to LLM requests
- Centrally managing MCP servers for a team
- Tracking LLM usage and cost
- Running a private enterprise AI gateway