[UNTESTED] [ZXEB/aiapi] 2 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,157 characters
Status: [UNTESTED]
Endpoints found:
http://127.0.0.1:3001/api/backup/export
http://127.0.0.1:3001/api/backup/import
Source: https://github.com/ZXEB/aiapi
# AIAPI - NewAPI 聚合网关
对接任意 **NewAPI / OpenAI 兼容** 接口的聚合站。填入你的 NewAPI 地址 + API Key,后端加密存储并代理 `/v1/models` 与 `/v1/chat/completions`(支持 SSE 流式),前端提供对话页,`admin` 提供配置/模型列表/概览。
参考 UI:深色 Dashboard 风格(侧栏 + 统计卡片 + 表格),`web` 与 `admin` 共用同一设计系统。
## 一键安装(Linux / Docker,推荐)
在你的 Linux 服务器上执行一条命令即可完成部署:
```bash
bash <(curl -fsSL https://raw.githubusercontent.com/ZXEB/aiapi/main/install.sh)
```
或:
```bash
curl -fsSL https://raw.githubusercontent.com/ZXEB/aiapi/main/install.sh | bash
# 下载到本地再执行(可先审阅脚本)
curl -fsSL https://raw.githubusercontent.com/ZXEB/aiapi/main/install.sh -o install.sh
bash install.sh --dir /opt/aiapi
```
脚本会自动完成:安装/检查 `git` / `docker` / `docker compose` → 克隆仓库 → 生成 `.env`(随机 `ENCRYPTION_KEY` / `ADMIN_TOKEN`)→ `docker compose up -d --build` → 健康检查。
安装完成后:
- web: `http://服务器IP:5173`
- admin: `http://服务器IP:5174` ← **在此填 NewAPI 地址和 sk-xxx**
- api: `http://服务器IP:3001`(`GET /api/health`)
管理后台 → 接口配置 → 填 `https://你的NewAPI域名/v1` + `sk-xxx` → 测试连接 → 保存 → 前端即可在下拉框选模型对话。
### 自定义端口
默认端口 `server 3001 / web 5173 / admin 5174`,任一被占用都可在安装时或安装后修改:
```bash
# 方式一:安装时指定(推荐)
bash install.sh --server-port 3001 --web-port 8080 --admin-port 8081
# 方式二:环境变量
SERVER_PORT=3001 WEB_PORT=8080 ADMIN_PORT=8081 bash install.sh
# 方式三:管道 + 参数
curl -fsSL https://raw.githubusercontent.com/ZXEB/aiapi/main/install.sh | bash -s -- --web-port 8080 --admin-port 8081
# 已安装后修改
vim .env # 改 SERVER_PORT / WEB