gateway  by Portkey-AI

AI gateway for routing to 250+ LLMs via single API

created 1 year ago
9,035 stars

Top 5.7% 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

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
46
Issues (30d)
51
Star History
1,350 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
1 more.

superagent by superagent-ai

0.3%
6k
Open-source framework for building AI assistants with an API
created 2 years ago
updated 3 weeks ago
Feedback? Help us improve.