Sub2API

Sub2API

★ 4.4 🔖 7000 saves 💰 Free GitHub

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.

Overview

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.

Key Features

  • Subscription-to-API relay – expose Claude, OpenAI, Gemini and Grok subscriptions as standard API endpoints.
  • Account pooling – share accounts across a small team with managed rotation.
  • Works with native tools – Claude Code, Codex and other API clients connect without modification.
  • Per-user keys and accounting – issue individual keys and track usage per person.
  • Quota and cost sharing – split subscription capacity fairly instead of buying duplicate API credits.
  • Self-hosted in Go – a single Docker deployment keeps account data on your own server.
  • Actively maintained – frequent releases tracking changes in the upstream subscription services.

💳 Pricing

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.

Who Is It For

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.

🚀 Visit Sub2API Official Site

🚩 Report an issue