Portkey-AI/gateway
GitHub: Portkey-AI/gateway
一款开源的高性能 AI 网关,通过统一 API 路由到 1600+ 个模型并集成护栏、负载均衡等可靠性机制。
Stars: 12430 | Forks: 1205
🆕 **[Portkey Models](https://github.com/Portkey-AI/models)** - 为 40+ 家提供商的 2300+ 个模型提供的开源 LLM 定价。[探索 →](https://portkey.ai/models)
# AI Gateway
#### 通过 1 个快速且友好的 API 路由到 250+ 个 LLM
[文档](https://portkey.wiki/gh-1) | [企业版](https://portkey.wiki/gh-2) | [托管 Gateway](https://portkey.wiki/gh-3) | [更新日志](https://portkey.wiki/gh-4) | [API 参考](https://portkey.wiki/gh-5)
[](./LICENSE)
[](https://portkey.wiki/gh-6)
[](https://portkey.wiki/gh-7)
[](https://portkey.wiki/gh-8)
[](https://portkey.wiki/gh-9)
[](https://deepwiki.com/Portkey-AI/gateway)
[文档](https://portkey.wiki/gh-1) | [企业版](https://portkey.wiki/gh-2) | [托管 Gateway](https://portkey.wiki/gh-3) | [更新日志](https://portkey.wiki/gh-4) | [API 参考](https://portkey.wiki/gh-5)
[](./LICENSE)
[](https://portkey.wiki/gh-6)
[](https://portkey.wiki/gh-7)
[](https://portkey.wiki/gh-8)
[](https://portkey.wiki/gh-9)
[**AI Gateway**](https://portkey.wiki/gh-10) 旨在快速、可靠且安全地将请求路由到 1600+ 个语言、视觉、音频和图像模型。它是一个轻量级、开源且企业就绪的解决方案,允许您在 2 分钟内与任何语言模型集成。 - [x] **极速**(<1ms 延迟)且占用空间极小(122kb) - [x] **久经沙场**,每天处理超过 10B 个 token - [x] **企业就绪**,具备增强的安全性、可扩展性和自定义部署
#### AI Gateway 能做什么? - 在 2 分钟内与任何 LLM 集成 - [快速开始](#quickstart-2-mins) - 通过 **[自动重试](https://portkey.wiki/gh-11)** 和 **[后备机制](https://portkey.wiki/gh-12)** 防止停机 - 利用 **[负载均衡](https://portkey.wiki/gh-13)** 和 **[条件路由](https://portkey.wiki/gh-14)** 扩展 AI 应用 - 通过 **[护栏](https://portkey.wiki/gh-15)** 保护您的 AI 部署 - 通过 **[多模态能力](https://portkey.wiki/gh-16)** 超越文本限制 - 探索 **[Agentic Workflow](https://portkey.wiki/gh-17)** 集成 - 使用 **[MCP Gateway](https://portkey.ai/docs/product/mcp-gateway)** 管理具备企业级身份验证和可观测性的 MCP 服务器
## 快速开始(2 分钟) ### 1. 设置您的 AI Gateway ``` # 本地运行 gateway(需要 Node.js 和 npm) npx @portkey-ai/gateway ``` Deployment guides: