Portkey AI Gateway

Active
GitHub TypeScript MIT

Description

Portkey AI Gateway is a blazing fast AI gateway with integrated guardrails, routing to 200+ LLMs with 50+ AI guardrails through a single fast and friendly API.

Key Features

  • Route to 250+ LLMs with a single OpenAI-compatible API endpoint
  • Blazing fast at under 1ms added latency with a 122kb footprint
  • Built-in automatic retries, fallbacks, and load balancing for reliability
  • 50+ AI guardrails for content filtering and safety enforcement
  • MCP Gateway for enterprise auth and observability on MCP servers
  • Deploy anywhere: Cloudflare Workers, Docker, Node.js, or Portkey Cloud

Use Cases

💡 Centralized LLM management with provider failover for production AI apps
💡 Adding guardrails and content moderation to any LLM integration
💡 Cost optimization by routing across providers based on price and performance
💡 Enterprise AI deployments requiring audit logging and compliance
💡 Multi-tenant AI platforms needing per-user rate limiting and quotas

Quick Start

npx @portkey-ai/gateway — gateway runs at http://localhost:8787/v1. Then use the Portkey Python client: client = Portkey(provider='openai', Authorization='sk-***'); client.chat.completions.create(model='gpt-4o-mini', messages=[...])

Related Projects

Related Articles