From 14a1fed5b4f1558120dc71d0010d286daf300e40 Mon Sep 17 00:00:00 2001 From: "AIPDD@Jason" <361117562@qq.com> Date: Thu, 21 May 2026 11:36:22 +0800 Subject: [PATCH] Update README.md --- README.md | 484 ++++++++++++++++++++++++------------------------------ 1 file changed, 212 insertions(+), 272 deletions(-) diff --git a/README.md b/README.md index ab6f1499e967..b4a228c6b0c6 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,8 @@
-![new-api](/web/default/public/logo.png) +# AIPDD-new-api -# New API - -🍥 **Next-Generation LLM Gateway and AI Asset Management System** - -

- 简体中文 | - 繁體中文 | - English | - Français | - 日本語 -

+**AIPDD基于new-api开源的新一代大模型网关与AI资产管理系统**

@@ -30,112 +20,70 @@

- - QuantumNous%2Fnew-api | Trendshift - -
- - Featured|HelloGitHub - - New API - All-in-one AI asset management gateway. | Product Hunt - -

- -

- Quick Start • - Key Features • - Deployment • - Documentation • - Help + 快速开始 • + 主要特性 • + 部署 • + 文档 • + 帮助

-## 📝 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. +> - 本项目仅面向合法授权的 AI API 网关、组织内部鉴权、多模型管理、用量统计、成本核算和私有化部署场景。 +> - 使用者必须合法取得上游 API Key、账号、模型服务或接口权限,并遵守上游服务条款及适用法律法规。 +> - 使用者应确保其使用方式符合上游服务条款及适用法律法规。 +> - 面向公众提供生成式人工智能服务时,使用者应遵守[《生成式人工智能服务管理暂行办法》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm)等监管要求,自行完成所在司法辖区要求的备案、许可、内容安全、实名、日志留存、税务和上游授权等合规义务。 --- -## 🤝 Trusted Partners +## 🙏 特别鸣谢 -

- No particular order -

- -

- - Cherry Studio - - Aion UI - - Peking University - - UCloud - - Alibaba Cloud - - IO.NET - -

+[New API](https://github.com/QuantumNous/new-api) 作为本项目的核心底座 --- +## 🚀 安装说明 -## 🙏 Special Thanks - -

- - JetBrains Logo - -

+> - 代码完全开源,直接安装即可 +> - 如果不会安装也可以请我们帮忙代安装,费用为每个客户 ¥300.00,请加以下二维码进行安装预约即可 +
+ QR +
-

- Thanks to JetBrains for providing free open-source development license for this project -

---- +## 🚀 快速开始 -## 🚀 Quick Start - -### Using Docker Compose (Recommended) +### 使用 Docker Compose(推荐) ```bash -# Clone the project -git clone https://github.com/QuantumNous/new-api.git +# 克隆项目 +git clone https://github.com/liujh0729-jpg/aipdd-new-api.git cd new-api -# Edit docker-compose.yml configuration +# 编辑 docker-compose.yml 配置 nano docker-compose.yml -# Start the service +# 启动服务 docker-compose up -d ```
-Using Docker Commands +使用 Docker 命令 ```bash -# Pull the latest image +# 拉取最新镜像 docker pull calciumion/new-api:latest -# Using SQLite (default) +# 使用 SQLite(默认) docker run --name new-api -d --restart always \ -p 3000:3000 \ -e TZ=Asia/Shanghai \ -v ./data:/data \ calciumion/new-api:latest -# Using MySQL +# 使用 MySQL docker run --name new-api -d --restart always \ -p 3000:3000 \ -e SQL_DSN="root:123456@tcp(localhost:3306)/oneapi" \ @@ -144,97 +92,91 @@ docker run --name new-api -d --restart always \ calciumion/new-api:latest ``` -> **💡 Tip:** `-v ./data:/data` will save data in the `data` folder of the current directory, you can also change it to an absolute path like `-v /your/custom/path:/data` +> **💡 提示:** `-v ./data:/data` 会将数据保存在当前目录的 `data` 文件夹中,你也可以改为绝对路径如 `-v /your/custom/path:/data`
--- -🎉 After deployment is complete, visit `http://localhost:3000` to start using! +🎉 部署完成后,访问 `http://localhost:3000` 即可使用! > [!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. +> 将本项目作为面向公众的生成式 AI 服务或 API 转售服务运营时,使用者应先完成备案、内容安全、实名、日志留存、税务、支付和上游授权等合规义务。 -📖 For more deployment methods, please refer to [Deployment Guide](https://docs.newapi.pro/en/docs/installation) +📖 更多部署方式请参考 [部署指南](https://docs.newapi.pro/zh/docs/installation) --- -## 📚 Documentation +## 📚 文档 -
+**快速导航:** -### 📖 [Official Documentation](https://docs.newapi.pro/en/docs) | [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/QuantumNous/new-api) - -
- -**Quick Navigation:** - -| Category | Link | +| 分类 | 链接 | |------|------| -| 🚀 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) | +| 🚀 部署指南 | [安装文档](https://docs.newapi.pro/zh/docs/installation) | +| ⚙️ 环境配置 | [环境变量](https://docs.newapi.pro/zh/docs/installation/config-maintenance/environment-variables) | +| 📡 接口文档 | [API 文档](https://docs.newapi.pro/zh/docs/api) | +| ❓ 常见问题 | [FAQ](https://docs.newapi.pro/zh/docs/support/faq) | +| 💬 社区交流 | [交流渠道](https://docs.newapi.pro/zh/docs/support/community-interaction) | --- -## ✨ Key Features +## ✨ 主要特性 -> For detailed features, please refer to [Features Introduction](https://docs.newapi.pro/en/docs/guide/wiki/basic-concepts/features-introduction) +> 详细特性请参考 [特性说明](https://docs.newapi.pro/zh/docs/guide/wiki/basic-concepts/features-introduction) -### 🎨 Core Functions +### 🎨 核心功能 -| Feature | Description | +| 特性 | 说明 | |------|------| -| 🎨 New UI | Modern user interface design | -| 🌍 Multi-language | Supports Simplified Chinese, Traditional Chinese, English, French, Japanese | -| 🔄 Data Compatibility | Fully compatible with the original One API database | -| 📈 Data Dashboard | Visual console and statistical analysis | -| 🔒 Permission Management | Token grouping, model restrictions, user management | - -### 💰 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 - -### 🔐 Authorization and Security - -- 😈 Discord authorization login -- 🤖 LinuxDO authorization login -- 📱 Telegram authorization login -- 🔑 OIDC unified authentication -- 🔍 Key quota query usage (with [new-api-key-tool](https://github.com/Calcium-Ion/new-api-key-tool)) - -### 🚀 Advanced Features - -**API Format Support:** -- ⚡ [OpenAI Responses](https://docs.newapi.pro/en/docs/api/ai-model/chat/openai/create-response) -- ⚡ [OpenAI Realtime API](https://docs.newapi.pro/en/docs/api/ai-model/realtime/create-realtime-session) (including Azure) -- ⚡ [Claude Messages](https://docs.newapi.pro/en/docs/api/ai-model/chat/create-message) -- ⚡ [Google Gemini](https://doc.newapi.pro/en/api/google-gemini-chat) -- 🔄 [Rerank Models](https://docs.newapi.pro/en/docs/api/ai-model/rerank/create-rerank) (Cohere, Jina) - -**Intelligent Routing:** -- ⚖️ Channel weighted random -- 🔄 Automatic retry on failure -- 🚦 User-level model rate limiting - -**Format Conversion:** +| 🎨 全新 UI | 现代化的用户界面设计 | +| 🌍 多语言 | 支持中文、英文、法语、日语 | +| 🔄 数据兼容 | 完全兼容原版 One API 数据库 | +| 📈 数据看板 | 可视化控制台与统计分析 | +| 🔒 权限管理 | 令牌分组、模型限制、用户管理 | + +### 💰 授权用量与成本管理 + +- ✅ 合法授权场景下的内部充值与额度分配(易支付、Stripe) +- ✅ 组织内按次、按量或缓存命中成本核算 +- ✅ 支持 OpenAI、Azure、DeepSeek、Claude、Qwen 等模型的缓存计费统计 +- ✅ 面向内部管理或企业客户的灵活计费策略配置 + +### 🔐 授权与安全 + +- 😈 Discord 授权登录 +- 🤖 LinuxDO 授权登录 +- 📱 Telegram 授权登录 +- 🔑 OIDC 统一认证 +- 🔍 Key 查询使用额度(配合 [new-api-key-tool](https://github.com/Calcium-Ion/new-api-key-tool)) + +### 🚀 高级功能 + +**API 格式支持:** +- ⚡ [OpenAI Responses](https://docs.newapi.pro/zh/docs/api/ai-model/chat/openai/create-response) +- ⚡ [OpenAI Realtime API](https://docs.newapi.pro/zh/docs/api/ai-model/realtime/create-realtime-session)(含 Azure) +- ⚡ [Claude Messages](https://docs.newapi.pro/zh/docs/api/ai-model/chat/create-message) +- ⚡ [Google Gemini](https://doc.newapi.pro/api/google-gemini-chat) +- 🔄 [Rerank 模型](https://docs.newapi.pro/zh/docs/api/ai-model/rerank/create-rerank)(Cohere、Jina) + +**智能路由:** +- ⚖️ 渠道加权随机 +- 🔄 失败自动重试 +- 🚦 用户级别模型限流 + +**格式转换:** - 🔄 **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** +- 🔄 **Google Gemini → OpenAI Compatible** - 仅支持文本,暂不支持函数调用 +- 🚧 **OpenAI Compatible ⇄ OpenAI Responses** - 开发中 +- 🔄 **思考转内容功能** -**Reasoning Effort Support:** +**Reasoning Effort 支持:**
-View detailed configuration +查看详细配置 -**OpenAI series models:** +**OpenAI 系列模型:** - `o3-mini-high` - High reasoning effort - `o3-mini-medium` - Medium reasoning effort - `o3-mini-low` - Low reasoning effort @@ -242,120 +184,120 @@ docker run --name new-api -d --restart always \ - `gpt-5-medium` - Medium reasoning effort - `gpt-5-low` - Low reasoning effort -**Claude thinking models:** -- `claude-3-7-sonnet-20250219-thinking` - Enable thinking mode +**Claude 思考模型:** +- `claude-3-7-sonnet-20250219-thinking` - 启用思考模式 -**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). +**Google Gemini 系列模型:** +- `gemini-2.5-flash-thinking` - 启用思考模式 +- `gemini-2.5-flash-nothinking` - 禁用思考模式 +- `gemini-2.5-pro-thinking` - 启用思考模式 +- `gemini-2.5-pro-thinking-128` - 启用思考模式,并设置思考预算为128tokens +- 也可以直接在 Gemini 模型名称后追加 `-low` / `-medium` / `-high` 来控制思考力度(无需再设置思考预算后缀)
--- -## 🤖 Model Support +## 🤖 模型支持 -> For details, please refer to [API Documentation - Gateway Interface](https://docs.newapi.pro/en/docs/api) +> 详情请参考 [接口文档 - 网关接口](https://docs.newapi.pro/zh/docs/api) -| Model Type | Description | Documentation | +| 模型类型 | 说明 | 文档 | |---------|------|------| -| 🤖 OpenAI-Compatible | OpenAI compatible models | [Documentation](https://docs.newapi.pro/en/docs/api/ai-model/chat/openai/createchatcompletion) | -| 🤖 OpenAI Responses | OpenAI Responses format | [Documentation](https://docs.newapi.pro/en/docs/api/ai-model/chat/openai/createresponse) | -| 🎨 Midjourney-Proxy | [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy) | [Documentation](https://doc.newapi.pro/api/midjourney-proxy-image) | -| 🎵 Suno-API | [Suno API](https://github.com/Suno-API/Suno-API) | [Documentation](https://doc.newapi.pro/api/suno-music) | -| 🔄 Rerank | Cohere, Jina | [Documentation](https://docs.newapi.pro/en/docs/api/ai-model/rerank/creatererank) | -| 💬 Claude | Messages format | [Documentation](https://docs.newapi.pro/en/docs/api/ai-model/chat/createmessage) | -| 🌐 Gemini | Google Gemini format | [Documentation](https://docs.newapi.pro/en/docs/api/ai-model/chat/gemini/geminirelayv1beta) | -| 🔧 Dify | ChatFlow mode | - | -| 🎯 Custom upstream | Supports configuring legally authorized upstream endpoints | - | - -### 📡 Supported Interfaces +| 🤖 OpenAI-Compatible | OpenAI 兼容模型 | [文档](https://docs.newapi.pro/zh/docs/api/ai-model/chat/openai/createchatcompletion) | +| 🤖 OpenAI Responses | OpenAI Responses 格式 | [文档](https://docs.newapi.pro/zh/docs/api/ai-model/chat/openai/createresponse) | +| 🎨 Midjourney-Proxy | [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy) | [文档](https://doc.newapi.pro/api/midjourney-proxy-image) | +| 🎵 Suno-API | [Suno API](https://github.com/Suno-API/Suno-API) | [文档](https://doc.newapi.pro/api/suno-music) | +| 🔄 Rerank | Cohere、Jina | [文档](https://docs.newapi.pro/zh/docs/api/ai-model/rerank/create-rerank) | +| 💬 Claude | Messages 格式 | [文档](https://docs.newapi.pro/zh/docs/api/ai-model/chat/createmessage) | +| 🌐 Gemini | Google Gemini 格式 | [文档](https://docs.newapi.pro/zh/docs/api/ai-model/chat/gemini/geminirelayv1beta) | +| 🔧 Dify | ChatFlow 模式 | - | +| 🎯 自定义上游 | 支持配置合法授权的上游接口地址 | - | + +### 📡 支持的接口
-View complete interface list - -- [Chat Interface (Chat Completions)](https://docs.newapi.pro/en/docs/api/ai-model/chat/openai/createchatcompletion) -- [Response Interface (Responses)](https://docs.newapi.pro/en/docs/api/ai-model/chat/openai/createresponse) -- [Image Interface (Image)](https://docs.newapi.pro/en/docs/api/ai-model/images/openai/post-v1-images-generations) -- [Audio Interface (Audio)](https://docs.newapi.pro/en/docs/api/ai-model/audio/openai/create-transcription) -- [Video Interface (Video)](https://docs.newapi.pro/en/docs/api/ai-model/audio/openai/createspeech) -- [Embedding Interface (Embeddings)](https://docs.newapi.pro/en/docs/api/ai-model/embeddings/createembedding) -- [Rerank Interface (Rerank)](https://docs.newapi.pro/en/docs/api/ai-model/rerank/creatererank) -- [Realtime Conversation (Realtime)](https://docs.newapi.pro/en/docs/api/ai-model/realtime/createrealtimesession) -- [Claude Chat](https://docs.newapi.pro/en/docs/api/ai-model/chat/createmessage) -- [Google Gemini Chat](https://docs.newapi.pro/en/docs/api/ai-model/chat/gemini/geminirelayv1beta) +查看完整接口列表 + +- [聊天接口 (Chat Completions)](https://docs.newapi.pro/zh/docs/api/ai-model/chat/openai/createchatcompletion) +- [响应接口 (Responses)](https://docs.newapi.pro/zh/docs/api/ai-model/chat/openai/createresponse) +- [图像接口 (Image)](https://docs.newapi.pro/zh/docs/api/ai-model/images/openai/post-v1-images-generations) +- [音频接口 (Audio)](https://docs.newapi.pro/zh/docs/api/ai-model/audio/openai/create-transcription) +- [视频接口 (Video)](https://docs.newapi.pro/zh/docs/api/ai-model/audio/openai/createspeech) +- [嵌入接口 (Embeddings)](https://docs.newapi.pro/zh/docs/api/ai-model/embeddings/createembedding) +- [重排序接口 (Rerank)](https://docs.newapi.pro/zh/docs/api/ai-model/rerank/creatererank) +- [实时对话 (Realtime)](https://docs.newapi.pro/zh/docs/api/ai-model/realtime/createrealtimesession) +- [Claude 聊天](https://docs.newapi.pro/zh/docs/api/ai-model/chat/createmessage) +- [Google Gemini 聊天](https://docs.newapi.pro/zh/docs/api/ai-model/chat/gemini/geminirelayv1beta)
--- -## 🚢 Deployment +## 🚢 部署 > [!TIP] -> **Latest Docker image:** `calciumion/new-api:latest` +> **最新版 Docker 镜像:** `calciumion/new-api:latest` -### 📋 Deployment Requirements +### 📋 部署要求 -| Component | Requirement | +| 组件 | 要求 | |------|------| -| **Local database** | SQLite (Docker must mount `/data` directory)| -| **Remote database** | MySQL ≥ 5.7.8 or PostgreSQL ≥ 9.6 | -| **Container engine** | Docker / Docker Compose | +| **本地数据库** | SQLite(Docker 需挂载 `/data` 目录)| +| **远程数据库** | MySQL ≥ 5.7.8 或 PostgreSQL ≥ 9.6 | +| **容器引擎** | Docker / Docker Compose | -### ⚙️ Environment Variable Configuration +### ⚙️ 环境变量配置
-Common environment variable configuration - -| Variable Name | Description | Default Value | -|--------|------|--------| -| `SESSION_SECRET` | Session secret (required for multi-machine deployment) | - | -| `CRYPTO_SECRET` | Encryption secret (required for Redis) | - | -| `SQL_DSN` | Database connection string | - | -| `REDIS_CONN_STRING` | Redis connection string | - | -| `STREAMING_TIMEOUT` | Streaming timeout (seconds) | `300` | -| `STREAM_SCANNER_MAX_BUFFER_MB` | Max per-line buffer (MB) for the stream scanner; increase when upstream sends huge image/base64 payloads | `64` | -| `MAX_REQUEST_BODY_MB` | Max request body size (MB, counted **after decompression**; prevents huge requests/zip bombs from exhausting memory). Exceeding it returns `413` | `32` | -| `AZURE_DEFAULT_API_VERSION` | Azure API version | `2025-04-01-preview` | -| `ERROR_LOG_ENABLED` | Error log switch | `false` | -| `PYROSCOPE_URL` | Pyroscope server address | - | -| `PYROSCOPE_APP_NAME` | Pyroscope application name | `new-api` | -| `PYROSCOPE_BASIC_AUTH_USER` | Pyroscope basic auth user | - | -| `PYROSCOPE_BASIC_AUTH_PASSWORD` | Pyroscope basic auth password | - | -| `PYROSCOPE_MUTEX_RATE` | Pyroscope mutex sampling rate | `5` | -| `PYROSCOPE_BLOCK_RATE` | Pyroscope block sampling rate | `5` | -| `HOSTNAME` | Hostname tag for Pyroscope | `new-api` | - -📖 **Complete configuration:** [Environment Variables Documentation](https://docs.newapi.pro/en/docs/installation/config-maintenance/environment-variables) +常用环境变量配置 + +| 变量名 | 说明 | 默认值 | +|--------|--------------------------------------------------------------|--------| +| `SESSION_SECRET` | 会话密钥(多机部署必须) | - | +| `CRYPTO_SECRET` | 加密密钥(Redis 必须) | - | +| `SQL_DSN` | 数据库连接字符串 | - | +| `REDIS_CONN_STRING` | Redis 连接字符串 | - | +| `STREAMING_TIMEOUT` | 流式超时时间(秒) | `300` | +| `STREAM_SCANNER_MAX_BUFFER_MB` | 流式扫描器单行最大缓冲(MB),图像生成等超大 `data:` 片段(如 4K 图片 base64)需适当调大 | `64` | +| `MAX_REQUEST_BODY_MB` | 请求体最大大小(MB,**解压后**计;防止超大请求/zip bomb 导致内存暴涨),超过将返回 `413` | `32` | +| `AZURE_DEFAULT_API_VERSION` | Azure API 版本 | `2025-04-01-preview` | +| `ERROR_LOG_ENABLED` | 错误日志开关 | `false` | +| `PYROSCOPE_URL` | Pyroscope 服务地址 | - | +| `PYROSCOPE_APP_NAME` | Pyroscope 应用名 | `new-api` | +| `PYROSCOPE_BASIC_AUTH_USER` | Pyroscope Basic Auth 用户名 | - | +| `PYROSCOPE_BASIC_AUTH_PASSWORD` | Pyroscope Basic Auth 密码 | - | +| `PYROSCOPE_MUTEX_RATE` | Pyroscope mutex 采样率 | `5` | +| `PYROSCOPE_BLOCK_RATE` | Pyroscope block 采样率 | `5` | +| `HOSTNAME` | Pyroscope 标签里的主机名 | `new-api` | + +📖 **完整配置:** [环境变量文档](https://docs.newapi.pro/zh/docs/installation/config-maintenance/environment-variables)
-### 🔧 Deployment Methods +### 🔧 部署方式
-Method 1: Docker Compose (Recommended) +方式 1:Docker Compose(推荐) ```bash -# Clone the project +# 克隆项目 git clone https://github.com/QuantumNous/new-api.git cd new-api -# Edit configuration +# 编辑配置 nano docker-compose.yml -# Start service +# 启动服务 docker-compose up -d ```
-Method 2: Docker Commands +方式 2:Docker 命令 -**Using SQLite:** +**使用 SQLite:** ```bash docker run --name new-api -d --restart always \ -p 3000:3000 \ @@ -364,7 +306,7 @@ docker run --name new-api -d --restart always \ calciumion/new-api:latest ``` -**Using MySQL:** +**使用 MySQL:** ```bash docker run --name new-api -d --restart always \ -p 3000:3000 \ @@ -374,94 +316,92 @@ docker run --name new-api -d --restart always \ calciumion/new-api:latest ``` -> **💡 Path explanation:** -> - `./data:/data` - Relative path, data saved in the data folder of the current directory -> - You can also use absolute path, e.g.: `/your/custom/path:/data` +> **💡 路径说明:** +> - `./data:/data` - 相对路径,数据保存在当前目录的 data 文件夹 +> - 也可使用绝对路径,如:`/your/custom/path:/data`
-Method 3: BaoTa Panel +方式 3:宝塔面板 -1. Install BaoTa Panel (≥ 9.2.0 version) -2. Search for **New-API** in the application store -3. One-click installation +1. 安装宝塔面板(≥ 9.2.0 版本) +2. 在应用商店搜索 **New-API** +3. 一键安装 -📖 [Tutorial with images](./docs/BT.md) +📖 [图文教程](./docs/installation/BT.md)
-### ⚠️ Multi-machine Deployment Considerations +### ⚠️ 多机部署注意事项 > [!WARNING] -> - **Must set** `SESSION_SECRET` - Otherwise login status inconsistent -> - **Shared Redis must set** `CRYPTO_SECRET` - Otherwise data cannot be decrypted +> - **必须设置** `SESSION_SECRET` - 否则登录状态不一致 +> - **公用 Redis 必须设置** `CRYPTO_SECRET` - 否则数据无法解密 -### 🔄 Channel Retry and Cache +### 🔄 渠道重试与缓存 -**Retry configuration:** `Settings → Operation Settings → General Settings → Failure Retry Count` +**重试配置:** `设置 → 运营设置 → 通用设置 → 失败重试次数` -**Cache configuration:** -- `REDIS_CONN_STRING`: Redis cache (recommended) -- `MEMORY_CACHE_ENABLED`: Memory cache +**缓存配置:** +- `REDIS_CONN_STRING`:Redis 缓存(推荐) +- `MEMORY_CACHE_ENABLED`:内存缓存 --- -## 🔗 Related Projects +## 🔗 相关项目 -### Upstream Projects +### 上游项目 -| Project | Description | +| 项目 | 说明 | |------|------| -| [One API](https://github.com/songquanpeng/one-api) | Original project base | -| [Midjourney-Proxy](https://github.com/novicezk/midjourney-proxy) | Midjourney interface support | +| [One API](https://github.com/songquanpeng/one-api) | 原版项目基础 | +| [Midjourney-Proxy](https://github.com/novicezk/midjourney-proxy) | Midjourney 接口支持 | -### Supporting Tools +### 配套工具 -| Project | Description | +| 项目 | 说明 | |------|------| -| [new-api-key-tool](https://github.com/Calcium-Ion/new-api-key-tool) | Key quota query tool | -| [new-api-horizon](https://github.com/Calcium-Ion/new-api-horizon) | New API high-performance optimized version | +| [new-api-key-tool](https://github.com/Calcium-Ion/new-api-key-tool) | Key 额度查询工具 | +| [new-api-horizon](https://github.com/Calcium-Ion/new-api-horizon) | New API 高性能优化版 | --- -## 💬 Help Support +## 💬 帮助支持 -### 📖 Documentation Resources +### 📖 文档资源 -| Resource | Link | +| 资源 | 链接 | |------|------| -| 📘 FAQ | [FAQ](https://docs.newapi.pro/en/docs/support/faq) | -| 💬 Community Interaction | [Communication Channels](https://docs.newapi.pro/en/docs/support/community-interaction) | -| 🐛 Issue Feedback | [Issue Feedback](https://docs.newapi.pro/en/docs/support/feedback-issues) | -| 📚 Complete Documentation | [Official Documentation](https://docs.newapi.pro/en/docs) | +| 📘 常见问题 | [FAQ](https://docs.newapi.pro/zh/docs/support/faq) | +| 💬 社区交流 | [交流渠道](https://docs.newapi.pro/zh/docs/support/community-interaction) | +| 🐛 反馈问题 | [问题反馈](https://docs.newapi.pro/zh/docs/support/feedback-issues) | +| 📚 完整文档 | [官方文档](https://docs.newapi.pro/zh/docs) | -### 🤝 Contribution Guide +### 🤝 贡献指南 -Welcome all forms of contribution! +欢迎各种形式的贡献! -- 🐛 Report Bugs -- 💡 Propose New Features -- 📝 Improve Documentation -- 🔧 Submit Code +- 🐛 报告 Bug +- 💡 提出新功能 +- 📝 改进文档 +- 🔧 提交代码 --- -## 📜 License +## 📜 许可证 -This project is licensed under the [GNU Affero General Public License v3.0 (AGPLv3)](./LICENSE). +本项目采用 [GNU Affero 通用公共许可证 v3.0 (AGPLv3)](./LICENSE) 授权。 -Additional terms under AGPLv3 Section 7 apply. Modified versions must preserve -the author attribution notice `Frontend design and development by New API -contributors.` in the appropriate legal notices and in any prominent about, -legal, footer, or attribution location presented by the user interface. +本项目基于开源项目 [New‑API](https://github.com/QuantumNous/new-api) 二次开发, +原项目采用 **GNU Affero General Public License v3.0 (AGPL‑3.0)** 许可证。 +因此本项目整体继承 **AGPL‑3.0** 开源协议。 -Modified versions that present a user interface must also preserve a visible -link to the original project: . +⚠️ 重要说明: +本项目修改后若对外提供网络服务(API/网页等 SaaS 形式), +必须向用户公开完整修改后的源代码,禁止闭源商用,如需闭源使用请联系原项目获取商业授权。 -This is an open-source project developed based on [One API](https://github.com/songquanpeng/one-api) (MIT License). - -If your organization's policies do not permit the use of AGPLv3-licensed software, or if you wish to avoid the open-source obligations of AGPLv3, please contact us at: [support@quantumnous.com](mailto:support@quantumnous.com) +如果您所在的组织政策不允许使用 AGPLv3 许可的软件,或您希望规避 AGPLv3 的开源义务,请发送邮件至:[support@quantumnous.com](mailto:support@quantumnous.com) --- @@ -469,7 +409,7 @@ If your organization's policies do not permit the use of AGPLv3-licensed softwar
-[![Star History Chart](https://api.star-history.com/svg?repos=Calcium-Ion/new-api&type=Date)](https://star-history.com/#Calcium-Ion/new-api&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=liujh0729-jpg/aipdd-new-api&type=Date)](https://star-history.com/#liujh0729-jpg/aipdd-new-api&Date)
@@ -477,12 +417,12 @@ If your organization's policies do not permit the use of AGPLv3-licensed softwar
-### 💖 Thank you for using New API +### 💖 感谢使用 AIPDD - New API -If this project is helpful to you, welcome to give us a ⭐️ Star! +如果这个项目对你有帮助,欢迎给我们一个 ⭐️ Star! -**[Official Documentation](https://docs.newapi.pro/en/docs)** • **[Issue Feedback](https://github.com/Calcium-Ion/new-api/issues)** • **[Latest Release](https://github.com/Calcium-Ion/new-api/releases)** -Built with ❤️ by QuantumNous +Built with ❤️ by AIPDD
+