aimod-cc /Agent2API
Local AI routing gateway with Agent client takeover — reuse existing client logins, call 50+ AI clients through one base URL, with unified OpenAI / Anthropic / Images APIs, multi-account routing, check-in, balance and request reports · 本地 AI 路由网关 + Agent 客户端接管:复用各家客户端登录态,一个 base_url 调用 50+ 家模型额度,统一 OpenAI / Anthropic / 生图接口,多账号选路、签到、余额与请求报表一体管理
★ 2,361⑂ 630👁 3⑃ 122● 459▤ 58
+47
Daily
2,361
stars
630
forks
3
watchers
122
prs
459
issues
58
releases
README
Agent2API An AI routing gateway with Agent client takeover, unifying model APIs and local client configuration English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Português (BR) ✨ Key Features • 💬 Community & Support • 🚀 Quick Start • 📦 Installation & deployment • 📸 Screenshots • 🔧 Development & Build • 📜 Usage Notice --- Agent2API is an AI routing gateway with Agent client takeover. It exposes a unified model API for custom AI providers and centralizes account routing, model mapping, gateway keys and request reports. It also manages local Agent clients' connection profiles, including importing, switching and previewing configuration changes. ✨ Key Features - 🔌 Unified model APIs — OpenAI Chat / Responses / Images and Anthropic Messages, with a unified model catalog; Raccoon, Loomy, Antigravity, ModelScope, WorkBuddy and Doubao Work supply image generation, while Raccoon, Loomy, Antigravity, ModelScope and WorkBuddy also support reference-image editing. Both are available as AI assistant tools - 🧭 AI routing — model mapping, account priority, load balancing, session affinity and failover in one place - 🤖 Agent client takeover — manage multiple connection profiles for local clients, import existing settings, preview writes and switch between the gateway and custom services - 🧩 Plugin extensions — additional provider implementations are installed and updated separately, not bundled with the application; custom providers do not require them - 🛡️ Egress proxies — select proxy-pool exits for accounts and update tasks - 🔑 Gateway security — scoped gateway keys, optional human verification for panel sign-in, and model requests refused by default until a key is configured - 📊 Request reports — request volume, success rate, token usage, cache hit rate and a 365-day heatmap - ⏰ Background maintenance — model catalog refresh, credential maintenance and software update checks; daily check-in runs per provider on that provider's own window (Qoder 10:01, ZCode 19:01, others follow the schedule time), plus a catch-up round that only touches accounts not yet checked in; additional provider-specific tasks are supplied by plugins - 🖥️ Three deployment forms — Windows / macOS / Linux desktop apps, headless Windows / Linux servers and Docker (amd64 / arm64); no Node runtime required, with a six-language interface ❤️ Sponsors Thanks to ProxyLane for sponsoring this project! ProxyLane provides native static residential ISP proxies for AI accounts (Static Residential ISP): IPs come from real home broadband operators with low Scamalytics fraud scores, each IP is dedicated to you, with unlimited traffic, from $3.90. Add one exit per account on the Network proxy page. Use code AGENT2API25 for 25% off your first purchase. 💬 Community & Support - QQ groups: Agent2API chat groups — group 1 (1127656296) and group 2 (1130894674) are almost full, please join group 3 (1108276647); search the number in QQ to join. - Telegram group: - 💖 Donate: if Agent2API helps y
Top issues
#405[Bug] accio调用失败3 comments · 2026-10-30#371[提供商] 超级麦吉接入3 comments · 2026-10-27#562[Bug] Codex中workbuddy模型显示“上游返回 400: Illegal API invocation from an unapproved channel”2 comments · 2026-11-10#244[提供商] ima2 comments · 2026-10-14#582[Bug] 豆包工作:网关转发一律 429 rate limited(upstream_code 710022004),同 Cookie 同出口 IP 下浏览器端正常;疑似 aid / 客户端版本仍是旧值1 comments · 2026-11-14#581[Bug] Loomy直接黑号了,就剩两个原生模型了1 comments · 2026-11-14#579[Bug] AStudio:签到只调 init-app、不走领取,每日 100 积分永远「未观测到新增积分」1 comments · 2026-11-14#578[Bug] AStudio:登录成功但转发 401「Please upgrade to the latest version of AStudio」,疑似 studioVersion 硬编码 3.5.1 过期1 comments · 2026-11-14
Latest release
v3.4.2 v3.4.2 2026-11-051. 新增:自定义路由组,可将不同提供商、不同模型组合成一个对外模型 ID,配置参与成员、账号顺序与失败后备选。 2. 优化:路由配置恢复“配置列表、当前配置、账号组”的三栏画布布局,默认打开路由配置;配置卡片垂直居中,外层内边距统一为 10px,精简创建弹窗和冗余说明。 3. 优化:模型筛选支持搜索,默认“全部”展示现有账号,选择具体模型后只展示对应账号组;移除配置卡片中的选路预演区域。 4. 优化:请求回放改为简洁列表与执行时间线,按请求当时的快照展示尝试、切换和跳过原因,区分响应到达与首帧时间。 5. 优化:全局默认直接管理账号启用与禁用,与账号页同步并即时生效;其他路由仍独立控制参与名单。旧版全局参与设置转换前列出受影响账号并要求确认。 6. 优化:恢复账号积分到期倒计时、到期近远排序快捷入口,以及整组和单账号设置按钮;消耗规则修改后同步刷新顺序,保留独立路由顺序和未保存的其他修改。 7. 新增:压缩路由,可为 ZCode 上下文压缩请求指定模型,普通对话仍使用原模型。 8. 新增:客户端识别,支持内置规则、自定义规则和来源声明,并在请求记录与报表中展示识别信息。 9. 新增:标准 Windows 服务与 systemd 部署支持面板一键更新,下载后独立校验、备份替换并确认新版启动;安装脚本兼容旧安装接入并保留已有配置。 10. 新增:MonkeyCode 国内版、国际版桌