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
GoAGPL-3.0Created 2023-11-10www.newapi.ai
Download: v1.0.0-rc.51v1.0.0-rc.51 ↓512026-11-13
+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 u

Top issues

Discussions

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

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON