QuantumNous /new-api
Open-source AI gateway. Self-hosted LLM gateway with OpenAI-, Claude- and Gemini-compatible APIs, model routing, access control, usage tracking and cost accounting.
★ 51,957⑂ 12,678👁 161⑃ 3,645● 3,991▤ 538
+35
Daily
+353
Weekly
+2,161
Monthly
51,957
stars
12,678
forks
161
watchers
3,645
prs
3,991
issues
538
releases
README
!new-api
New API
An AI gateway for models, applications, and agents
简体中文 |
繁體中文 |
English |
Français |
日本語
Screenshots •
Capabilities •
Quick start •
Deployment •
Development •
Documentation
---
📝 Project Description
New API is a self-hosted AI gateway for applications, agents, and teams. Connect upstream model services, expose a consistent API to your clients, and manage routing, access, usage, and costs in one place.
Use it to share authorized model access across a team, switch providers without configuring every client again, or operate a private multi-model service with a web console. Upstreams include OpenAI, Anthropic, Google Gemini, Azure OpenAI, AWS Bedrock, Vertex AI, DeepSeek, Qwen, and other compatible services.
[!IMPORTANT]
- This project is intended solely for lawful and authorized AI API gateway, organization-level authentication, multi-model management, usage analytics, cost accounting, and private deployment scenarios.
- Users must lawfully obtain upstream API keys, accounts, model services, and interface permissions, and must comply with upstream terms of service and applicable laws and regulations.
- Users should ensure their use complies with upstream terms of service and applicable laws and regulations.
- When providing generative AI services to the public, users should comply with applicable regulatory requirements and fulfill all filing, licensing, content safety, real-name verification, log retention, tax, and upstream authorization obligations required by their jurisdiction.
[!WARNING]
When operating this project as a public generative AI service or API resale service, users should first complete all required filing, licensing, content safety, real-name verification, log retention, tax, payment, and upstream authorization obligations.
---
Screenshots
Accounts, channels, plugin installation states, usage, prices, and costs shown below are simulated data. The marketplace displays the official plugin catalog. Click an image to view it at full size.
| Usage dashboard | Plugin marketplace |
| --- | --- |
| | |
| Model square | Usage logs |
| | |
---
🤝 Trusted Partners
No particular order
---
🙏 Special Thanks
Thanks to JetBrains for providing free open-source development license for this project
---
Capabilities
| Area | What you can do |
| --- | --- |
| Model access | Use OpenAI Chat Completions, Responses, Anthropic Messages, and Gemini APIs; stream responses and use tools, reasoning, and multimodal inputs where supported |
| Routing | Configure model mappings, channel priorities and weights, retries, channel affinity, and multiple upstream keys |
| Usage and costs | Manage quotas, subscriptions, usage logs, cache accounting, and expression-based pricing for different usage tiers |
| Access control | Manage uTop issues
#4543[BUG] ClaudeCode 使用 OpenAI 格式接入的 Deepseek V4 上游会遇到 400 `reasoning_content` 报错27 comments · 2026-04-29#1618接入claude code会报错25 comments · 2025-08-19#7260希望增加统一素材管理(Asset/Material)能力17 comments · 2026-09-08#4711[Feature] 为 /v1/images/generations 增加异步任务模式(提交 + 查询)14 comments · 2026-05-09#2845希望增加兑换码(订阅码)兑换订阅套餐的功能13 comments · 2026-02-05#5966使用高级自定义渠道之后游乐场聊天提示 无可用渠道(distributor)12 comments · 2026-07-07#4242希望支持可灵模型按官方方式计费12 comments · 2026-04-14#2822[Feature Request] Openrouter支持/v1/messages和/v1/responses 原生端点12 comments · 2026-02-03
Discussions
#8206【开源】基于 New API 原版模型广场改造:选好分组一键开通 API Key + 比官方省多少 + 树状卡片 + 多模型对比0 comments · 2026-11-04#8191使用codex帐号,都没有碰到帐号容易超select model is at capacity.Please try a different model的错么0 comments · 2026-11-04#8187(已撤回)关于提交 icon 到 simple-icons0 comments · 2026-11-03#8137咨询:Responses WebSocket 是否考虑支持 Codex 的 response.interrupt 扩展事件?0 comments · 2026-10-31#8134[Show and tell] newapi-operator:给自建 New API 的管理 MCP,47 个工具 + 全量接口透传0 comments · 2026-10-31#8056[Show and tell] 消费公开报价数据做的中文查询页:分组、计费单位与采集边界0 comments · 2026-10-27#7826接口报错了0 comments · 2026-10-15#7788Session Affinity or Sticky Session1 comments · 2026-10-13
Latest release
v1.0.0-rc.51 v1.0.0-rc.51 2026-11-13[!IMPORTANT] 修复 v1.0.0-rc.50 在有 AES-NI、没有 AVX 的 x86-64 CPU 上崩溃并反复重启的问题(8314)。Celeron、Pentium、Atom 一类 CPU(如 J4125)和只提供 AES、不提供 AVX 的虚拟机会受影响:处理聊天等请求时进程因 SIGILL 退出,模型列表和管理后台仍能打开,看起来像间歇性的 502。在这类机器上运行 rc.50 的请升级到本版本。 本版本包含 rc.50 新增的提供商插件、请求处理插件和社区插件市场。提供商插件把一个上游厂商接成一种渠道;请求处理插件在请求和回复上运行,可以按全局、分组、渠道和模型生效。从 rc.49 或更早版本升级时请注意下面几点。 原敏感词设置在首次启动时迁成一个「请求过滤」实例,旧设置项会被删除。命中时返回 400 request_rejected,原来是 500 sensitive_words_detected。回滚到旧版本后敏感词检查是关闭的,需要重新填写。 多节点部署:设置、权限、插件、渠道等手动改动几秒内同步到所有节点。CHANNEL_UPDATE_FREQUENCY 的定时余额更新改为只在主节点运行。超过 30 天的已结束系统任务会被自动删除,需要保留更久的请先在 系统设置 → 运维 → 日志维护 里改保留天数。 Vertex AI 插件 1
相关报道 (9)
blog.csdn开源AI网关应用New API —— 筑梦之路2026-09-05blog.csdn日志治理新范式:GitHub加速计划(new-api)的完整日志管理实战指南2026-02-03https://www.80aj.com/开源项目team-api发布:企业级大模型API网关,主打权限隔离与团队管理2026-09-26新浪财经傅盛新品陷“换皮”风波:被指套壳开源项目2026-05-04腾讯新闻月入百万的 AI中转站,钱到底从哪来?2026-04-26www.80aj.com告别手动配置:开源工具 new-api-sync 实现多 AI 渠道自动化同步2026-04-1336KrOpenAI和Anthropic世纪联手,codex-plugin-cc震动AI圈,两大巨头开放王炸产品2026-03-3080aj.com多模型API管理的痛点:开发者实测New API与Octopus2026-02-05CSDN博客「免费额度」秒变40万债务?学生误泄Gemini API密钥背上巨额账单:开发者社区炸锅,谷歌最终免单2025-09-28
News & coverage (6)
githubNew API endpoint provides privacy-safe star history data2026-09-04ZDNetOver 100,000 GitHub repos have leaked API or cryptographic keys2019-03-21The GitHub BlogOpen source license compliance generally available2026-10-16Business Wire42Crunch and GitHub Copilot Bring Deterministic API Security Guardrails to Agentic DevSecOps2026-06-17The GitHub BlogNew enterprise installation API now in public preview2026-05-13TechGigGitHub Proposes HTML-in-Canvas for Enhanced Rendering2026-04-11