Sub2API Lets Teams Share Claude and OpenAI Subscriptions Like Carpooling
A Go-based open source relay platform pools Claude, OpenAI, Gemini, and Grok subscriptions behind one endpoint with billing, sticky sessions, and cost sharing.
PRO- Sub2API is a Go-based open source API gateway unifying Claude, OpenAI, Gemini, Grok, and Antigravity subscriptions behind one endpoint
- Repo sits near 38K stars with 7.1K forks and an active sponsor ecosystem of downstream relay services
- Ships sticky sessions, token-level billing, concurrency limits, and built-in Alipay, WeChat, EasyPay, and Stripe payments
- Deploys via one-line install script, Docker Compose, Apple container on macOS 26, or source build
- Uses PostgreSQL 15 and Redis 7, with Simple Mode for solo developers via
RUN_MODE=simple - Authors warn usage may violate upstream provider terms of service and grant no commercial authorization
An open source project called Sub2API has quietly become one of the most-starred AI infrastructure repos on GitHub, sitting at roughly 38K stars and 7.1K forks. It packages a full self-hostable gateway that turns a handful of consumer AI subscriptions into a single OpenAI-compatible endpoint that teams can share, meter, and bill against.
With tools like Claude Code and GitHub Copilot in daily rotation, developers end up paying for multiple AI subscriptions such as Claude Pro or OpenAI Plus, each with its own usage limits and idle quotas. There is no clean way to consolidate those scattered resources and distribute costs across tools and users. Sub2API fills that gap with what its Chinese community calls 拼车, or carpooling, for API access.
What actually ships
Sub2API is a Go 1.25 backend paired with a Vue 3 frontend, sitting on PostgreSQL 15 and Redis 7. Users authenticate against the platform, and the platform routes their calls to whichever upstream account has capacity. It handles authentication, quota allocation, billing logic, load balancing, and request forwarding, unifying access to Claude, OpenAI, Gemini, and related services through a centralized relay layer.
The core features go well past a dumb reverse proxy:
- Multi-account pooling across OAuth subscription accounts and raw API keys for Claude, OpenAI, Gemini, Grok, and Antigravity
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.