AnumaAI OpenAI 兼容 API 网关 + 自动注册机
基于 Sliverkiss/anuma2api 部署优化
将 AnumaAI 转为 OpenAI 兼容 API,支持:
- ✅ 18 个模型(Kimi、GPT、Qwen、GLM、MiniMax、Claude、Gemini、Grok 等)
- ✅ 非流式 / 流式输出
- ✅ 工具调用 (Function Calling)
- ✅ 自动注册账号 + 推送网关
- ✅ 账号池管理 + 负载均衡 + 自动重试
用户 → VPS:7895 (网关/Docker) → VPS:7896 (代理/systemd) → portal.anuma.ai
| 组件 |
位置 |
说明 |
| 注册机 |
家云 /opt/anuma-register/ |
自动注册账号,解 hCaptcha,推送到网关 |
| 网关 |
VPS /opt/anuma2api/ (Docker) |
OpenAI 兼容 API,账号池管理 |
| 代理 |
VPS anuma_proxy.py (systemd) |
Cloudflare cookie 共享 + 端点转换 |
# 非流式
curl -X POST http://YOUR_VPS_IP:7895/v1/chat/completions \
-H "Authorization: Bearer YOUR_GATEWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"kimi/kimi-k3","messages":[{"role":"user","content":"hello"}]}'
# 流式
curl -X POST http://YOUR_VPS_IP:7895/v1/chat/completions \
-H "Authorization: Bearer YOUR_GATEWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"kimi/kimi-k3","messages":[{"role":"user","content":"hi"}],"stream":true}'
# 工具调用
curl -X POST http://YOUR_VPS_IP:7895/v1/chat/completions \
-H "Authorization: Bearer YOUR_GATEWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"kimi/kimi-k3","messages":[{"role":"user","content":"Beijing weather?"}],"tools":[{"type":"function","function":{"name":"get_weather","description":"Get weather","parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]}'
cd /opt/anuma-register
DISPLAY=:99 TMPDIR=/root/anuma-tmp .venv/bin/python3 register.py --count 5
# 模型列表
curl -H "Authorization: Bearer YOUR_GATEWAY_TOKEN" http://YOUR_VPS_IP:7895/v1/models
# 账号统计
curl -H "Authorization: Bearer YOUR_GATEWAY_TOKEN" http://YOUR_VPS_IP:7895/api/stats
| 模型 |
提供商 |
| kimi/kimi-k3, kimi/kimi-k2.7-code, kimi/kimi-k2.6 |
Kimi |
| openai/gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5 |
OpenAI |
| anthropic/claude-fable-5-1, claude-opus-5, claude-sonnet-5 |
Anthropic |
| gemini/gemini-3.1-pro-preview, gemini-3.8-flash |
Gemini |
| qwen/qwen-3.7-plus |
Qwen |
| glm/glm-5.3, glm/glm-5.3-flash |
Zhipu |
| minimax/minimax-m3 |
MiniMax |
| grok/grok-4.6 |
Grok |
| inclusionai/ling-3.0-flash |
InclusionAI |
| 文件 |
位置 |
说明 |
.env |
/opt/anuma-register/.env |
注册机配置 |
hc.env |
/opt/anuma-register/hc.env |
hCaptcha 视觉模型配置 |
.env |
/opt/anuma2api/.env (VPS) |
网关配置 |
anuma_proxy.py |
/opt/anuma2api/anuma_proxy.py (VPS) |
代理脚本 |
anuma-proxy.service |
/etc/systemd/system/ (VPS) |
代理 systemd 服务 |
# 重启网关
ssh root@YOUR_VPS_IP "cd /opt/anuma2api && docker compose restart"
# 重启代理
ssh root@YOUR_VPS_IP "systemctl restart anuma-proxy"
# 查看日志
ssh root@YOUR_VPS_IP "docker logs -f anuma2api-gateway" # 网关
ssh root@YOUR_VPS_IP "journalctl -u anuma-proxy -f" # 代理
- 注册机: Python 3.13 + camoufox + hcaptcha-challenger + AgentV (视觉模型)
- 网关: Go + Docker + SQLite
- 代理: Python 3 + http.server + requests.Session
- 认证: Privy (密码less + JWT)
- 验证码: hCaptcha (注册) + Cloudflare Turnstile (聊天)
家云 /opt/anuma-register/
├── register.py # 注册脚本 (已修 bug)
├── .env # 注册机配置
├── hc.env # hCaptcha 视觉模型配置
├── accounts.json # 账号数据
├── accounts.csv # 账号 CSV
├── .venv/ # Python 虚拟环境
├── README.md # 本文件
├── DEPLOY.md # 部署文档
└── KNOWLEDGE.md # 知识库
VPS /opt/anuma2api/
├── gateway/ # Go 网关源码
├── docker-compose.yml # Docker 编排
├── .env # 网关配置
├── anuma_proxy.py # 代理脚本
└── gateway-data/ # SQLite 数据 (Docker volume)
- 部署日期: 2026-09-13
- 仓库版本: Sliverkiss/anuma2api (最新)
- 注册机: 已修复 3 个 bug (Cookiebot/OTP/邮箱提交)
- 代理: 自研 (cookie 共享 + 端点转换 + 工具调用)
- 状态: ✅ 全链路验证通过