登录 注册
开发者工具
45,805
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
Go
语言
创建时间
最近更新

项目能做什么

一站式开源中转服务,统一接入 Claude、OpenAI、Gemini 等订阅并支持拼车共享。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<div align="center">

<img src="assets/logo.svg" alt="Sub2API Logo" width="128" />

# Sub2API

[![Go](https://img.shields.io/badge/Go-1.27.0-00ADD8.svg)](https://golang.org/)
[![Vue](https://img.shields.io/badge/Vue-3.4+-4FC08D.svg)](https://vuejs.org/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15+-336791.svg)](https://www.postgresql.org/)
[![Redis](https://img.shields.io/badge/Redis-7+-DC382D.svg)](https://redis.io/)
[![Docker](https://img.shields.io/badge/Docker-Ready-2496ED.svg)](https://www.docker.com/)

<a href="https://trendshift.io/repositories/21823" target="_blank"><img src="https://trendshift.io/api/badge/repositories/21823" alt="Wei-Shaw%2Fsub2api | Trendshift" width="250" height="55"/></a>

**AI API Gateway Platform for Subscription Quota Distribution**

English | [中文](README_CN.md) | [日本語](README_JA.md)

</div>

## ⚠️ 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?](mailto:support@sub2api.org)

<details open>
<summary>Click to collapse</summary>

<p align="center"><a href="https://wandapi.com/go/sub2api"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/partners/banners/wandapi-en-dark.svg"><img src="assets/partners/banners/wandapi-en.svg" alt="WandAPI" width="100%"></picture></a></p>

**[WandAPI](https://wandapi.com/go/sub2api)** — 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 breakdown
阅读完整原文

商业机会分析 AI 生成

拼车车头与中小团队专用的“多租户配额与计费管理”增值插件/管理端

产品构想基于开源核心,构建闭源/商业授权的高级多租户面板,提供基于 Token/次数的精细化计费、车位管理、账号健康度监控与自动轮询剔除封禁账号功能。
核心功能用户配额充值与限流系统、上游账号健康检查与自动失效剔除、多供应商(Claude/OpenAI/Grok)自动故障转移、原生客户端配置一键生成。
目标用户合租车头、小型工作室负责人、个人工作室运维者。
难度/周期中等 · 3 - 5 周 · 成本:服务器成本(< $50/月)、测试账号采购成本。
收费模式按面板实例 License 买断或月度订阅授权(如 $9.9 - $29/月)。
竞争风险各模型厂商风控算法频繁更新导致会话失效;LGPL-3.0 协议要求动态链接或保持核心解耦,需注意合规隔离。
依据 数据支持的判断

企业与团队私有化交付及防封合规网关定制服务

产品构想为中小型软件研发团队提供本地化/专有云部署与网络架构优化,结合住宅代理 IP 轮换方案,降低团队共享订阅时的封号风险。
核心功能企业内网环境私有化部署、团队 SSO/LDAP 集成、住宅 IP 池自动路由防风控网关、使用审计与数据留存。
目标用户预算有限但需要多人使用 Claude Code / Cursor 的中小外包团队、初创公司。
难度/周期中等 · 2 - 4 周 · 成本:代理 IP 采购与测试成本、实施人力成本。
收费模式一次性实施交付费($500 - $2000/次)+ 代理网络流量抽成/维护费。
竞争风险上游官方针对账号异常登录的封禁风险难以完全规避,交付后可能面临客户退款纠纷。
依据 AI推测

合规化转向:多模型统一兼容代理与智能路由 SDK(商业版)

产品构想去逆向化,将技术沉淀转向合规的商业 API 聚合网关,为开发者提供统一兼容 OpenAI 协议的多模型路由、故障转移与成本最优化中间件。
核心功能支持官方 API Key 的统一聚合网关、动态成本/延迟智能路由、本地 Prompt 缓存与降本分析模块、Go 语言高并发极低内存常驻客户端。
目标用户构建 AI Agent 的独立开发者、出海应用开发团队。
难度/周期高 · 6 - 8 周 · 成本:多模型官方 API 测试费用、全球节点测试服务器(< $100/月)。
收费模式开源轻量版 + 商业版(按节点计费)或开发者托管云网关。
竞争风险聚合 API 领域竞争激烈(如 One API、LiteLLM),需要打出极高并发或特定框架生态的差异化优势。
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
Mouseww/anything-analyzer 中文介绍暂未生成
全能协议分析工具:浏览器抓包 + MITM 代理 + 指纹伪装 + AI 分析 + MCP Server 无缝对接 AI
3,850 TypeScript
james-6-23/codex2api 中文介绍暂未生成
Codex2API 是一个基于 Go + Gin + React/Vite 的 Codex 反向代理与管理后台项目
2,350 Go
yukkcat/gemini-business2api 中文介绍暂未生成
OpenAI-compatible API for Gemini Business with multi-account
1,335 Python
zyycn/codex-proxy-rs 中文介绍暂未生成
基于 Rust 的低风控、高性能、自托管多账号透明代理网关
1,185 Rust
YangYuHou/qwen2API 中文介绍暂未生成
A project converting the Qwen web page to an API.
971 Go
zhizinan1997/jimeng-free-api-all 中文介绍暂未生成
🚀 即梦(Jimeng) 反代2api,支持 5.x/4.x 图像模型和视频生成,OpenAI 兼容,内置可视化管理控制
661 TypeScript
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 ,最近推送 ,发布过 64 个 Release
社区活跃Star 45,805 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/Wei-Shaw/sub2api.git
cd sub2api
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。