sub2api
SHA-256An open-source AI API gateway that unifies Claude, OpenAI, Gemini, and Grok subscriptions into a single API. Supports subscription sharing (car-pooling) to lower costs, with seamless integration into native coding tools. Go + Vue based, Docker-ready.
Smart Download
Download Download Version
v0.1.179 · 35.6 MB
Pool Claude, OpenAI, Gemini, and Grok subscriptions into one unified API gateway with cost-sharing and seamless native tool integration.
Core Features
- Multi-subscription aggregation: Connect Claude / OpenAI / Gemini / Grok subscriptions with unified OpenAI-compatible API output
- Car-pooling mechanism: Share one subscription across multiple users with quota-based cost allocation
- Native tool compatibility: Works out-of-the-box with Claude Code, Codex, Gemini CLI and other AI coding tools
- Self-hosted deployment: One-click Docker deployment with PostgreSQL + Redis production-grade architecture
- Web management dashboard: Vue 3 powered panel for member management, quota allocation, and usage analytics
What It Can't Do
- •Using this project may violate the terms of service of Anthropic and other upstream providers, leading to account bans at your own risk
- •For technical learning and research only; comply with local laws and regulations; commercial operation is strictly prohibited
- •No commercial authorization has been granted by the developers; watch out for paid services operating under the sub2api name
- •Read the disclaimer in the README carefully before deploying
Use Cases
- Team collaboration: Share one Claude subscription across a team through an internal API gateway with transparent cost allocation
- Solo developers: Unify multiple platform subscriptions into one API Key for seamless switching between AI coding tools
Detailed Introduction
Sub2API is an open-source AI API gateway platform that consolidates multiple AI subscription services — Claude, OpenAI, Gemini, and Grok — into one unified API endpoint. Its core innovation is subscription quota distribution and car-pooling: multiple users can share a single subscription, dramatically reducing per-user costs. Unlike traditional API relay projects like One API that focus mainly on token-based billing and key management, Sub2API natively handles OAuth-based subscription connections, making it ideal for sharing official subscriptions across a team. It works seamlessly with Claude Code, Codex, Gemini CLI, and other OpenAI-compatible clients, and offers both a managed website and self-hosted deployment via Docker. The stack includes Go 1.26, Vue 3, PostgreSQL 15+, and Redis 7+.
Tags
Getting Started
Download installer
Click the button above to download the installer for your system
Install the software
Double-click the downloaded installer and follow the prompts
Deploy with Docker Compose: create docker-compose.yml and configure PostgreSQL and Redis connection settings
Obtain the OAuth token from your official Claude / OpenAI / Gemini subscription
Add the subscription in the admin panel, set car-pooling quotas, and generate your own API Key
- Deploy with Docker Compose: create docker-compose.yml and configure PostgreSQL and Redis connection settings
- Obtain the OAuth token from your official Claude / OpenAI / Gemini subscription
- Add the subscription in the admin panel, set car-pooling quotas, and generate your own API Key
SHA-256 checksum verified
Checksum extracted from GitHub official Release page
SHA256 Checksum
ae6b2e7ae30d784e7d7cbda119bcbc0b70f8e9334570f958bb255dad453adc17This checksum is extracted from the GitHub Release page. Verify file integrity after download.
All SHA-256 checksums on this platform are extracted from the project's official GitHub Release page, without any modification. You can independently verify them on the GitHub Releases page.
Open Source Transparency
View GitHub SourceUninstall Info
For Docker deployments, run docker compose down to stop and remove containers. To fully clean data, remove related Docker volumes with docker volume rm. For source deployments, delete the source directory along with the corresponding PostgreSQL database and Redis data.
No Extra Dependencies
Ready to use after download. No additional runtime required.
Similar Projects
Visual Studio Code (Code - OSS)
A free, open-source code editor by Microsoft with rich extensions, debugging, and Git integration. The most popular developer tool worldwide.
opencode
OpenCode is a free, open-source AI coding agent that helps you write, refactor, and understand code. It offers two built-in modes: a full-access 'build' agent for active coding and a read-only 'plan' agent for safe exploration.
scrcpy
Display and control your Android device from your computer via USB or TCP/IP. No root required, high performance, low latency, supports audio and video mirroring.