← all repositories
Wei-Shaw/sub2api

The API middleman that turns one Claude sub into many

An open-source gateway for splitting AI subscriptions across teams without breaking native tools.

sub2api
Velocity · 7d
+151
★ / day
Trend
steady
star history

What it does Sub2API is a self-hosted API gateway that takes a single subscription to Claude, OpenAI, Gemini, or similar services and turns it into distributable API keys for multiple users. It handles authentication, token-level billing, rate limiting, and request forwarding so teams can share access without sharing credentials.

The interesting bit The project is essentially a commercial-grade quota-management layer built specifically for the “subscription sharing” use case — a problem most AI tools ignore. It even bakes in payments (Stripe, Alipay, WeChat Pay) so you can run it as a small business, not just an internal proxy.

Key highlights

  • Supports OAuth and API-key upstream accounts with sticky-session routing
  • Token-level usage tracking and per-user concurrency limits
  • Built-in payment system for self-service top-ups; no separate billing service needed
  • Admin dashboard with iframe embedding for external tools (ticketing, etc.)
  • Docker-ready stack: Go backend, Vue 3 frontend, PostgreSQL, Redis

Caveats

  • The README is heavy on sponsor listings and light on technical architecture or deployment complexity
  • Demo credentials are public and shared, so treat the live demo as a UI preview, not a security model
  • The project warns that third-party sites using the Sub2API name may be unaffiliated — verify what you’re actually deploying

Verdict Worth a look if you’re running an AI-tool reseller business or need to split expensive subscriptions across a team with actual billing. Overkill for a single developer who just wants to share one Claude key with a friend.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.