能力标签
🛠
AI工具

新一代AI工具

基于 Go · 开源免费,本地部署,数据完全自主可控
英文名:new-api
⭐ 35.8k Stars 🍴 8.1k Forks 💻 Go 📄 AGPL-3.0 🏷 AI 8.5分
8.5AI 综合评分
ai-gatewayclaudedeepseekgemini
✦ AI Skill Hub 推荐

新一代AI工具 是 AI Skill Hub 本期精选AI工具之一。在 GitHub 上收获超过 35.8k 颗 Star,综合评分 8.5 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

新一代AI工具 是一款基于 Go 的开源工具,在 GitHub 上收获 36k+ Star,是ai-gateway、claude、deepseek、gemini领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
新一代AI工具 依赖 Go 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 Go 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 新一代AI工具 的版本更新,及时通知重要功能变化。

📋 工具概览

新一代AI工具 是一款基于 Go 开发的开源工具,专注于 ai-gateway、claude、deepseek 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 35.8k
开发语言
Go
支持平台
Windows / macOS / Linux(跨平台)
维护状态
活跃维护,更新频繁
开源协议
AGPL-3.0
AI 综合评分
8.5 分
工具类型
AI工具
Forks
8.1k

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

新一代AI工具 是一款基于 Go 开发的开源工具,专注于 ai-gateway、claude、deepseek 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:go install(推荐)
go install github.com/QuantumNous/new-api@latest

# 方式二:从源码编译
git clone https://github.com/QuantumNous/new-api
cd new-api
go build -o new-api .

# 方式三:下载预编译二进制
# 访问 Releases 页面下载对应平台二进制文件
# https://github.com/QuantumNous/new-api/releases
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
new-api --help

# 基本运行
new-api [options] <input>

# 详细使用说明请查阅文档
# https://github.com/QuantumNous/new-api
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# new-api 配置说明
# 查看配置选项
new-api --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export NEW_API_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 74/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

new-api

📝 Project Description

[!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.

---

✨ Key Features

For detailed features, please refer to Features Introduction

🚀 Advanced Features

API Format Support: - ⚡ OpenAI Responses - ⚡ OpenAI Realtime API (including Azure) - ⚡ Claude Messages - ⚡ Google Gemini - 🔄 Rerank Models (Cohere, Jina)

Intelligent Routing: - ⚖️ Channel weighted random - 🔄 Automatic retry on failure - 🚦 User-level model rate limiting

Format Conversion: - 🔄 OpenAI Compatible ⇄ Claude Messages - 🔄 OpenAI Compatible → Google Gemini - 🔄 Google Gemini → OpenAI Compatible - Text only, function calling not supported yet - 🚧 OpenAI Compatible ⇄ OpenAI Responses - In development - 🔄 Thinking-to-content functionality

Reasoning Effort Support:

<details> <summary>View detailed configuration</summary>

OpenAI series models: - o3-mini-high - High reasoning effort - o3-mini-medium - Medium reasoning effort - o3-mini-low - Low reasoning effort - gpt-5-high - High reasoning effort - gpt-5-medium - Medium reasoning effort - gpt-5-low - Low reasoning effort

Claude thinking models: - claude-3-7-sonnet-20250219-thinking - Enable thinking mode

Google Gemini series models: - gemini-2.5-flash-thinking - Enable thinking mode - gemini-2.5-flash-nothinking - Disable thinking mode - gemini-2.5-pro-thinking - Enable thinking mode - gemini-2.5-pro-thinking-128 - Enable thinking mode with thinking budget of 128 tokens - You can also append -low, -medium, or -high to any Gemini model name to request the corresponding reasoning effort (no extra thinking-budget suffix needed).

</details>

---

📋 Deployment Requirements

ComponentRequirement
**Local database**SQLite (Docker must mount /data directory)
**Remote database**MySQL ≥ 5.7.8 or PostgreSQL ≥ 9.6
**Container engine**Docker / Docker Compose

Edit docker-compose.yml configuration

nano docker-compose.yml

🚢 Deployment

[!TIP] Latest Docker image: calciumion/new-api:latest

🔧 Deployment Methods

<details> <summary><strong>Method 1: Docker Compose (Recommended)</strong></summary>

```bash

⚠️ Multi-machine Deployment Considerations

[!WARNING] - Must set SESSION_SECRET - Otherwise login status inconsistent - Shared Redis must set CRYPTO_SECRET - Otherwise data cannot be decrypted

🚀 Quick Start

💰 Authorized Usage Accounting and Billing

  • ✅ Internal top-up and quota allocation for lawful authorized scenarios (EPay, Stripe)
  • ✅ Organization-level per-request, usage-based, and cache-hit cost accounting
  • ✅ Cache billing statistics for OpenAI, Azure, DeepSeek, Claude, Qwen, and supported models
  • ✅ Flexible billing policies for internal management or authorized enterprise customers

🤝 Contribution Guide

Welcome all forms of contribution!

  • 🐛 Report Bugs
  • 💡 Propose New Features
  • 📝 Improve Documentation
  • 🔧 Submit Code

---

⚙️ Environment Variable Configuration

<details> <summary>Common environment variable configuration</summary>

Variable NameDescriptionDefault Value
SESSION_SECRETSession secret (required for multi-machine deployment)-
CRYPTO_SECRETEncryption secret (required for Redis)-
SQL_DSNDatabase connection string-
REDIS_CONN_STRINGRedis connection string-
STREAMING_TIMEOUTStreaming timeout (seconds)300
STREAM_SCANNER_MAX_BUFFER_MBMax per-line buffer (MB) for the stream scanner; increase when upstream sends huge image/base64 payloads64
MAX_REQUEST_BODY_MBMax request body size (MB, counted **after decompression**; prevents huge requests/zip bombs from exhausting memory). Exceeding it returns 41332
AZURE_DEFAULT_API_VERSIONAzure API version2025-04-01-preview
ERROR_LOG_ENABLEDError log switchfalse
PYROSCOPE_URLPyroscope server address-
PYROSCOPE_APP_NAMEPyroscope application namenew-api
PYROSCOPE_BASIC_AUTH_USERPyroscope basic auth user-
PYROSCOPE_BASIC_AUTH_PASSWORDPyroscope basic auth password-
PYROSCOPE_MUTEX_RATEPyroscope mutex sampling rate5
PYROSCOPE_BLOCK_RATEPyroscope block sampling rate5
HOSTNAMEHostname tag for Pyroscopenew-api

📖 Complete configuration: Environment Variables Documentation

</details>

Edit configuration

nano docker-compose.yml

New API

🍥 Next-Generation LLM Gateway and AI Asset Management System

<p align="center"> <a href="./README.zh_CN.md">简体中文</a> | <a href="./README.zh_TW.md">繁體中文</a> | <strong>English</strong> | <a href="./README.fr.md">Français</a> | <a href="./README.ja.md">日本語</a> </p>

<p align="center"> <a href="https://raw.githubusercontent.com/Calcium-Ion/new-api/main/LICENSE"> <img src="https://img.shields.io/github/license/Calcium-Ion/new-api?color=brightgreen" alt="license"> </a><a href="https://github.com/Calcium-Ion/new-api/releases/latest"> <img src="https://img.shields.io/github/v/release/Calcium-Ion/new-api?color=brightgreen&include_prereleases" alt="release"> </a><a href="https://hub.docker.com/r/CalciumIon/new-api"> <img src="https://img.shields.io/badge/docker-dockerHub-blue" alt="docker"> </a><a href="https://goreportcard.com/report/github.com/Calcium-Ion/new-api"> <img src="https://goreportcard.com/badge/github.com/Calcium-Ion/new-api" alt="GoReportCard"> </a> </p>

<p align="center"> <a href="https://trendshift.io/repositories/20180" target="_blank"> <img src="https://trendshift.io/api/badge/repositories/20180" alt="QuantumNous%2Fnew-api | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/> </a> <br> <a href="https://hellogithub.com/repository/QuantumNous/new-api" target="_blank"> <img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=539ac4217e69431684ad4a0bab768811&claim_uid=tbFPfKIDHpc4TzR" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /> </a><a href="https://www.producthunt.com/products/new-api/launches/new-api?embed=true&utm_source=badge-featured&utm_medium=badge&utm_campaign=badge-new-api" target="_blank" rel="noopener noreferrer"> <img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1047693&theme=light&t=1769577875005" alt="New API - All-in-one AI asset management gateway. | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /> </a> </p>

<p align="center"> <a href="#-quick-start">Quick Start</a> • <a href="#-key-features">Key Features</a> • <a href="#-deployment">Deployment</a> • <a href="#-documentation">Documentation</a> • <a href="#-help-support">Help</a> </p>

</div>

📖 [Official Documentation](https://docs.newapi.pro/en/docs) | [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/QuantumNous/new-api)

</div>

Quick Navigation:

CategoryLink
🚀 Deployment Guide[Installation Documentation](https://docs.newapi.pro/en/docs/installation)
⚙️ Environment Configuration[Environment Variables](https://docs.newapi.pro/en/docs/installation/config-maintenance/environment-variables)
📡 API Documentation[API Documentation](https://docs.newapi.pro/en/docs/api)
❓ FAQ[FAQ](https://docs.newapi.pro/en/docs/support/faq)
💬 Community Interaction[Communication Channels](https://docs.newapi.pro/en/docs/support/community-interaction)

---

📡 Supported Interfaces

<details> <summary>View complete interface list</summary>

</details>

---

💖 Thank you for using New API

If this project is helpful to you, welcome to give us a ⭐️ Star!

Official DocumentationIssue FeedbackLatest Release

<sub>Built with ❤️ by QuantumNous</sub>

</div>

🎯 aiskill88 AI 点评 A 级 2026-05-28

高质量的AI工具,支持跨模型转换

⚡ 核心功能

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +GitHub 35.8k Star,社区高度认可
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

该工具使用 AGPL-3.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

⚠️ AGPL 3.0 — 最严格的 Copyleft,网络服务端使用也需开源,SaaS 使用受限。

🔗 相关工具推荐

🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

请参考项目文档
💡 AI Skill Hub 点评

经综合评估,新一代AI工具 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

📚 深入学习 新一代AI工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 new-api
Topics ai-gatewayclaudedeepseekgemini
GitHub https://github.com/QuantumNous/new-api
License AGPL-3.0
语言 Go
🔗 原始来源
🐙 GitHub 仓库  https://github.com/QuantumNous/new-api 🌐 官方网站  https://www.newapi.ai

收录时间:2026-05-28 · 更新时间:2026-05-28 · License:AGPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。