feat: add new-api and gpt-load

This commit is contained in:
okxlin
2026-06-27 19:29:29 +08:00
committed by GitHub
parent 4c8a644c92
commit d781a030a1
24 changed files with 389 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
# GPT-Load
## 产品介绍
GPT-Load 是多渠道 AI API 透明代理服务,面向需要统一管理多个上游模型服务、密钥池、负载均衡和调用监控的场景。
## 主要功能
- 提供 OpenAI、Gemini、Claude 等 API 的透明代理入口
- 支持密钥池管理、自动轮询、失败恢复和负载均衡
- 管理端和代理端分离鉴权,并支持 SQLite 单容器轻量部署
## 访问说明
安装后通过 `http://<服务器 IP>:15077` 访问管理界面,实际端口以安装表单中的 `PANEL_APP_PORT_HTTP` 为准;API 代理地址为 `http://<服务器 IP>:<端口>/proxy`。
## Introduction
GPT-Load is a multi-channel AI API transparent proxy for managing upstream providers, key pools, load balancing and request monitoring.
## Features
- Transparent proxy entry for OpenAI, Gemini, Claude and similar APIs
- Key pool management, rotation, failure recovery and load balancing
- Separate authentication for management and proxy access, with SQLite single-container deployment by default
## 部署说明
- 本应用使用官方 GitHub Container Registry 镜像 `ghcr.io/tbphp/gpt-load` 部署。
- 默认采用官方文档中的 SQLite 单容器形态,只挂载 `/app/data` 数据目录。
- 应用分类:AI。
- 支持架构:amd64、arm64。
- 可选版本:`latest`。
## 端口
| 变量 | 说明 | 默认值 | 必填 |
| --- | --- | --- | --- |
| PANEL_APP_PORT_HTTP | GPT-Load Web 管理端与 API 代理端口 | 15077 | 是 |
## 数据持久化
| 变量 | 说明 | 默认值 | 必填 |
| --- | --- | --- | --- |
| APP_DATA_DIR | GPT-Load 数据目录,挂载到容器 `/app/data` | ./data | 是 |
升级、迁移、变更加密密钥或切换外部数据库前,请先在 1Panel 中备份 `APP_DATA_DIR`。
## 参数说明
| 变量 | 说明 | 默认值 | 必填 |
| --- | --- | --- | --- |
| AUTH_KEY | 管理端登录密钥,安装时随机生成 | 随机生成 | 是 |
| ENCRYPTION_KEY | API Key 静态加密密钥,安装后请保持稳定 | 随机生成 | 是 |
| TZ | 容器时区 | Asia/Shanghai | 是 |
## 使用说明
- 请妥善保存 `AUTH_KEY`,它用于登录管理界面。
- `ENCRYPTION_KEY` 用于加密存储 API Key;已有数据后请勿随意修改,否则可能需要按官方迁移流程处理加密数据。
- 本应用是 AI API 代理服务,使用前请确认你已合法取得上游 API Key、账号、模型服务和接口权限。
- 如对公网开放访问,请同步配置防火墙、安全组、反向代理、HTTPS 和访问控制。
- 如需 MySQL、PostgreSQL、Redis 或集群部署,请参考官方文档后再调整配置。
## 参考资料
- 项目仓库: <https://github.com/tbphp/gpt-load>
- Docker 快速开始: <https://github.com/tbphp/gpt-load#method-1-docker-quick-start>
- Compose 部署说明: <https://github.com/tbphp/gpt-load#method-2-using-docker-compose-recommended>
+30
View File
@@ -0,0 +1,30 @@
name: GPT-Load
tags:
- AI
title: 多渠道 AI API 透明代理与密钥轮询服务
description: 多渠道 AI API 透明代理与密钥轮询服务
additionalProperties:
key: gpt-load
name: GPT-Load
tags:
- AI
shortDescZh: 多渠道 AI API 透明代理与密钥轮询服务
shortDescEn: Multi-channel AI API proxy with intelligent key rotation
description:
en: "A multi-channel AI API transparent proxy with key pool management, load balancing, health monitoring and separate management/proxy authentication."
zh: "多渠道 AI API 透明代理,支持密钥池管理、负载均衡、健康监控,以及管理端和代理端分离鉴权。"
zh-Hant: "多渠道 AI API 透明代理,支援金鑰池管理、負載均衡、健康監控,以及管理端和代理端分離鑑權。"
ja: "キープール管理、負荷分散、ヘルス監視、管理/API プロキシ認証分離に対応した AI API 透明プロキシです。"
ko: "키 풀 관리, 부하 분산, 상태 모니터링, 관리/프록시 인증 분리를 지원하는 다중 채널 AI API 투명 프록시입니다."
ru: "Прозрачный прокси для нескольких AI API с пулом ключей, балансировкой, мониторингом и раздельной аутентификацией управления и прокси."
ms: "Proksi telus AI API berbilang saluran dengan pengurusan kumpulan kunci, pengimbangan beban, pemantauan kesihatan dan pengesahan pengurusan/proksi berasingan."
pt-br: "Proxy transparente multi-canal para APIs de IA com pool de chaves, balanceamento, monitoramento e autenticação separada para gestão e proxy."
type: tool
crossVersionUpdate: true
limit: 0
website: https://www.gpt-load.com
github: https://github.com/tbphp/gpt-load
document: https://www.gpt-load.com/docs?lang=en
architectures:
- amd64
- arm64
+6
View File
@@ -0,0 +1,6 @@
CONTAINER_NAME=gpt-load
PANEL_APP_PORT_HTTP=15077
TZ=Asia/Shanghai
APP_DATA_DIR=./data
AUTH_KEY=change-me-before-install
ENCRYPTION_KEY=change-me-before-install
+85
View File
@@ -0,0 +1,85 @@
additionalProperties:
formFields:
- default: 15077
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
label:
en: Port
zh: 端口
zh-Hant: 埠
ja: ポート
ko: 포트
ru: Порт
ms: Port
pt-br: Porta
required: true
rule: paramPort
type: number
- edit: true
envKey: AUTH_KEY
labelEn: Admin Key
labelZh: 管理密钥
label:
en: Admin Key
zh: 管理密钥
zh-Hant: 管理金鑰
ja: 管理キー
ko: 관리자 키
ru: Ключ администратора
ms: Kunci pentadbir
pt-br: Chave de administrador
random: true
required: true
rule: paramComplexity
type: password
- edit: true
envKey: ENCRYPTION_KEY
labelEn: Data Encryption Key
labelZh: 数据加密密钥
label:
en: Data Encryption Key
zh: 数据加密密钥
zh-Hant: 資料加密金鑰
ja: データ暗号化キー
ko: 데이터 암호화 키
ru: Ключ шифрования данных
ms: Kunci penyulitan data
pt-br: Chave de criptografia dos dados
random: true
required: true
rule: paramComplexity
type: password
- default: Asia/Shanghai
edit: true
envKey: TZ
labelEn: Timezone
labelZh: 时区
label:
en: Timezone
zh: 时区
zh-Hant: 時區
ja: タイムゾーン
ko: 시간대
ru: Часовой пояс
ms: Zon waktu
pt-br: Fuso horário
required: true
type: text
- default: ./data
edit: true
envKey: APP_DATA_DIR
labelEn: Data Directory
labelZh: 数据目录
label:
en: Data Directory
zh: 数据目录
zh-Hant: 資料目錄
ja: データディレクトリ
ko: 데이터 디렉터리
ru: Каталог данных
ms: Direktori data
pt-br: Diretório de dados
required: true
type: text
View File
+23
View File
@@ -0,0 +1,23 @@
services:
gpt-load:
image: "ghcr.io/tbphp/gpt-load:latest"
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:3001"
environment:
- TZ=${TZ}
- HOST=0.0.0.0
- PORT=3001
- AUTH_KEY=${AUTH_KEY}
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
volumes:
- "${APP_DATA_DIR}:/app/data"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
DATA_DIR="${APP_DATA_DIR:-./data}"
mkdir -p "$DATA_DIR"
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose down --volumes
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
exit 0
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

+5
View File
@@ -0,0 +1,5 @@
{
"repository": "https://github.com/tbphp/gpt-load",
"dockerDocs": "https://github.com/tbphp/gpt-load#method-1-docker-quick-start",
"composeFile": "https://github.com/tbphp/gpt-load/blob/main/docker-compose.yml"
}
+55
View File
@@ -0,0 +1,55 @@
# New API
## 产品介绍
New API 是新一代大模型网关与 AI 资产管理系统,可用于统一管理已授权的模型服务商、渠道、令牌、用户、用量统计和计费策略。
## 主要功能
- 提供 OpenAI、Claude、Gemini 等多种 API 格式的网关与转发能力
- 支持渠道管理、模型路由、用量统计、额度和用户权限管理
- 支持使用 SQLite 单容器部署,也可按官方文档扩展到外部数据库
## 访问说明
安装后通过 `http://<服务器 IP>:15076` 访问,实际端口以安装表单中的 `PANEL_APP_PORT_HTTP` 为准。
## Introduction
New API is a next-generation LLM gateway and AI asset management system for authorized model provider, channel, token, user, usage and billing management.
## Features
- Gateway and relay support for OpenAI, Claude, Gemini and other API formats
- Channel management, model routing, usage statistics, quotas and user permissions
- SQLite-based single-container deployment by default, with external database options documented upstream
## 部署说明
- 本应用使用官方 Docker 镜像 `calciumion/new-api` 部署。
- 默认采用官方文档中的 SQLite 单容器形态,只挂载 `/data` 数据目录。
- 应用分类:AI。
- 支持架构:amd64、arm64。
- 可选版本:`latest`。
## 端口
| 变量 | 说明 | 默认值 | 必填 |
| --- | --- | --- | --- |
| PANEL_APP_PORT_HTTP | New API Web 与 API 访问端口 | 15076 | 是 |
## 数据持久化
| 变量 | 说明 | 默认值 | 必填 |
| --- | --- | --- | --- |
| APP_DATA_DIR | New API 数据目录,挂载到容器 `/data` | ./data | 是 |
升级、迁移、切换数据库或启用外部依赖前,请先在 1Panel 中备份 `APP_DATA_DIR`。
## 参数说明
| 变量 | 说明 | 默认值 | 必填 |
| --- | --- | --- | --- |
| TZ | 容器时区 | Asia/Shanghai | 是 |
## 使用说明
- 本应用是 AI API 网关,使用前请确认你已合法取得上游 API Key、账号、模型服务和接口权限。
- 如对公网开放访问,请同步配置防火墙、安全组、反向代理、HTTPS 和访问控制。
- 面向公众提供生成式 AI 服务或 API 转售服务时,请自行完成所在司法辖区要求的备案、许可、内容安全、实名、日志留存、税务和上游授权等合规义务。
- 如果需要 MySQL、PostgreSQL、Redis 或多节点部署,请参考官方部署文档后再调整配置。
## 参考资料
- 项目仓库: <https://github.com/QuantumNous/new-api>
- Docker 使用说明: <https://github.com/QuantumNous/new-api#using-docker-commands>
- 部署文档: <https://docs.newapi.pro/en/docs/installation>
+30
View File
@@ -0,0 +1,30 @@
name: New API
tags:
- AI
title: 下一代 LLM 网关与 AI 资产管理系统
description: 下一代 LLM 网关与 AI 资产管理系统
additionalProperties:
key: new-api
name: New API
tags:
- AI
shortDescZh: 下一代 LLM 网关与 AI 资产管理系统
shortDescEn: Next-generation LLM gateway and AI asset management system
description:
en: "Next-generation LLM gateway and AI asset management system for managing authorized model providers, users, tokens, routing, usage and billing."
zh: "下一代 LLM 网关与 AI 资产管理系统,用于管理已授权的模型服务商、用户、令牌、路由、用量统计和计费。"
zh-Hant: "下一代 LLM 閘道與 AI 資產管理系統,用於管理已授權的模型服務商、使用者、權杖、路由、用量統計和計費。"
ja: "認可済みモデルプロバイダー、ユーザー、トークン、ルーティング、利用量、課金を管理する次世代 LLM ゲートウェイです。"
ko: "승인된 모델 제공자, 사용자, 토큰, 라우팅, 사용량 및 과금을 관리하는 차세대 LLM 게이트웨이입니다."
ru: "LLM-шлюз нового поколения для управления авторизованными провайдерами моделей, пользователями, токенами, маршрутизацией, учетом и биллингом."
ms: "Gerbang LLM generasi baharu untuk mengurus penyedia model yang dibenarkan, pengguna, token, penghalaan, penggunaan dan pengebilan."
pt-br: "Gateway LLM de nova geração para gerenciar provedores de modelos autorizados, usuários, tokens, roteamento, uso e cobrança."
type: tool
crossVersionUpdate: true
limit: 0
website: https://www.newapi.ai
github: https://github.com/QuantumNous/new-api
document: https://docs.newapi.pro/en/docs/installation
architectures:
- amd64
- arm64
+4
View File
@@ -0,0 +1,4 @@
CONTAINER_NAME=new-api
PANEL_APP_PORT_HTTP=15076
TZ=Asia/Shanghai
APP_DATA_DIR=./data
+51
View File
@@ -0,0 +1,51 @@
additionalProperties:
formFields:
- default: 15076
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
label:
en: Port
zh: 端口
zh-Hant: 埠
ja: ポート
ko: 포트
ru: Порт
ms: Port
pt-br: Porta
required: true
rule: paramPort
type: number
- default: Asia/Shanghai
edit: true
envKey: TZ
labelEn: Timezone
labelZh: 时区
label:
en: Timezone
zh: 时区
zh-Hant: 時區
ja: タイムゾーン
ko: 시간대
ru: Часовой пояс
ms: Zon waktu
pt-br: Fuso horário
required: true
type: text
- default: ./data
edit: true
envKey: APP_DATA_DIR
labelEn: Data Directory
labelZh: 数据目录
label:
en: Data Directory
zh: 数据目录
zh-Hant: 資料目錄
ja: データディレクトリ
ko: 데이터 디렉터리
ru: Каталог данных
ms: Direktori data
pt-br: Diretório de dados
required: true
type: text
View File
+19
View File
@@ -0,0 +1,19 @@
services:
new-api:
image: "calciumion/new-api:latest"
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:3000"
environment:
- TZ=${TZ}
volumes:
- "${APP_DATA_DIR}:/data"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
DATA_DIR="${APP_DATA_DIR:-./data}"
mkdir -p "$DATA_DIR"
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose down --volumes
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
exit 0
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

+5
View File
@@ -0,0 +1,5 @@
{
"repository": "https://github.com/QuantumNous/new-api",
"dockerDocs": "https://github.com/QuantumNous/new-api#using-docker-commands",
"composeFile": "https://github.com/QuantumNous/new-api/blob/main/docker-compose.yml"
}