Devtoolwatch BoardGet it every Monday

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.

Updated Nov 1, 2026. Review written Oct 22, 2026 from the project's own sources; usage data refreshed every Monday.

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

New GitHub stars per week for Portkey Gateway12 weeks from Aug 9, 2026: 68, 65, 57, 60, 70, 65, 59, 51, 47, 57, 61, 34 new stars, an average of 58 a week.Aug 9week of Oct 25
New GitHub stars per week for the last 12 weeks, from GitHub's stargazer history (today's stargazers by the week they starred).
Show the weekly numbers
New GitHub stars per week for Portkey Gateway
Week ofNew stars
Aug 9, 202668
Aug 16, 202665
Aug 23, 202657
Aug 30, 202660
Sep 6, 202670
Sep 13, 202665
Sep 20, 202659
Sep 27, 202651
Oct 4, 202647
Oct 11, 202657
Oct 18, 202661
Oct 25, 202634

On Hacker News

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:

Model SDKs and gateways ranked by momentum, the week of Oct 25–31, 2026
RankToolStarsDownloads/wk
#1thinking-orbsthinking-orbs is a React library of dotted, animated thought-orb loading indicators for AI and agent user interfaces.3.9k1.4M
#2HeadroomHeadroom compresses tool outputs, logs, files, and RAG chunks locally before they reach the LLM, as a library, proxy, or MCP server.78.5k125.8k
#3LiteLLMLiteLLM is an open source AI gateway and Python SDK that calls 100+ LLM providers through one OpenAI-format interface.62.5k23.1M
#4Honcho Memory library for building stateful agents7.9k–
#5Anthropic SDKAnthropic SDK is the official Python library for calling the Claude API from Python applications.4k111M
#6Hugging Face HubHugging Face Hub is the official CLI and Python client for downloading, uploading and managing models, datasets and Spaces on the…4k68.3M

All LLM SDKs and gateways, ranked

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

  1. Portkey-AI/gateway on GitHub
  2. Portkey Gateway README
  3. @portkey-ai/gateway on npm
  4. portkey-ai on PyPI
  5. Portkey Gateway website
  6. Release v1.15.2 (Jan 12, 2026)
  7. Release v1.15.1 (Dec 24, 2025)
  8. Release v1.15.0 (Dec 23, 2025)
  9. Hacker News: Show HN: A lightweight AI gateway to 100+ models, in TS
  10. Hacker News: Show HN: An open-source AI Gateway with integrated guardrails
  11. Hacker News: Show HN: AI Grants and Credits Finder
  12. 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:

Devtoolwatch badge for Portkey Gateway

[![Devtoolwatch](https://index.devtoolwatch.com/badge/portkey-gateway.svg)](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].