Sub2API is an open-source relay gateway with 44,400+ stars on GitHub that turns Claude, OpenAI, Gemini and Grok subscriptions into unified, API-style endpoints.
Modern AI tools expect API keys, but much of the best-value capacity sits inside consumer subscriptions that were never designed to be called programmatically. Sub2API bridges that gap as a self-hosted relay service: connect subscription accounts once, and it exposes standard API endpoints that native tools — Claude Code, Codex and other API clients — can use unchanged. Its pooling design lets a small team share accounts in a managed way (the project’s community calls it carpooling), spreading subscription costs while per-user keys and usage accounting keep track of who consumed what. Quotas, account rotation and health handling are managed centrally instead of being hacked together per user. The project is written in Go, deploys with Docker, and is released under the LGPL-3.0 license; it is updated very actively, with releases landing in October 2026.
Sub2API is free and open source under the LGPL-3.0 license. You bring your own subscriptions; the relay itself costs nothing beyond the server you run it on.
Small teams and power users who hold AI subscriptions and want API-style access to them — with pooling, per-user keys and shared cost control instead of everyone buying separate API plans.