gateway
Portkey Gateway is an open-source API routing layer that unifies access to 1,600+ language models, vision models, and AI services through a single standardized interface. It includes built-in reliability features (retries, fallbacks, load balancing) and content guardrails to secure AI deployments.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | Portkey-AI/gateway |
| Owner | Portkey-AI |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 12.4k |
| Forks | 1.2k |
| Open issues | 215 |
| Latest release | v1.15.2 (2026-01-12) |
| Last updated | 2026-05-25 |
| Source | https://github.com/Portkey-AI/gateway |
What gateway is
TypeScript-based gateway running on Node.js, Cloudflare Workers, or Docker that translates requests to provider-specific APIs (OpenAI, Anthropic, Bedrock, Groq, etc.) with sub-millisecond latency. Supports config-driven routing rules, output filtering, and observability dashboards; enterprise version adds org management and custom deployments.
Get the gateway source
Clone the repository and explore it locally.
git clone https://github.com/Portkey-AI/gateway.gitcd gateway# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Quickstart is genuinely simple (npx command), but production deployments require choice of hosting (Portkey Cloud, self-hosted Docker, Kubernetes, AWS EC2 template). Plan for observability and monitoring of the gateway itself.
- Config-based routing and guardrails are code-free but require understanding of schema; test guardrail logic thoroughly before production (false positives/negatives can break workflows).
- Gateway 2.0 is pre-release; production workloads should validate stability and breaking changes. Current stable version (v1.15.2) is from Jan 2026.
- API key management: you must provide provider credentials to the gateway (env vars or config). Ensure secure storage and rotation practices.
- No native caching, rate-limiting, or cost metering shown in README; verify enterprise version includes these if needed.
When to avoid it — and what to weigh
- Ultra-Low Latency Constraints (<5ms p99) — While advertised as <1ms, real-world latency includes network hops and serialization. If sub-5ms is hard requirement, benchmark against your provider directly.
- Proprietary/Closed-Source Model Access Only — Gateway focuses on OpenAI-compatible or well-documented APIs; custom internal models or closed APIs may require additional integration work.
- Airgapped/Offline Environments — Gateway requires outbound connectivity to route requests to external LLM providers; no offline-first or edge-compute story evident.
- Simple Use Cases (Single Provider, No Failover) — If you use one LLM provider with no reliability or cost concerns, direct SDK usage is simpler and has lower operational overhead.
License & commercial use
MIT License (permissive, OSI-approved). Covers source code; commercial use is allowed under standard MIT terms (no warranty, no liability).
MIT permits commercial use, modification, and distribution with minimal restrictions. However, Portkey also offers a hosted commercial service and enterprise version with advanced features. Evaluate whether self-hosted open-source meets your governance needs or if managed service is preferred. Review Portkey's commercial terms separately for hosted offering.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Strong |
| Assessment confidence | High |
Gateway handles API keys and authentication tokens in transit and at rest. No explicit security audit, vulnerability disclosure process, or threat model described. Key considerations: (1) Credentials are passed through the gateway—ensure TLS, no logging of sensitive data; (2) Guardrails are defensive but not cryptographic; (3) Enterprise version may include enhanced auth/RBAC; (4) Self-hosted deployments depend on your infrastructure security. Recommend security review before production use with sensitive data.
Alternatives to consider
LiteLLM (Python OSS routing layer)
Python-first, simpler config model, lower operational overhead if you're a Python shop; lacks some enterprise features and browser console.
OpenRouter / Together.ai (Managed routing services)
Fully managed, no self-hosting, built-in cost tracking and paywall; less control and higher per-request fees, no guardrails.
Direct SDK integration with fallback logic
No extra layer, fewer moving parts, full control; requires custom retry/failover code in your application, harder to scale.
Build on gateway with DEV.co software developers
Get started with Portkey Gateway in 2 minutes. Unified API, automatic failover, and cost optimization across all LLM providers.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
gateway FAQ
Can I use Portkey Gateway with my own fine-tuned LLM?
What happens if a guardrail blocks a response?
Is there a cost to using the open-source version?
How does load balancing work across providers?
Software development & web development with DEV.co
Need help beyond evaluating gateway? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and ai frameworks integrations — and maintain them long-term.
Route Your AI Traffic Smarter
Get started with Portkey Gateway in 2 minutes. Unified API, automatic failover, and cost optimization across all LLM providers.