Portkey Gateway review
Portkey Gateway is an open-source AI gateway that routes requests to many LLM providers through one OpenAI-compatible API, with guardrails.
TL;DR
Portkey Gateway is an open-source, MIT-licensed AI gateway written in TypeScript that puts one API in front of many model providers. It is for developers who want retries, fallbacks, load balancing and guardrails without separate provider integrations. It runs locally with npx and includes a local console for logs. Hosted and enterprise versions add more features.
- 13.3kGitHub stars
- +34new stars, week of Oct 25
- ~1Mdownloads a week, +19% vs 4-week avg
- #9in Model SDKs and gateways this week
Portkey Gateway at a glance
- Category
- Model SDKs and gateways
- Maintained by
- Portkey, Inc (organization, @Portkey-AI on GitHub)
- License
- MIT
- Language
- TypeScript, HTML, JavaScript
- Repository
- github.com/Portkey-AI/gateway
- Website
- portkey.ai/features/ai-gateway
- npm package
- @portkey-ai/gateway 1.15.2
- PyPI package
- portkey-ai 2.3.4
- Latest release
- portkey-ai 2.3.4 on PyPI, Jul 23, 2026
- First published
- Aug 23, 2023
What Portkey Gateway does
- Portkey Gateway routes requests to language, vision, audio and image models from many providers through a single OpenAI-compatible API.
- Portkey Gateway falls back to another provider or model on failed requests, and you can specify which errors trigger the fallback.
- Portkey Gateway retries failed requests up to 5 times, using exponential backoff between attempts.
- Portkey Gateway load balances requests across multiple API keys or providers using weights, and supports conditional routing and request timeouts.
- Portkey Gateway checks LLM inputs and outputs with guardrails, offering pre-built checks or your own.
- Portkey Gateway caches LLM responses to reduce costs and latency. Semantic caching is available in the hosted and enterprise versions.
- Portkey Gateway calls OpenAI realtime APIs through an integrated websockets server.
How it works
Portkey Gateway runs as a local server started with npx, serving an API at http://localhost:8787/v1 and a console for logs at http://localhost:8787/public/. You send requests through it with the Portkey Python or JS client, the OpenAI SDKs, REST, or frameworks such as LangChain, LlamaIndex, Autogen and CrewAI. Configs attached to the client define routing rules, retries and guardrails. Docker, Node.js and Cloudflare deployments are documented.
How to install and start using Portkey Gateway
Run locally with npx
npx @portkey-ai/gatewayPython client with pip
pip install -qU portkey-aiRequirements
- Node.js and npm to run the gateway locally
- Python 3.8 or later for the portkey-ai Python client
- An API key for each model provider you route to
First steps
- Start the gateway with npx @portkey-ai/gateway. It serves the API at http://localhost:8787/v1.
- Create a Portkey client in Python with a provider name, such as openai, and that provider's API key.
- Send a chat completion request through the gateway, then view the logs in the Gateway Console at http://localhost:8787/public/.
- Attach a config with retry and output_guardrails settings to the client to add reliability and guardrail rules.
Who Portkey Gateway is for
- Developers calling several LLM providers who want one OpenAI-compatible API
- Production AI apps that need retries, fallbacks and load balancing to prevent downtime
- Teams building agents with Autogen, CrewAI, LangChain, LlamaIndex or custom frameworks
- Organizations managing MCP servers that need central authentication, access control and tool-call logging
Limitations to know
- Portkey Gateway's semantic caching, provider optimization and prompt template management are only available in the hosted and enterprise versions.
- Portkey Gateway's logging, tracing, observability and prompt management for agent frameworks are only available on the hosted app.
- Org management, governance, PII redaction and IP or geo inbound rules are part of the enterprise version.
- Gateway 2.0, which merges the enterprise gateway into open source, is still in pre-release on a separate branch.
Is Portkey Gateway growing? Usage data
In the week of Oct 25–31, 2026, Portkey Gateway ranked #193 on the Devtoolwatch Board and #9 in Model SDKs and gateways, with a momentum score of 45 out of 100. Its main package had about 1M downloads that week, +19% against its own 4-week average.
Show the weekly numbers
| Week of | New stars |
|---|---|
| Aug 9, 2026 | 68 |
| Aug 16, 2026 | 65 |
| Aug 23, 2026 | 57 |
| Aug 30, 2026 | 60 |
| Sep 6, 2026 | 70 |
| Sep 13, 2026 | 65 |
| Sep 20, 2026 | 59 |
| Sep 27, 2026 | 51 |
| Oct 4, 2026 | 47 |
| Oct 11, 2026 | 57 |
| Oct 18, 2026 | 61 |
| Oct 25, 2026 | 34 |
On Hacker News
- Show HN: A lightweight AI gateway to 100+ models, in TS, 37 points and 13 comments (Jan 8, 2024)
- Show HN: An open-source AI Gateway with integrated guardrails, 21 points and 5 comments (Aug 14, 2024)
- Show HN: AI Grants and Credits Finder, 12 points and 3 comments (Aug 14, 2023)
- Portkey launches LLM analytics suite for AI builders, 7 points and 1 comments (Aug 7, 2023)
- LLM Obervability Platform, 6 points and 3 comments (Aug 23, 2023)
The Board ranks tools by four signals each week: new stars, new stars for the repo's size, added downloads and download growth beyond the market. How the ranking works.
Portkey Gateway alternatives
Other LLM SDKs and gateways on the Board in the week of Oct 25–31, 2026, by momentum:
| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | thinking-orbsthinking-orbs is a React library of dotted, animated thought-orb loading indicators for AI and agent user interfaces. | 3.9k | 1.4M |
| #2 | HeadroomHeadroom compresses tool outputs, logs, files, and RAG chunks locally before they reach the LLM, as a library, proxy, or MCP server. | 78.5k | 125.8k |
| #3 | LiteLLMLiteLLM is an open source AI gateway and Python SDK that calls 100+ LLM providers through one OpenAI-format interface. | 62.5k | 23.1M |
| #4 | Honcho Memory library for building stateful agents | 7.9k | – |
| #5 | Anthropic SDKAnthropic SDK is the official Python library for calling the Claude API from Python applications. | 4k | 111M |
| #6 | Hugging Face HubHugging Face Hub is the official CLI and Python client for downloading, uploading and managing models, datasets and Spaces on the… | 4k | 68.3M |
Recent Portkey Gateway releases
Portkey Gateway FAQ
Is Portkey Gateway free and open source?
Yes. Portkey Gateway's source code is on GitHub (Portkey-AI/gateway) under the MIT license, so you can use it for free. Its website also links to a pricing page (https://portkey.ai/pricing) for any paid plans.
How do I install Portkey Gateway?
Run npx @portkey-ai/gateway. The install section above has the other options from the project's README.
Is Portkey Gateway still maintained?
Activity has slowed: the Portkey-AI/gateway repository was last updated on May 25, 2026, and the latest release, portkey-ai 2.3.4 on PyPI, came out on Jul 23, 2026.
How popular is Portkey Gateway?
Portkey Gateway has 13.3k GitHub stars as of Nov 1, 2026. It gained 34 new stars in the week of Oct 25–31, 2026, against a 12-week average of 58 a week. Its main package had about 1M downloads that week, +19% against its own 4-week average. That made it #9 among LLM SDKs and gateways on the Devtoolwatch Board.
Portkey Gateway vs LiteLLM: how do they compare?
Portkey Gateway and LiteLLM are both tracked by Devtoolwatch as LLM SDKs and gateways. Portkey Gateway has 13.3k GitHub stars and LiteLLM has 62.5k. In the week of Oct 25–31, 2026, Portkey Gateway's main package had 1M downloads and LiteLLM's had 23.1M. LiteLLM is an open source AI gateway and Python SDK that calls 100+ LLM providers through one OpenAI-format interface. LiteLLM review.
What are the best alternatives to Portkey Gateway?
Other LLM SDKs and gateways on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: thinking-orbs (#1), Headroom (#2), LiteLLM (#3), Honcho (#4), Anthropic SDK (#5). The alternatives table above has their numbers.
What is Portkey Gateway?
Portkey Gateway is an open-source AI gateway from Portkey that routes requests to many language, vision, audio and image models through one OpenAI-compatible API. It adds fallbacks, retries, load balancing, caching and guardrails. You can run it locally with npx or use Portkey's hosted and enterprise versions.
Which SDKs and frameworks work with Portkey Gateway?
Portkey Gateway works with Portkey's JS and Python clients, REST, and the OpenAI SDKs. It also integrates with LangChain, LlamaIndex, Autogen, CrewAI, Phidata, Control Flow and custom agents. A cookbook covers use with Vercel's AI SDK.
How do guardrails work in Portkey Gateway?
Portkey Gateway applies guardrails through Configs attached to the client. For example, an output guardrail can deny any reply containing a given word. You can choose from pre-built guardrails, bring your own, or use partner guardrails.
Does Portkey Gateway support MCP?
Portkey's MCP Gateway is a central control plane for MCP servers. It provides a single auth layer, per-team access control, logging of every tool call, and identity forwarding. It works with Claude Desktop, Cursor, VS Code and any MCP-compatible client.
Can I run Portkey Gateway with local models?
Yes. Portkey Gateway lists Ollama among its supported providers, with streaming support.
Sources
- Portkey-AI/gateway on GitHub
- Portkey Gateway README
- @portkey-ai/gateway on npm
- portkey-ai on PyPI
- Portkey Gateway website
- Release v1.15.2 (Jan 12, 2026)
- Release v1.15.1 (Dec 24, 2025)
- Release v1.15.0 (Dec 23, 2025)
- Hacker News: Show HN: A lightweight AI gateway to 100+ models, in TS
- Hacker News: Show HN: An open-source AI Gateway with integrated guardrails
- Hacker News: Show HN: AI Grants and Credits Finder
- Devtoolwatch Board, the week of Oct 25–31, 2026
Portkey Gateway README badge
Maintainers can show the tool's weekly Board rank in their README:
[](https://index.devtoolwatch.com/tools/portkey-gateway/)How this page is made: Devtoolwatch writes each review from the project's README, releases, package metadata and website, with an AI model, then checks every claim against the source it cites and drops what the sources don't support. The numbers come from Devtoolwatch's daily GitHub snapshots, GitHub's stargazer history, and the npm and PyPI download APIs. Spotted an error? Email [email protected].