Wei-Shaw /sub2api
Sub2API 一站式开源中转服务,让 Claude、Openai 、Gemini、Grok订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。
★ 46,060⑂ 9,971👁 91⑃ 4,352● 4,343▤ 65
+37
Daily
+355
Weekly
46,060
stars
9,971
forks
91
watchers
4,352
prs
4,343
issues
65
releases
README
Sub2API AI API Gateway Platform for Subscription Quota Distribution English | 中文 | 日本語 ⚠️ Important Notice Please read the following carefully before using this project: - 🚨 Terms of Service Risk: Using this project may violate the terms of service of Anthropic and other upstream providers. Please review the relevant providers' user agreements before use; all risks arising from such use are borne solely by the user. - ⚖️ Compliant Use: Use this project only in compliance with the laws and regulations of your country or region. Any unlawful use is strictly prohibited. - 📖 Disclaimer: This project is provided for technical learning and research purposes only. The authors assume no liability for account bans, service interruptions, data loss, or any other direct or indirect damages resulting from the use of this project. - 🚫 No Commercial Authorization: The developers of this project have never authorized any individual or organization to conduct any form of commercial operation based on this project. Any commercial activity conducted in the name of or based on this project is unrelated to this project and its developers, and all resulting disputes, losses, and legal liabilities shall be borne solely by the party conducting such activity. ❤️ Sponsors Want to appear here? Click to collapse WandAPI — an enterprise-grade, stable AI model API gateway built by a core contributor to this project. One API key gives you access to Claude, GPT, Gemini and other leading models, natively compatible with the OpenAI and Anthropic protocols, so Claude Code, Codex and your existing SDKs work by simply changing the Base URL. Real-time routing by latency and upstream health with millisecond-level automatic failover keeps requests online, backed by 99.99% service availability. Pay as you go, with per-request token and cost breakdowns. Free trial credits: sign up via this exclusive link to claim free trial credits. --- Thanks to CCTK.AI for sponsoring this project! CCTK.AI is an AI API gateway focused on stability and cost-effectiveness, offering fast relay services for Claude, OpenAI, Gemini, and other popular models. It works seamlessly with Claude Code, Codex, and other mainstream coding tools, delivering the same model capabilities at a fraction of the official cost. Register via this link for faster, more stable, and more affordable AI API access. One API, every top model! OpenModel is a production-grade, high-availability AI API gateway that makes your applications truly fast and stable: automatic failover, smart routing to the best-performing channel, and a production-grade SLA. An SLA that far surpasses any single provider — making stability your core competitive advantage. Works directly with Claude Code, Codex, and Gemini CLI. Register via this link to get started. Thanks to ETok.ai for sponsoring this project! ETok.ai is dedicated to building a one-stop AI programming tool service platform. We offer professional Claude
Top issues
#2738最近两天很容易502 timeout awaiting response headers,导致首token几百秒或者直接卡死141 comments · 2026-05-24#5992别查了!真别查了!别再查中转站了,我用了三年,1400块钱一月的正版pro,我用了三年,房子用没了,家人被我用垮了,现在好不容易有了便宜token,你们非说它是非法分发的token,那token好不好用,我们能不知道吗?那token才0.04倍率,token贩子根本没赚钱,谁家能不遇上个需要用codex的,你能保证你这一辈子不用token吗,你们把它查死了,我们都得等死,我想活着,我想用便宜token。81 comments · 2026-08-21#6739Our servers are currently overloaded. Please try again later.49 comments · 2026-09-07#4248首字 15 分钟, 真的受不了,不接中转站就好了, 是不是最近有 Bug?49 comments · 2026-07-14#5663为什么两个PRO账号,额度到达100% 为什么差距这么大的?44 comments · 2026-08-15#6825关于overloaded过载问题的新发现35 comments · 2026-09-08#5787178版本的pro额度新开账户还是仅有1400刀33 comments · 2026-08-18#4201偶尔首字很长时间33 comments · 2026-07-13
Latest release
Sub2API 0.2.21 v0.2.21 2026-11-11AI API Gateway Platform - 将 AI 订阅配额分发和管理 新增 Claude Fable 5.2 与 Mythos 5.2 支持;OpenAI 用量与计费区分 30m/12h 缓存写入 TTL,并根据实例内存上限自动设定请求体内存预算,减少高并发下误报 503 的情况。 新增功能 - 支持 Claude Fable 5.2 与 Mythos 5.2:包括模型目录、Anthropic 预设、Bedrock 映射、OpenCode 配置和兜底定价($8/$40 每百万 token,Fast 模式 2 倍) - OpenAI 缓存写入计费按 TTL 拆分:渠道、分组、账号统计价卡新增独立的 12h 缓存写入价(GPT-5.6 / GPT-6 系列未配置时默认按输入价 2.5 倍;已配置通用写入价的价卡不受影响),管理员用量详情按实际 TTL 展示 - Antigravity 账号用量单元格新增「查询」按钮,可跳过缓存强制刷新用量 - EasyPay 支付实例可单独配置退款成功码(默认 1,可选 0),兼容退款以 code=0 表示成功的易支付网关 优化改进 - 请求体内存预算未配置时,自动取进程内存上限的 1/4(取物理内存、cgroup 限制、GOMEMLIMIT 中的最小值),最低 1GiB - API 密钥列表不再等近 30 天用量统计返回才渲