workflowstacks
claude-skill

Sub2api

Sub2API 一站式开源中转服务,让 Claude、Openai 、Gemini、Grok订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。
37,136 stars7,663 forksGoUpdated 8/15/2026100% free · open source
What it does

Sub2API is a one-stop open-source proxy service that allows unified access to Claude, Openai, Gemini, and Grok subscriptions, supporting cost-sharing and seamless native tool usage.

Install / run
go get github.com/Wei-Shaw/sub2api
When to use it
  • When you need to manage multiple AI subscriptions from different providers
  • When you want to reduce costs by sharing subscriptions with others
  • When you need a unified interface for different AI tools
Quick start
  1. 1Clone the repository: git clone https://github.com/Wei-Shaw/sub2api.git
  2. 2Build the project: go build main.go
  3. 3Configure the subscription settings in the config.json file
  4. 4Run the service: go run main.go
  5. 5Test the API using tools like curl or Postman
Ready-to-paste prompt
curl -X GET 'http://localhost:8080/api/claudereq?prompt=Hello+World&subscription_id=your_subscription_id'
Heads up: Make sure to replace 'your_subscription_id' with your actual subscription ID from the AI provider in the config.json file and when making API requests
Saves to your device

Topics

2api
antigravity2api
cc2api
claude
claude-code
codex
crs
crs2
gemini
How Sub2api works
Codeflow
Free to inspect

Sub2api is a very large Go project (~1M lines across 3240 code files, plus 243 test files). It is a full software project: use it through its install path rather than reading it end to end. Last commit this month, LGPL-3.0 license, has a test suite.

Size
Very large codebase
~1M lines · 3240 code files · days to read — use, don't read
Setup
Developer setup
A real software project. Use it via its install path; don't expect to read it all.
Runs on
Docker
No API keys detected
Go 74%Vue 16%TypeScript 10%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    backend/internal/setup/cli.go
    Inside backend/internal/ — the main logic begins here
What's in each folder
backend/internal/Core code — the actual logic2109 files
skills/Prompts, skills & agent definitions4 files
frontend/Frontend / UI777 files
backend/cmd/Command-line entry points11 files
docs/Documentation10 files
backend/ent/Folder331 files
backend/migrations/Folder280 files
deploy/Deployment / infrastructure31 files
READMEHas testsDocumentedCI checksDocker readyLGPL-3.0 licenseUpdated this month
Quick Actions
Details
Creator
Wei-Shaw
Language
Go
Category
claude-skill
Published
12/18/2025

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.