gateway  by Portkey-AI

AI gateway for routing to 250+ LLMs via single API

Created 2 years ago
9,513 stars

Top 5.3% on SourcePulse

GitHubView on GitHub
Project Summary

The Portkey AI Gateway provides a unified, high-performance API layer for interacting with over 250 LLMs and AI models. It's designed for developers and enterprises seeking to simplify AI integration, enhance reliability, and implement security guardrails across diverse AI providers and model types, including multimodal capabilities.

How It Works

The gateway acts as a central proxy, abstracting away the complexities of individual AI provider APIs. It leverages a fast, Node.js-based architecture for low-latency routing and supports features like automatic retries, load balancing, and request timeouts to ensure application resilience. A key differentiator is its integrated "guardrails" system, allowing developers to define and enforce rules for input and output validation, enhancing security and accuracy.

Quick Start & Requirements

  • Install and run locally: npx @portkey-ai/gateway
  • Requires Node.js and npm.
  • Official Docs: https://portkey.wiki/gh-1
  • Python SDK: pip install -qU portkey-ai

Highlighted Details

  • Supports 250+ LLMs and multimodal models (vision, audio, image generation).
  • Integrates with major AI agent frameworks like LangChain, LlamaIndex, and Autogen.
  • Offers built-in guardrails for input/output validation and security.
  • Features smart caching, usage analytics, and provider optimization for cost management.

Maintenance & Community

  • Active community with weekly "AI Engineering Hours" calls.
  • Discord server available for discussions and support.
  • Official Blog and social media presence (Twitter, LinkedIn).

Licensing & Compatibility

  • Licensed under the MIT License, permitting commercial use and closed-source linking.

Limitations & Caveats

Some advanced features like prompt template management and provider optimization are marked as available only in hosted and enterprise versions, suggesting potential limitations in the open-source offering.

Health Check
Last Commit

14 hours ago

Responsiveness

1 day

Pull Requests (30d)
48
Issues (30d)
23
Star History
373 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.