# 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.

Devtoolwatch Board, the week of Oct 25–31, 2026. Canonical page: https://index.devtoolwatch.com/tools/portkey-gateway/

## 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.

## Portkey Gateway at a glance

- **Category:** [Model SDKs and gateways](https://index.devtoolwatch.com/categories/model-sdks-and-gateways/)
- **Maintained by:** Portkey, Inc (organization, [@Portkey-AI](https://github.com/Portkey-AI) on GitHub)
- **License:** MIT
- **Language:** TypeScript, HTML, JavaScript
- **Repository:** [github.com/Portkey-AI/gateway](https://github.com/Portkey-AI/gateway)
- **Website:** [portkey.ai/features/ai-gateway](https://portkey.ai/features/ai-gateway)
- **npm package:** [@portkey-ai/gateway](https://www.npmjs.com/package/@portkey-ai/gateway) 1.15.2
- **PyPI package:** [portkey-ai](https://pypi.org/project/portkey-ai/) 2.3.4
- **Latest release:** [portkey-ai 2.3.4](https://pypi.org/project/portkey-ai/) 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 Portkey Gateway

**Run locally with npx**

```
npx @portkey-ai/gateway
```

**Python client with pip**

```
pip install -qU portkey-ai
```

### Requirements

- 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

1. Start the gateway with npx @portkey-ai/gateway. It serves the API at http://localhost:8787/v1.
2. Create a Portkey client in Python with a provider name, such as openai, and that provider's API key.
3. Send a chat completion request through the gateway, then view the logs in the Gateway Console at http://localhost:8787/public/.
4. 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

- 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.

## Usage data (the week of Oct 25–31, 2026)

- Board rank: #193 overall, #9 in Model SDKs and gateways, momentum score 45
- Downloads that week: 1M (+19% vs 4-week average)
- New GitHub stars per week (last 12 weeks): Aug 9: 68; Aug 16: 65; Aug 23: 57; Aug 30: 60; Sep 6: 70; Sep 13: 65; Sep 20: 59; Sep 27: 51; Oct 4: 47; Oct 11: 57; Oct 18: 61; Oct 25: 34

## Portkey Gateway alternatives

| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | [thinking-orbs](https://index.devtoolwatch.com/tools/jakubantalik-thinking-orbs/) | 3.9k | 1.4M |
| #2 | [Headroom](https://index.devtoolwatch.com/tools/headroomlabs-ai-headroom/) | 78.5k | 125.8k |
| #3 | [LiteLLM](https://index.devtoolwatch.com/tools/litellm/) | 62.5k | 23.1M |
| #4 | [Honcho](https://index.devtoolwatch.com/tools/plastic-labs-honcho/) | 7.9k | – |
| #5 | [Anthropic SDK](https://index.devtoolwatch.com/tools/anthropic-sdk/) | 4k | 111M |
| #6 | [Hugging Face Hub](https://index.devtoolwatch.com/tools/hf-hub/) | 4k | 68.3M |

## 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](https://index.devtoolwatch.com/tools/litellm/)

### 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

1. [Portkey-AI/gateway on GitHub](https://github.com/Portkey-AI/gateway)
2. [Portkey Gateway README](https://github.com/Portkey-AI/gateway/blob/main/README.md)
3. [@portkey-ai/gateway on npm](https://www.npmjs.com/package/@portkey-ai/gateway)
4. [portkey-ai on PyPI](https://pypi.org/project/portkey-ai/)
5. [Portkey Gateway website](https://portkey.ai/features/ai-gateway)
6. [Release v1.15.2 (Jan 12, 2026)](https://github.com/Portkey-AI/gateway/releases/tag/v1.15.2)
7. [Release v1.15.1 (Dec 24, 2025)](https://github.com/Portkey-AI/gateway/releases/tag/v1.15.1)
8. [Release v1.15.0 (Dec 23, 2025)](https://github.com/Portkey-AI/gateway/releases/tag/v1.15.0)
9. [Hacker News: Show HN: A lightweight AI gateway to 100+ models, in TS](https://news.ycombinator.com/item?id=38911677)
10. [Hacker News: Show HN: An open-source AI Gateway with integrated guardrails](https://news.ycombinator.com/item?id=41246643)
11. [Hacker News: Show HN: AI Grants and Credits Finder](https://news.ycombinator.com/item?id=37122143)
12. [Devtoolwatch Board, the week of Oct 25–31, 2026](https://index.devtoolwatch.com/)
