# Portkey-AI/gateway

A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.

Repository: https://github.com/Portkey-AI/gateway
Canonical: https://ross.abutalabs.com/products/gateway
Homepage: https://portkey.ai/features/ai-gateway
Language: TypeScript
License: MIT
License Family: permissive
Topics: gateway, generative-ai, llmops, llms, ai-gateway, langchain, openai, hacktoberfest, llm, llm-gateway, mcp, mcp-client, mcp-gateway, mcp-servers, model-router
Last push: 2026-05-25T13:54:51+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 84, release rhythm 65, longevity 79
- inputs: {"age_days": 1106, "days_push": 100, "days_rel": 233, "gap_med": 6, "n_releases_24m": 50}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 12837, forks 1269 (observed 2026-08-28T04:10:59.882461+00:00)

## What it is
Portkey AI Gateway is an open-source, TypeScript-based AI gateway that routes requests to 1,600+ LLMs across many providers through a single fast, OpenAI-compatible API. It includes integrated guardrails, automatic retries, fallbacks, load balancing, caching, and MCP gateway support, and can be self-hosted or used hosted.

## Use cases
- route requests to multiple LLM providers through one API
- add fallbacks and retries to avoid LLM downtime
- load balance across LLM providers
- apply guardrails to AI model inputs and outputs
- self-host an LLM gateway with caching and rate limiting
- connect MCP servers through a gateway
- switch between OpenAI, Anthropic, and other models without code changes

## When to choose
- you use multiple LLM providers and want a single unified API
- you need production reliability features like retries, fallbacks, and load balancing
- you want guardrails and governance over AI traffic
- you need a lightweight, self-hostable gateway with sub-millisecond overhead

## When to avoid
- you only call a single LLM provider directly with no routing needs
- you need a full LLM observability or evaluation platform rather than a gateway
- your stack cannot run Node.js/TypeScript services

## Facets
- artifact type: service
- maturity: active
- function: api-gateway, llm-inference, middleware, proxy, rate-limiting, caching, mcp
- domain: large-language-models, artificial-intelligence, apis, developer-tools, self-hosted
- platform: cross-platform, self-hosted, cloud, serverless
- tags: llm-gateway, model-routing, guardrails, fallbacks, load-balancing, openai-compatible, llmops, typescript, ai-agents, nodejs, docker

## Member repositories
- Portkey-AI/gateway (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:59.882461+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:45.226450+00:00, confidence not recorded.
  - readme: https://github.com/Portkey-AI/gateway (fetched 2026-08-28T04:10:59.882461+00:00, sha 921e1117a864)
  - homepage: https://portkey.ai/features/ai-gateway (fetched 2026-08-29T08:10:02.417954+00:00, sha 84b5d31353b9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
