Primary question: Are you willing to accept upstream terms-of-service and account-ban risk in exchange for shared subscription quota behind a single self-hosted endpoint?
RepoDaily adoption score
RepoDaily rates this as 87/100 (strong) for adoption: evidence, installation path, production risk, differentiation, license clarity, and AI/agent fit are scored from the article sources and adoption notes.
5 source(s) across 4 source category/categories, plus a RepoDaily-specific evidence module when available.
5 workflow step(s), 4 next-action step(s), and 3 command/install signal(s) were detected.
Trending momentum is +264 stars, with maintenance/release/issue signals counted when present.
Risk is marked high, with 4 security note(s) and 4 explicit skip condition(s).
3 opportunity lens item(s), 4 alternative(s), and 3 type-specific section(s) support differentiation.
License source or license wording is present.
7 AI/agent-related signal(s) were detected in the article text and metadata.
Project overview
Sub2API calls itself an "AI API Gateway Platform for Subscription Quota Distribution." The Chinese repository description makes the pitch concrete: unify Claude, OpenAI, Gemini, and Grok subscriptions behind one access point, support 拼车-style shared use so a group can split the cost, and keep native tools working without friction. The backend is Go (README badge pins Go 1.26.5) with a Vue 3.4+ admin frontend, and the project targets a very specific pain: per-seat AI subscriptions strand quota on light users while heavy users hit caps mid-task.
On 2026-08-23 the repository ranked 17th on the daily trend list with 264 stars in the measurement window, and the README embeds a Trendshift badge (repository 21823) tracking momentum. The topic list — 2api, cc2api, antigravity2api, crs, crs2, claude-code, codex, gemini — maps almost one-to-one onto converter-style tooling for specific coding assistants. That tells you who this is for: developers already living inside Claude Code and Codex who want their paid subscriptions exposed as an API endpoint they control.
The engineering is disciplined. Beyond the Go/Vue/PostgreSQL/Redis badges, the Dockerfile is a three-stage build: node:24-alpine with pnpm@9 pinned "to match CI and keep builds reproducible" compiles the frontend; golang:1.26.6-alpine cross-compiles a CGO_ENABLED=0 binary; the final image is alpine:3.21. The built frontend is embedded into the Go binary at internal/web/dist behind the embed build tag, so one process serves both API and admin UI. Release engineering is deliberate too: version info resolves through a defined precedence — VERSION build argument, then exact git tag, then cmd/server/VERSION — via scripts/resolve-version.sh.
What sets this repository apart is how blunt the governance section is. The README opens with an "Important Notice" stating that using the project may violate the terms of service of Anthropic and other upstream providers, that it is provided for technical learning and research, that the developers have never authorized any commercial operation based on it, and that account bans, service interruptions, and data loss are the user's risk alone. The code is licensed under GNU LGPL-3.0. Those two facts — solid build engineering and candid legal warnings — frame every decision about this project.
Why it is trending now
- 264 stars in the daily window and rank 17 on 2026-08-23, with a Trendshift badge (repository 21823) embedded in the README.
- It attacks subscription cost directly: pool Claude, OpenAI, Gemini, and Grok quota so a group splits one bill instead of buying per-seat plans.
- Topic tags cc2api, antigravity2api, crs, crs2, codex, and claude-code tie it to the subscription-to-API converter niche around specific coding tools.
- Trilingual documentation — README.md, README_CN.md, and README_JA.md — extends reach beyond the English-reading market.
- A sponsor row (CCTK.AI, OpenModel, ETok.ai) shows commercial relay services paying to reach this project's audience.
Problem it solves
- Per-seat AI subscriptions strand unused quota on light users while heavy users hit rate caps mid-task.
- Native clients such as Claude Code and Codex bind to a specific account; informal sharing means passing credentials around by hand.
- Commercial relays charge again for model capability a group has already paid for through subscriptions.
- Small groups lack a self-hosted middle layer that meters shared quota without handing credentials to a third party.
How it works
- Self-host the platform: a Go 1.26.5 backend with an embedded Vue 3.4+ admin frontend, backed by PostgreSQL 15+ and Redis 7+ as required services (README badges).
- Register upstream subscription accounts (Claude, OpenAI, Gemini, Grok) in the gateway, which presents a unified API surface per the repository description.
- Group members draw from the pooled quota through issued API access — the 拼车 (car-pool) sharing model — so subscription cost is split across the group.
- Point native tools such as Claude Code or Codex at the gateway so members keep using them without individual account logins (描述中的“原生工具无缝使用”).
- Admins operate a compliance surface built into the product: the Dockerfile shows LegalDocumentView.vue importing docs/legal/*.md at build time, compiling legal documents into the admin UI.
Product demo and interface preview


Architecture read: what the three-stage Dockerfile reveals
Stage one runs on node:24-alpine and activates pnpm@9 through corepack, pinned specifically "to match CI and keep builds reproducible." Dependencies install from frontend/package.json and frontend/pnpm-lock.yaml with --frozen-lockfile, then the Vue app builds. One telling detail: the Dockerfile comments that LegalDocumentView.vue — described as the admin-compliance gate — imports docs/legal/*.md?raw at build time, so the docs/legal directory must sit beside frontend/ inside the image. Legal text is a compiled-in artifact, not an afterthought.
Stage two runs the Go toolchain on golang:1.26.6-alpine, copies backend/go.mod and backend/go.sum first for layer caching, and cross-compiles with CGO_ENABLED=0, taking GOOS/GOARCH from buildx. The binary is built with -tags embed and stripped with -ldflags="-s -w", and the frontend dist from stage one is copied into internal/web/dist. Stage three lands on alpine:3.21. The file also declares GOPROXY=https://goproxy.cn and GOSUMDB=sum.golang.google.cn as default build arguments — mirrors that make builds deterministic from mainland China — plus a POSTGRES_IMAGE=postgres:18-alpine argument for the database side.
Deployment notes: the stack you must bring
- Backend Go 1.26.5 and frontend Vue 3.4+ per the README badges.
- PostgreSQL 15+ and Redis 7+ are required external services, not bundled.
- Docker is the packaging path ("Docker Ready" badge; the multi-stage Dockerfile is in the repo root).
- The frontend ships inside the Go binary (internal/web/dist, embed tag), so no separate static-file host is needed.
- Version string precedence is explicit: VERSION build argument > exact git tag > cmd/server/VERSION, resolved by scripts/resolve-version.sh.
- Default GOPROXY (goproxy.cn) and GOSUMDB (sum.golang.google.cn) build arguments favor reproducible builds from mainland China networks.
Maintenance and legal risk read
- The README's Important Notice names Anthropic and other upstream providers whose terms may be violated by using the project.
- The developers state they have never authorized any commercial operation based on the project; disputes and losses fall on the operator.
- The disclaimer explicitly covers account bans, service interruptions, and data loss as user-borne risks.
- LGPL-3.0 Section 4 permits combined works under terms of your choice only with prominent notice of Library use, accompanying license copies, and preserved modification/reverse-engineering rights for Library portions.
- Version-resolution machinery (build arg > git tag > cmd/server/VERSION) indicates a CI-driven release process rather than ad-hoc builds.
Who should pay attention?
Good fit if
- Small groups already paying for Claude, OpenAI, Gemini, or Grok subscriptions who want to pool quota and split one bill.
- Self-hosters comfortable running Go plus PostgreSQL 15+ and Redis 7+ behind Docker.
- Claude Code and Codex users who want a single endpoint instead of per-member account logins.
- Researchers studying gateway design: the README frames the project as being for technical learning and research, under LGPL-3.0.
Skip for now if
- Anyone whose upstream provider terms forbid account or API sharing — the README itself flags possible violations of Anthropic's and other providers' agreements.
- Commercial operators: the developers explicitly grant no commercial authorization for this project.
- Groups needing vendor accountability — the disclaimer disclaims liability for bans, interruptions, and data loss.
- Anyone unwilling to operate their own PostgreSQL and Redis instances.
Risks and cautions
The project's own documentation is the strongest risk statement available: it warns that use may breach Anthropic's and other upstream providers' terms, disclaims all liability, and denies commercial authorization.
- The README's Important Notice states using the project "may violate the terms of service of Anthropic and other upstream providers."
- The disclaimer assigns account bans, service interruptions, and data loss entirely to the user.
- The developers state they have never authorized any commercial operation based on the project.
- Pooling concentrates blast radius: one upstream ban on a shared subscription can cut off the entire group at once.
- The source pack contains no security-audit or disclosure-policy document, so plan your own review before trusting the gateway with live credentials.
- The gateway necessarily stores upstream subscription credentials for multiple providers, which makes hardening the PostgreSQL 15+ and Redis 7+ instances critical.
- The build produces a CGO_ENABLED=0 static binary in a minimal alpine:3.21 final stage, shrinking the runtime surface compared with full-OS images.
- An admin-compliance gate (LegalDocumentView.vue) renders docs/legal/*.md inside the admin UI, showing legal documents are surfaced to operators rather than buried in the repo.
Alternatives to compare
| Approach | When to use | Trade-off |
|---|---|---|
LiteLLM (Proxy) | You want one OpenAI-format endpoint across many providers with keys and budgets, without subscription pooling. | Open-source, self-hosted; you pay upstream usage. |
one-api | You want a long-established self-hosted relay management panel for token-style accounts. | Open-source, self-hosted; you pay upstream usage. |
OpenRouter | You prefer a hosted model catalog with per-token billing and no self-hosting at all. | Pay-per-token; no self-hosting. |
Sponsored relays (CCTK.AI, OpenModel, ETok.ai) | You want managed relay access to Claude, OpenAI, and Gemini models compatible with Claude Code and Codex, as advertised in the README's sponsor section. | Paid plans; affiliate registration links in the README. |
What this trend reveals
Quota pooling for small studios
A three-to-ten person group paying for separate Claude, OpenAI, Gemini, and Grok seats can consolidate into pooled access where heavy users absorb idle quota.
Read your provider's user agreement first — the README puts terms-of-service risk entirely on the user — then run one subscription through the gateway before adding members.
Subscription spend consolidation
The gateway gives a single place where pooled consumption lands in the PostgreSQL 15+ database the stack already requires, making one shared bill auditable.
Run a two-week pilot with one subscription and compare per-seat invoices against pooled consumption recorded in the gateway.
Compliance-first internal relay
Because LegalDocumentView.vue compiles docs/legal/*.md into the admin UI, legal review can ship as part of the build rather than as a separate wiki page.
Have counsel review the docs/legal directory and the upstream terms before enabling any shared account, and record sign-off in those same documents.
RepoDaily verdict
Technically credible and unusually honest: a three-stage Docker build, trilingual docs, and an LGPL-3.0 license wrapped around a use case the README itself says may breach upstream terms. Adopt it only if you have read those terms and accept account-ban risk; otherwise treat it as a reference design for self-hosted gateway engineering.