Hermes

Hermes 是一个轻量级、高智能的 通用大模型 API 代理与并发控制网关

它原生支持几乎所有主流协议(OpenAI, Google Gemini, Anthropic 以及本地模型如 Ollama/vLLM)的相互代理、格式转换与路由分发。开箱自带包含 30+ 全球模型厂商 的庞大字典。

通过多账号轮询与智能并发排队,它能彻底解决 API Key 限流、封禁或余额耗尽导致的业务中断问题。最新版本为纯 零配置 (Zero-Config) 驱动,内置 SQLite 数据库和 Web Admin Dashboard (管理面板)

核心特性

协议与路由矩阵

源协议 (客户端)目标协议 (上游)说明
openaiopenai透传 + 轮询 (兼容所有 OpenAI 格式的 API)
openaianthropicOpenAI 格式 → Anthropic 格式转换
openaigoogleOpenAI 格式 → Google Gemini 格式转换
anthropicanthropic透传 + 轮询
anthropicopenaiAnthropic 格式 → OpenAI 格式转换
googlegoogle透传 + 轮询
locallocal本地模型无鉴权透传 (Ollama/vLLM)

快速安装

所有配置、计费记录和 SQLite 数据库 (polarisagi_hermes.db) 将安全保存在:~/.polarisagi/hermes/

macOS / Linux

默认安装:

curl -sSL https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/install.sh | bash

中国地区 (代理加速):

curl -sSL https://mirror.ghproxy.com/https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/install.sh | bash

Windows (PowerShell as Admin)

默认安装:

iwr -useb https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/install.ps1 | iex

中国地区 (代理加速):

iwr -useb https://mirror.ghproxy.com/https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/install.ps1 | iex

网关将作为后台服务运行并开机自启。

一键卸载

macOS / Linux

默认卸载:

curl -sSL https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/uninstall.sh | bash

中国地区 (代理加速):

curl -sSL https://mirror.ghproxy.com/https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/uninstall.sh | bash

Windows (PowerShell as Admin)

默认卸载:

iwr -useb https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/uninstall.ps1 | iex

中国地区 (代理加速):

iwr -useb https://mirror.ghproxy.com/https://raw.githubusercontent.com/polarisagi/hermes/main/scripts/uninstall.ps1 | iex

快速上手

默认情况下,网关监听在 127.0.0.1:27777

  1. 管理面板: 访问 http://127.0.0.1:27777/dashboard
  2. 添加渠道: 选择协议 → 选择厂商 → 填入 API Key → 保存。
  3. 一键客户端配置: 导航到 "Client Config",选择目标软件,选择要注入的 API Key 即可完成。
  4. API 端点 (Endpoints) (在各类 AI 工具中填入以下 URL 即可,API Key 任意填写):
    • OpenAI 协议: http://127.0.0.1:27777/v1/openai/
    • Anthropic 协议: http://127.0.0.1:27777/v1/anthropic/
    • Google 协议: http://127.0.0.1:27777/v1/google/