Wei-Shaw/sub2apiPublic

Sub2API 一站式开源中转服务,让 Claude、Openai 、Gemini、Grok订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

AI summary: An AI API gateway platform that unifies subscriptions and enables quota distribution and sharing.

Stars
43.3K
+105 today
Forks
9.3K
Watchers
90
Open issues
2.6K
Open PRs
857
Contributors
~464
Commits
7.2K
Branches
38

GoLGPL-3.0Created Dec 18, 2025Last push todayLatest release v0.2.8+496 stars this week+2.9K this month

Quick answers

What is sub2api?
An AI API gateway platform that unifies subscriptions and enables quota distribution and sharing.
What does sub2api do?
Sub2API serves as a centralized gateway for managing multiple AI provider subscriptions, including Anthropic, OpenAI, Gemini, and Grok. It converts direct subscription access into standard API endpoints, allowing users to integrate these powerful models seamlessly into native tools and applications. The platform introduces a quota distribution system designed to facilitate subscription sharing and cost splitting among multiple users. By pooling resources, it maximizes the utility of premium AI subscriptions while providing a unified, standardized interface for developers. It effectively lowers the barrier to accessing top-tier models by enabling efficient, shared consumption.
Who is sub2api for?
Geared towards developers, small teams, and AI enthusiasts looking to optimize the costs of premium AI subscriptions through secure, organized sharing and unified API access. Users are expected to have a basic understanding of the relevant underlying technologies.
How do I get started with sub2api?
docker-compose up -d
How popular is sub2api on GitHub?
Wei-Shaw/sub2api has 43,277 stars and 9,261 forks on GitHub, and gained 496 stars in the last 7 days.
What license does sub2api use?
Wei-Shaw/sub2api is released under the LGPL-3.0 license.

Star history

since Aug 23, 2026
020K40KAug 2026Sep 2026Sep 2026Oct 2026
43.3K stars as of Oct 4, 2026. Measured daily since Aug 23, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
SepOctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-09-27: 0 commits2025-09-28: 0 commits2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 0 commits2025-10-02: 0 commits2025-10-03: 0 commits2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 27 commits2025-12-19: 20 commits2025-12-20: 16 commits2025-12-21: 1 commit2025-12-22: 1 commit2025-12-23: 17 commits2025-12-24: 17 commits2025-12-25: 46 commits2025-12-26: 16 commits2025-12-27: 34 commits2025-12-28: 27 commits2025-12-29: 52 commits2025-12-30: 26 commits2025-12-31: 38 commits2026-01-01: 32 commits2026-01-02: 15 commits2026-01-03: 26 commits2026-01-04: 56 commits2026-01-05: 35 commits2026-01-06: 19 commits2026-01-07: 7 commits2026-01-08: 14 commits2026-01-09: 41 commits2026-01-10: 28 commits2026-01-11: 49 commits2026-01-12: 49 commits2026-01-13: 8 commits2026-01-14: 44 commits2026-01-15: 34 commits2026-01-16: 32 commits2026-01-17: 25 commits2026-01-18: 17 commits2026-01-19: 27 commits2026-01-20: 22 commits2026-01-21: 7 commits2026-01-22: 2 commits2026-01-23: 11 commits2026-01-24: 8 commits2026-01-25: 3 commits2026-01-26: 9 commits2026-01-27: 7 commits2026-01-28: 5 commits2026-01-29: 15 commits2026-01-30: 6 commits2026-01-31: 7 commits2026-02-01: 4 commits2026-02-02: 16 commits2026-02-03: 30 commits2026-02-04: 7 commits2026-02-05: 18 commits2026-02-06: 22 commits2026-02-07: 52 commits2026-02-08: 17 commits2026-02-09: 34 commits2026-02-10: 18 commits2026-02-11: 10 commits2026-02-12: 27 commits2026-02-13: 11 commits2026-02-14: 17 commits2026-02-15: 0 commits2026-02-16: 1 commit2026-02-17: 2 commits2026-02-18: 3 commits2026-02-19: 10 commits2026-02-20: 3 commits2026-02-21: 5 commits2026-02-22: 11 commits2026-02-23: 7 commits2026-02-24: 37 commits2026-02-25: 16 commits2026-02-26: 13 commits2026-02-27: 6 commits2026-02-28: 32 commits2026-03-01: 20 commits2026-03-02: 7 commits2026-03-03: 23 commits2026-03-04: 16 commits2026-03-05: 25 commits2026-03-06: 33 commits2026-03-07: 30 commits2026-03-08: 17 commits2026-03-09: 20 commits2026-03-10: 10 commits2026-03-11: 18 commits2026-03-12: 20 commits2026-03-13: 15 commits2026-03-14: 22 commits2026-03-15: 23 commits2026-03-16: 29 commits2026-03-17: 20 commits2026-03-18: 19 commits2026-03-19: 13 commits2026-03-20: 8 commits2026-03-21: 22 commits2026-03-22: 2 commits2026-03-23: 14 commits2026-03-24: 15 commits2026-03-25: 5 commits2026-03-26: 2 commits2026-03-27: 11 commits2026-03-28: 5 commits2026-03-29: 3 commits2026-03-30: 31 commits2026-03-31: 19 commits2026-04-01: 22 commits2026-04-02: 27 commits2026-04-03: 5 commits2026-04-04: 6 commits2026-04-05: 31 commits2026-04-06: 1 commit2026-04-07: 9 commits2026-04-08: 9 commits2026-04-09: 20 commits2026-04-10: 11 commits2026-04-11: 18 commits2026-04-12: 26 commits2026-04-13: 38 commits2026-04-14: 25 commits2026-04-15: 18 commits2026-04-16: 8 commits2026-04-17: 9 commits2026-04-18: 3 commits2026-04-19: 6 commits2026-04-20: 45 commits2026-04-21: 112 commits2026-04-22: 49 commits2026-04-23: 27 commits2026-04-24: 18 commits2026-04-25: 20 commits2026-04-26: 8 commits2026-04-27: 12 commits2026-04-28: 7 commits2026-04-29: 13 commits2026-04-30: 11 commits2026-05-01: 1 commit2026-05-02: 7 commits2026-05-03: 11 commits2026-05-04: 4 commits2026-05-05: 7 commits2026-05-06: 6 commits2026-05-07: 15 commits2026-05-08: 7 commits2026-05-09: 4 commits2026-05-10: 1 commit2026-05-11: 13 commits2026-05-12: 9 commits2026-05-13: 2 commits2026-05-14: 11 commits2026-05-15: 10 commits2026-05-16: 5 commits2026-05-17: 6 commits2026-05-18: 20 commits2026-05-19: 33 commits2026-05-20: 39 commits2026-05-21: 12 commits2026-05-22: 4 commits2026-05-23: 6 commits2026-05-24: 3 commits2026-05-25: 5 commits2026-05-26: 18 commits2026-05-27: 10 commits2026-05-28: 12 commits2026-05-29: 19 commits2026-05-30: 7 commits2026-05-31: 10 commits2026-06-01: 9 commits2026-06-02: 6 commits2026-06-03: 11 commits2026-06-04: 8 commits2026-06-05: 8 commits2026-06-06: 14 commits2026-06-07: 8 commits2026-06-08: 7 commits2026-06-09: 11 commits2026-06-10: 10 commits2026-06-11: 6 commits2026-06-12: 17 commits2026-06-13: 2 commits2026-06-14: 4 commits2026-06-15: 3 commits2026-06-16: 21 commits2026-06-17: 5 commits2026-06-18: 10 commits2026-06-19: 7 commits2026-06-20: 1 commit2026-06-21: 4 commits2026-06-22: 6 commits2026-06-23: 10 commits2026-06-24: 5 commits2026-06-25: 9 commits2026-06-26: 15 commits2026-06-27: 4 commits2026-06-28: 3 commits2026-06-29: 4 commits2026-06-30: 18 commits2026-07-01: 41 commits2026-07-02: 17 commits2026-07-03: 13 commits2026-07-04: 11 commits2026-07-05: 8 commits2026-07-06: 37 commits2026-07-07: 54 commits2026-07-08: 11 commits2026-07-09: 28 commits2026-07-10: 41 commits2026-07-11: 15 commits2026-07-12: 14 commits2026-07-13: 43 commits2026-07-14: 60 commits2026-07-15: 76 commits2026-07-16: 33 commits2026-07-17: 33 commits2026-07-18: 25 commits2026-07-19: 50 commits2026-07-20: 43 commits2026-07-21: 15 commits2026-07-22: 14 commits2026-07-23: 23 commits2026-07-24: 12 commits2026-07-25: 22 commits2026-07-26: 24 commits2026-07-27: 19 commits2026-07-28: 13 commits2026-07-29: 17 commits2026-07-30: 13 commits2026-07-31: 22 commits2026-08-01: 13 commits2026-08-02: 9 commits2026-08-03: 12 commits2026-08-04: 11 commits2026-08-05: 6 commits2026-08-06: 10 commits2026-08-07: 89 commits2026-08-08: 43 commits2026-08-09: 7 commits2026-08-10: 11 commits2026-08-11: 15 commits2026-08-12: 9 commits2026-08-13: 21 commits2026-08-14: 12 commits2026-08-15: 14 commits2026-08-16: 7 commits2026-08-17: 22 commits2026-08-18: 35 commits2026-08-19: 38 commits2026-08-20: 49 commits2026-08-21: 16 commits2026-08-22: 17 commits2026-08-23: 33 commits2026-08-24: 29 commits2026-08-25: 25 commits2026-08-26: 12 commits2026-08-27: 12 commits2026-08-28: 17 commits2026-08-29: 13 commits2026-08-30: 28 commits2026-08-31: 21 commits2026-09-01: 24 commits2026-09-02: 22 commits2026-09-03: 14 commits2026-09-04: 14 commits2026-09-05: 34 commits2026-09-06: 16 commits2026-09-07: 30 commits2026-09-08: 27 commits2026-09-09: 19 commits2026-09-10: 18 commits2026-09-11: 33 commits2026-09-12: 23 commits2026-09-13: 15 commits2026-09-14: 7 commits2026-09-15: 17 commits2026-09-16: 12 commits2026-09-17: 16 commits2026-09-18: 17 commits2026-09-19: 24 commits2026-09-20: 23 commits2026-09-21: 7 commits2026-09-22: 21 commits2026-09-23: 13 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits
5,070 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    43,277 stars

  • Very active

    5,070 commits in 52 weeks

  • Community-driven

    ~464 contributors

  • Continuous integration

    Automated checks passing

What sub2api does

Sub2API serves as a centralized gateway for managing multiple AI provider subscriptions, including Anthropic, OpenAI, Gemini, and Grok. It converts direct subscription access into standard API endpoints, allowing users to integrate these powerful models seamlessly into native tools and applications. The platform introduces a quota distribution system designed to facilitate subscription sharing and cost splitting among multiple users. By pooling resources, it maximizes the utility of premium AI subscriptions while providing a unified, standardized interface for developers. It effectively lowers the barrier to accessing top-tier models by enabling efficient, shared consumption.

Geared towards developers, small teams, and AI enthusiasts looking to optimize the costs of premium AI subscriptions through secure, organized sharing and unified API access. Users are expected to have a basic understanding of the relevant underlying technologies.

  • Unified API gateway: Standardizes access to various AI providers into a single, cohesive API interface.
  • Subscription pooling: Allows multiple users to share a single premium AI subscription to significantly reduce individual costs.
  • Quota management system: Distributes and tracks API usage across different users to ensure fair access and prevent abuse.
  • Native tool integration: Enables direct connection to existing AI-powered developer tools without requiring custom adapters.
  • Multi-provider support: Connects simultaneously to Anthropic, OpenAI, Gemini, and Grok through a centralized hub.

Where teams use it

Cost-sharing communities

Small teams or developer communities pooling funds to share the cost of expensive premium AI subscriptions.

Unified tool integration

Developers pointing their local AI coding assistants to a single endpoint that routes to multiple underlying providers.

Subscription management

Centralizing the billing and API key management for various AI services into one manageable dashboard.

Quota distribution

Allocating specific usage limits to different team members sharing a single corporate AI account.

Getting started: docker-compose up -d

README

main branch
Sub2API Logo

Sub2API

Go Vue PostgreSQL Redis Docker

Wei-Shaw%2Fsub2api | Trendshift

AI API Gateway Platform for Subscription Quota Distribution

English | 中文 | 日本語

⚠️ Important Notice

Please read the following carefully before using this project:

  • 🚨 Terms of Service Risk: Using this project may violate the terms of service of Anthropic and other upstream providers. Please review the relevant providers' user agreements before use; all risks arising from such use are borne solely by the user.
  • ⚖️ Compliant Use: Use this project only in compliance with the laws and regulations of your country or region. Any unlawful use is strictly prohibited.
  • 📖 Disclaimer: This project is provided for technical learning and research purposes only. The authors assume no liability for account bans, service interruptions, data loss, or any other direct or indirect damages resulting from the use of this project.
  • 🚫 No Commercial Authorization: The developers of this project have never authorized any individual or organization to conduct any form of commercial operation based on this project. Any commercial activity conducted in the name of or based on this project is unrelated to this project and its developers, and all resulting disputes, losses, and legal liabilities shall be borne solely by the party conducting such activity.

❤️ Sponsors

Want to appear here?

CCTK.AI Thanks to CCTK.AI for sponsoring this project! CCTK.AI is an AI API gateway focused on stability and cost-effectiveness, offering fast relay services for Claude, OpenAI, Gemini, and other popular models. It works seamlessly with Claude Code, Codex, and other mainstream coding tools, delivering the same model capabilities at a fraction of the official cost. Register via this link for faster, more stable, and more affordable AI API access.
openmodel One API, every top model! OpenModel is a production-grade, high-availability AI API gateway that makes your applications truly fast and stable: automatic failover, smart routing to the best-performing channel, and a production-grade SLA. An SLA that far surpasses any single provider — making stability your core competitive advantage. Works directly with Claude Code, Codex, and Gemini CLI. Register via this link to get started.
ETok Thanks to ETok.ai for sponsoring this project! ETok.ai is dedicated to building a one-stop AI programming tool service platform. We offer professional Claude Code packages and technical community services, with support for Google Gemini and OpenAI Codex. Through carefully designed plans and a professional tech community, we provide developers with reliable service guarantees and continuous technical support, making AI-assisted programming a true productivity tool. Click here to register!
APIKEY.FUN Thanks to APIKEY.FUN for sponsoring this project! APIKEY.FUN is one of the core contributors to the sub2api open-source project, dedicated to providing open, stable, and cost-effective AI API access. The platform supports API relay services for Claude, OpenAI, Gemini, and other popular models, with pricing starting from as low as 7% of the original rate. Register via the exclusive link: APIKEY to enjoy up to 5% off on all recharges.
AIGoCode Thanks to AIGoCode for sponsoring this project! AIGoCode is an all-in-one platform that integrates Claude Code, Codex, and the latest Gemini models, providing you with stable, efficient, and highly cost-effective AI coding services. The platform offers flexible subscription plans, zero risk of account suspension, direct access with no VPN required, and lightning-fast responses. AIGoCode has prepared a special benefit for sub2api users: if you register via this link, you'll receive an extra 10% bonus credit on your first top-up!
CodexEverywhere Real GPT-5.6 series at 3% of OpenAI pricing — CodexEverywhere is democratizing access to frontier models for developers worldwide. We believe in transparency and honesty, with model quality verified by active community oversight for months. USD and crypto friendly. Start with a free $20 trial at codex-everywhere.com.
bmoplus Huge thanks to BmoPlus for sponsoring this project! BmoPlus is a highly reliable AI account provider built strictly for heavy AI users and developers. They offer rock-solid, ready-to-use accounts and official top-up services for ChatGPT Plus / ChatGPT Pro (Full Warranty) / Claude Pro / Super Grok / Gemini Pro. By registering and ordering through BmoPlus - Premium AI Accounts & Top-ups, users can unlock the mind-blowing rate of 10% of the official GPT subscription price (90% OFF)
bestproxy Thanks to Bestproxy for sponsoring this project! Bestproxy provides high-purity residential IPs with dedicated one-IP-per-account support. By combining real home networks with fingerprint isolation, it enables link environment isolation and reduces the probability of association-based risk control.
pateway Thanks to PatewayAI for sponsoring this project! PatewayAI is a premium API relay built for heavy AI developers, offering the full Claude and Codex series sourced 100% from official providers, with transparent token-level billing. Enterprise plans include high concurrency, dedicated management, contracts, and invoicing. Register now to get $3 in trial credits, top-ups from 60% off, and referral bonuses up to $150.
pptoken Thanks to PPToken.cc for sponsoring this project! PPToken.cc specializes in GPT model API relay services, supporting Codex, Claude Code, OpenAI-compatible clients, and Gemini CLI integration. Top-ups are 1:1 (¥1 = $1 credit); GPT models start at 0.16x rate multiplier, with overall cost at roughly 2.2% of official pricing and first-token latency around 1 second — ideal for developers seeking low-cost, high-speed access to GPT model capabilities. Technical support: 24/7 real human responses (no bots), @tech in the group chat and get a reply within 10 minutes. Sponsor benefit: the first 200 users who register via the exclusive registration link and enter promo code `SUB2API` can claim free Codex / Claude Code trial credits — no minimum spend, no card required.
veilx Thanks to Veilx for sponsoring this project! Veilx CDN is purpose-built for large-scale AI API traffic, deeply optimized for relay services and call chains across OpenAI, Claude, Gemini, and scenarios like chat, image generation, embeddings, and streaming — delivering lower latency and higher stability under heavy concurrency. It also offers China three-network optimized return lines, making it ideal for global AI relay platforms, overseas AI SaaS, and cross-border high-concurrency deployments.
veilx Thanks to RoxyBrowser for sponsoring this project! RoxyBrowser RoxyBrowser is the perfect partner for Sub2API: it features a built-in native Roxy AI Agent and high-quality native residential IPs, supports batch automation via simple commands, and significantly boosts security and efficiency for multi-account management! Click this link to sign up and receive a free residential IP package plus a 10% lifetime discount.
proxy4free Thanks to Proxy4Free for sponsoring this project! Proxy4Free is a data proxy service provider for developers and AI applications, offering residential proxies, static residential proxies, ISP proxies, and datacenter proxies for scenarios such as Web Scraping, Browser Automation, and AI Agents. With global IP resources, stable connections, and flexible switching, it helps developers improve data collection success rates and reduce the risk of IP bans. Register via this link to get started and easily build more stable and efficient automation workflows.
aimzoon Thanks to Aimzoon for sponsoring this project! Aimzoon provides stable, cost-effective AI API access services, enabling developers to quickly connect popular AI services to coding tools such as Codex, Claude Code, and Gemini CLI. No complex configuration — faster onboarding, more stable calls, and lower costs. Ongoing promotions including discounted Codex rates and special pricing, with free trial credits upon registration, bringing AI coding into your daily workflow. Click here to register and try it out!
Nagora Nagora is a multi-model AI API gateway built for developers and teams. With a single account and API key, you can access more than 26 leading text and image models through one unified interface. It is compatible with OpenAI, Anthropic, and Gemini protocols and integrates seamlessly with development tools such as Claude Code, Codex, and Gemini CLI. The platform provides intelligent routing, automatic failover, transparent pricing, and consolidated billing, along with budget management, rate limiting, and concurrency controls. This makes AI usage more reliable and manageable across individual development, team collaboration, and production environments. No changes to your existing application are required. Simply replace the Base URL and API key to complete the integration in as little as one minute.
Qiniu AI Thanks to Qiniu AI for sponsoring this project! Qiniu AI is the enterprise-grade large-model MaaS platform under Qiniu Cloud (02567.HK), offering one-stop access to 150+ mainstream models worldwide, compatible with the protocols of major global model providers, and covering full-modality capabilities including text, image, audio, video, and file processing, serving over 1.69 million enterprises and developers. Qiniu AI offers an exclusive benefit for Sub2API users: register via this link — enterprise users get 12 million tokens free, and developers get 3 million tokens free.
FennoAI Thanks to FennoAI for sponsoring this project! FennoAI is a high-stability, high-performance API relay provider for enterprise R&D teams and developers, compatible with the OpenAI and Anthropic protocols and seamlessly integrating with mainstream AI coding tools such as Codex, Claude Code, and OpenCode. The platform delivers enterprise-grade stability, supporting call volumes of 100 billion tokens per day, and supports business-to-business settlement and invoicing for both domestic and overseas entities to meet enterprise R&D and procurement needs. As an exclusive benefit for Sub2API users, purchase a subscription via the exclusive link to get $50 worth of Coding Plan credit for only $1.99. Referral rewards are also available: invite friends to purchase and earn up to 20% commission — the more you invite, the more you earn.
LanoX AI Thank you to LanoX AI for sponsoring this project! LanoX AI provides stable, cost-effective global model access services for developers, teams, and enterprises. 🎁 New User Benefits — Claim millions of free tokens, plus 500+ free models for easier low-cost testing, validation, and deployment 🧠 Global Leading Models — GPT · Claude · Gemini · Qwen · Grok... 🎬 Multimodal Creation — Seedance 2.0 · GPT Image · Gemini Nano Banana 🛡️ Enterprise-Grade Reliability — High availability 💎 native capability output 💎 no intelligence degradation 💎 no model mixing 💎 transparent usage and billing 💎 💰 Lower API Costs — Top-tier models from as low as 10% of official pricing, with clear documentation, simple integration, invoicing support, and enterprise-scale batch usage 🏢 Enterprise Choice — Ideal for AI products, Agents, content platforms, and R&D teams with high-volume model usage
RapidProxy RapidProxy is a data collection proxy solution built for developers, providing stable and reliable residential proxy services. With 90M+ global residential IPs and 200+ country coverage, intelligent rotation, and precise geo-targeting, it helps projects such as web scraping, AI data training, SEO monitoring, and e-commerce data analysis break through access restrictions and improve data collection efficiency. It supports mainstream automation frameworks such as Playwright, Selenium, and Puppeteer, with prices as low as $0.65/GB — start your free test now.
hao.ai hao.ai is a high-speed, stable unified large-model API gateway for developers and teams. With a single API Key and a unified interface, you can access mainstream models such as GPT, Claude, and xAI Grok, with compatibility for common protocols and SDKs including OpenAI and Anthropic. The platform provides model routing, failover, team management, and complete request logs, with model prices as low as 15% of official reference pricing, helping users build AI applications more simply, more reliably, and at lower cost.
Swiftproxy Swiftproxy is a high-performance proxy solution built for developers, providing stable and reliable residential and static residential proxy services. With 90M+ clean residential IPs, global coverage, flexible rotation, and precise geo-targeting, it helps projects such as web scraping, AI automation, browser automation, SEO monitoring, and multi-account management overcome access restrictions and improve workflow efficiency. It supports HTTP(S) and SOCKS5 protocols, integrates with popular automation tools like Playwright, Selenium, and Puppeteer, with dynamic proxy traffic that never expires until used and free testing available — start your free test now!
DuckIP DuckIP - 90M+ global residential network resources across 195+ countries and regions, with rotation and sticky sessions for public data collection, RAG updates, model evaluation, and multi-region data workloads. 🟢Residential Proxy - 20% Off; 🟢Static Residential Proxy - Starting at ¥50.00/IP; 🟢Unlimited Residential Proxy - Starting at ¥19.8/Hour. ✅Get 500M Free Trial.
APIMart Thanks to APIMart for sponsoring this project! APIMart is a low-cost API platform for AI image and video generation — GPT-Image-2 from $0.006 per image, with 160+ images per dollar. One async API covers both image and video: submit a task, get an ID, and retrieve results via polling or callback. Batch tens of thousands of images without timeouts, and switch models without changing code. Pay as you go with no monthly fee — sign up here to get started.
AxisNow Thanks to AxisNow for sponsoring this project! AxisNow protects and accelerates websites and APIs, delivering an optimal access experience across mainland China and globally, while extending acceleration and security capabilities to native/mobile apps through client SDKs — self-hosted private-deployment CDN | subscription-based DDoS-protected CDN | autonomous, flexibly composable CDN network.
PP.dog PP.dog is a source-level API gateway with its own massive account pool, purpose-built as an upstream relay for downstream transit stations and high-frequency developers — saving you the hassle of building and maintaining your own account pool. ✅ Direct from source: self-operated account pool with no middleman markup; 🧧 Cost crusher: combined rate multiplier as low as 0.03x, just 0.35% of official pricing; 🚀 Blazing fast: first-token latency < 1s, on par with the official native API. Get started with PP.dog now
ColaProxy ColaProxy provides high-quality residential proxies built for web scraping, automation, and multi-account management. Get a free trial with non-expiring traffic, pricing starting as low as $0.3/GB, unlimited concurrent connections, and intelligent IP rotation for a smoother, more stable proxy experience. Use discount code COLA10 to get 10% off and start scaling your projects with reliable residential proxies today. Get started with ColaProxy

Overview

Sub2API is an AI API gateway platform designed to distribute and manage API quotas from AI product subscriptions. Users can access upstream AI services through platform-generated API Keys, while the platform handles authentication, billing, load balancing, and request forwarding.

Features

  • Multi-Account Management - Support multiple upstream account types (OAuth, API Key)
  • API Key Distribution - Generate and manage API Keys for users
  • Precise Billing - Token-level usage tracking and cost calculation
  • Smart Scheduling - Intelligent account selection with sticky sessions
  • Concurrency Control - Per-user and per-account concurrency limits
  • Rate Limiting - Configurable request and token rate limits
  • Built-in Payment System - Supports EasyPay, Alipay, WeChat Pay, and Stripe for user self-service top-up, no separate payment service needed (Configuration Guide)
  • Admin Dashboard - Web interface for monitoring and management
  • Composite Groups - Admin routing layer that resolves requested models to concrete providers for multi-provider groups (Operator Guide)
  • External System Integration - Embed external systems (e.g. ticketing) via iframe to extend the admin dashboard

Ecosystem

Community projects that extend or integrate with Sub2API:

Project Description Features
Sub2ApiPay Self-service payment system Now Built-in — Payment is now integrated into Sub2API, no separate deployment needed. See Payment Configuration Guide
sub2api-mobile Mobile admin console Cross-platform app (iOS/Android/Web) for user management, account management, monitoring dashboard, and multi-backend switching; built with Expo + React Native

Tech Stack

Component Technology
Backend Go 1.27.0, Gin, Ent
Frontend Vue 3.4+, Vite 5+, TailwindCSS
Database PostgreSQL 15+
Cache/Queue Redis 7+

Nginx Reverse Proxy Note

When using Nginx as a reverse proxy for Sub2API (or CRS) with Codex CLI, add the following to the http block in your Nginx configuration:

underscores_in_headers on;

Nginx drops headers containing underscores by default (e.g. session_id), which breaks sticky session routing in multi-account setups.


Deployment

Method 1: Script Installation (Recommended)

One-click installation script that downloads pre-built binaries from GitHub Releases.

Prerequisites
  • Linux server (amd64 or arm64)
  • PostgreSQL 15+ (installed and running)
  • Redis 7+ (installed and running)
  • Root privileges
Installation Steps
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash

The script will:

  1. Detect your system architecture
  2. Download the latest release
  3. Install binary to /opt/sub2api
  4. Create systemd service
  5. Configure system user and permissions
Post-Installation
# 1. Start the service
sudo systemctl start sub2api

# 2. Enable auto-start on boot
sudo systemctl enable sub2api

# 3. Open Setup Wizard in browser
# http://YOUR_SERVER_IP:8080

The Setup Wizard will guide you through:

  • Database configuration
  • Redis configuration
  • Admin account creation
Upgrade

You can upgrade directly from the Admin Dashboard by clicking the Check for Updates button in the top-left corner.

The web interface will:

  • Check for new versions automatically
  • Download and apply updates with one click
  • Support rollback if needed
Useful Commands
# Check status
sudo systemctl status sub2api

# View logs
sudo journalctl -u sub2api -f

# Restart service
sudo systemctl restart sub2api

# Uninstall
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash -s -- uninstall -y

Method 2: Docker Compose (Recommended)

Deploy with Docker Compose, including PostgreSQL and Redis containers.

Prerequisites
  • Docker 20.10+
  • Docker Compose v2+
Quick Start (One-Click Deployment)

Use the automated deployment script for easy setup:

# Create deployment directory
mkdir -p sub2api-deploy && cd sub2api-deploy

# Download and run deployment preparation script
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/docker-deploy.sh | bash

# Start services
docker compose up -d

# View logs
docker compose logs -f sub2api

What the script does:

  • Downloads docker-compose.local.yml (saved as docker-compose.yml) and .env.example
  • Generates secure credentials (JWT_SECRET, TOTP_ENCRYPTION_KEY, POSTGRES_PASSWORD)
  • Creates .env file with auto-generated secrets
  • Creates data directories (uses local directories for easy backup/migration)
  • Displays generated credentials for your reference
Manual Deployment

If you prefer manual setup:

# 1. Clone the repository
git clone https://github.com/Wei-Shaw/sub2api.git
cd sub2api/deploy

# 2. Copy environment configuration
cp .env.example .env
chmod 600 .env

# 3. Edit configuration (generate secure passwords)
nano .env

Required configuration in .env:

# PostgreSQL password (REQUIRED)
POSTGRES_PASSWORD=your_secure_password_here

# JWT Secret (RECOMMENDED - keeps users logged in after restart)
JWT_SECRET=your_jwt_secret_here

# TOTP Encryption Key (RECOMMENDED - preserves 2FA after restart)
TOTP_ENCRYPTION_KEY=your_totp_key_here

# Optional: Admin account
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_admin_password

# Optional: Custom port
SERVER_PORT=8080

Generate secure secrets:

# Generate JWT_SECRET
openssl rand -hex 32

# Generate TOTP_ENCRYPTION_KEY
openssl rand -hex 32

# Generate POSTGRES_PASSWORD
openssl rand -hex 32
# 4. Create data directories (for local version)
mkdir -p data postgres_data redis_data

# 5. Start all services
# Option A: Local directory version (recommended - easy migration)
docker compose -f docker-compose.local.yml up -d

# Option B: Named volumes version (simple setup)
docker compose up -d

# 6. Check status
docker compose -f docker-compose.local.yml ps

# 7. View logs
docker compose -f docker-compose.local.yml logs -f sub2api
Deployment Versions
Version Data Storage Migration Best For
docker-compose.local.yml Local directories ✅ Easy (tar entire directory) Production, frequent backups
docker-compose.yml Named volumes ⚠️ Requires docker commands Simple setup

Recommendation: Use docker-compose.local.yml (deployed by script) for easier data management.

Access

Open http://YOUR_SERVER_IP:8080 in your browser.

If admin password was auto-generated, find it in logs:

docker compose -f docker-compose.local.yml logs sub2api | grep "admin password"
Upgrade
# Pull latest image and recreate container
docker compose -f docker-compose.local.yml pull
docker compose -f docker-compose.local.yml up -d
Easy Migration (Local Directory Version)

When using docker-compose.local.yml, migrate to a new server easily:

# On source server
docker compose -f docker-compose.local.yml down
cd ..
tar czf sub2api-complete.tar.gz sub2api-deploy/

# Transfer to new server
scp sub2api-complete.tar.gz user@new-server:/path/

# On new server
tar xzf sub2api-complete.tar.gz
cd sub2api-deploy/
docker compose -f docker-compose.local.yml up -d
Useful Commands
# Stop all services
docker compose -f docker-compose.local.yml down

# Restart
docker compose -f docker-compose.local.yml restart

# View all logs
docker compose -f docker-compose.local.yml logs -f

# Remove all data (caution!)
docker compose -f docker-compose.local.yml down
rm -rf data/ postgres_data/ redis_data/

Method 3: Apple container (macOS)

Apple-silicon Macs running macOS 26 can run the full Sub2API, PostgreSQL, and Redis stack with Apple container 1.1.0 or newer:

git clone https://github.com/Wei-Shaw/sub2api.git
cd sub2api/deploy
./apple-container.sh init
./apple-container.sh up
./apple-container.sh status

This is an operator-managed local workflow; Docker Compose remains the recommended production path. See deploy/APPLE_CONTAINER.md for lifecycle commands, persistence, upgrades, and runtime limitations.


Method 4: Build from Source

Build and run from source code for development or customization.

Prerequisites
  • Go 1.21+
  • Node.js 18+
  • PostgreSQL 15+
  • Redis 7+
Build Steps
# 1. Clone the repository
git clone https://github.com/Wei-Shaw/sub2api.git
cd sub2api

# 2. Install pnpm (if not already installed)
npm install -g pnpm

# 3. Build frontend
cd frontend
pnpm install
pnpm run build
# Output will be in ../backend/internal/web/dist/

# 4. Build backend with embedded frontend
cd ../backend
VERSION="$(./scripts/resolve-version.sh)"
go build -tags embed -ldflags="-X main.Version=${VERSION}" -o sub2api ./cmd/server

# 5. Create configuration file
cp ../deploy/config.example.yaml ./config.yaml

# 6. Edit configuration
nano config.yaml

Note: The -tags embed flag embeds the frontend into the binary. Without this flag, the binary will not serve the frontend UI.

Key configuration in config.yaml:

server:
  host: "0.0.0.0"
  port: 8080
  mode: "release"

database:
  host: "localhost"
  port: 5432
  user: "postgres"
  password: "your_password"
  dbname: "sub2api"

redis:
  host: "localhost"
  port: 6379
  username: ""
  password: ""

jwt:
  secret: "change-this-to-a-secure-random-string"
  expire_hour: 24

default:
  user_concurrency: 5
  user_balance: 0
  api_key_prefix: "sk-"
  rate_multiplier: 1.0

Additional security-related options are available in config.yaml:

  • cors.allowed_origins for CORS allowlist
  • security.url_allowlist for upstream/pricing/CRS host allowlists
  • security.url_allowlist.enabled to disable URL validation (use with caution)
  • security.url_allowlist.allow_insecure_http to allow HTTP URLs when validation is disabled
  • security.url_allowlist.allow_private_hosts to allow private/local IP addresses
  • security.response_headers.enabled to enable configurable response header filtering (disabled uses default allowlist)
  • security.csp to control Content-Security-Policy headers
  • billing.circuit_breaker to fail closed on billing errors
  • security.trust_forwarded_ip_for_api_key_acl enables legacy raw forwarded-header takeover (enabled by default for upgrade compatibility); disable it to enforce server.trusted_proxies, which should contain only the exact proxy CIDRs that connect directly to Sub2API
  • security.forwarded_client_ip_headers configures up to 16 third-party CDN client-IP header names; they are checked in order before the built-in headers only while legacy takeover is enabled
  • turnstile.required to require Turnstile in release mode

Custom client-IP headers can be set in YAML or as a comma-separated environment variable:

SECURITY_FORWARDED_CLIENT_IP_HEADERS=True-Client-IP,X-CDN-Client-IP

Header names are validated, canonicalized, and de-duplicated. The admin security settings can update the list without a restart; new installations persist YAML/environment defaults and existing installations backfill a missing database value. When legacy takeover is disabled, all custom and built-in raw forwarding headers are ignored and Gin uses only server.trusted_proxies. While takeover is enabled, firewall the origin to CDN/proxy addresses and make the edge overwrite every trusted client-IP header. See deploy/EDGE_SECURITY.md for the complete migration and trust-boundary rules.

⚠️ Security Warning: HTTP URL Configuration

When security.url_allowlist.enabled=false, the system performs minimal URL validation and allows HTTP URLs by default (dev-friendly mode; Docker Compose deployments use the same default). For production, explicitly tighten this to HTTPS-only:

security:
  url_allowlist:
    enabled: false                # Disable allowlist checks
    allow_insecure_http: false    # HTTPS only (recommended for production)

Or via environment variable:

SECURITY_URL_ALLOWLIST_ENABLED=false
SECURITY_URL_ALLOWLIST_ALLOW_INSECURE_HTTP=false

Risks of allowing HTTP:

  • API keys and data transmitted in plaintext (vulnerable to interception)
  • Susceptible to man-in-the-middle (MITM) attacks
  • NOT suitable for production environments

When to use HTTP:

  • ✅ Development/testing with local servers (http://localhost)
  • ✅ Internal networks with trusted endpoints
  • ✅ Testing account connectivity before obtaining HTTPS
  • ❌ Production environments (use HTTPS only)

Example error for HTTP URLs when allow_insecure_http: false is set:

Invalid base URL: invalid url scheme: http

If you disable URL validation or response header filtering, harden your network layer:

  • Enforce an egress allowlist for upstream domains/IPs
  • Block private/loopback/link-local ranges
  • Enforce TLS-only outbound traffic
  • Strip sensitive upstream response headers at the proxy
OpenAI Responses WebSocket ingress limits

gateway.openai_ws bounds the lifetime and aggregate count of client-facing Responses WebSocket sessions. These safeguards apply independently from per-turn user and account concurrency slots, which are released between turns.

gateway:
  openai_ws:
    # Total time to receive and decompress the first client message.
    client_first_message_timeout_seconds: 30
    # Close a client socket idle between completed turns; 0 disables this safeguard.
    ingress_inter_turn_idle_timeout_seconds: 300
    # Distributed API-key limit for live client ingress sessions; 0 disables it.
    max_ingress_connections_per_api_key: 64

The first-message timeout is a total read deadline. Deployments that accept large contexts or image-heavy requests over slower links can raise it to 120-300 seconds. It expires before HTTP bridge routing, so bridge mode does not override this limit.

The connection cap is coordinated through Redis using a 60-second lease that is refreshed every 20 seconds. A process that cannot confirm a lease for a full lease lifetime closes its local WebSocket rather than continuing outside the global cap.

Enable the v2 mode router before selecting an account-level WS mode such as http_bridge:

gateway:
  openai_ws:
    mode_router_v2_enabled: true

Or set GATEWAY_OPENAI_WS_MODE_ROUTER_V2_ENABLED=true in the environment. Use http_bridge for client-WebSocket/upstream-HTTP operation when rolling out or mitigating upstream WebSocket issues.

Force OpenAI upstream HTTP/SSE

When an egress proxy or network repeatedly reconnects OpenAI Responses WebSockets, set the global fallback in the persisted deployment configuration:

gateway:
  openai_ws:
    force_http: true

For Compose and Apple container deployments, the equivalent .env setting is:

GATEWAY_OPENAI_WS_FORCE_HTTP=true

This selects HTTP/SSE for OpenAI upstream Responses traffic that would otherwise use WebSocket. It does not change the client-facing protocol or force HTTP/1.1; configure gateway.openai_http2.enabled (or GATEWAY_OPENAI_HTTP2_ENABLED=false) separately when a proxy is incompatible with HTTP/2. Unlike the account-level http_bridge mode, this global fallback takes effect without enabling mode_router_v2_enabled. Keep the setting in the deployment's persisted .env or config.yaml, rather than inside a running container, so it is read again after an image update or container recreation.

⚠️ Important: Creating the Admin Account

The initial admin account is only created via the setup wizard (served at http://<host>:8080 on first run). The default.admin_email / default.admin_password fields in config.yaml are not used to create it — they exist in the template for historical reasons.

Because step 5 above pre-creates config.yaml, the setup wizard will be skipped on first run: the server detects an existing config and boots straight into normal mode with an empty users table, so the first login attempt fails with invalid email or password.

Two ways to create the admin account:

  1. Recommended — let the wizard generate config.yaml: Skip step 5 (do not run the cp). Start ./sub2api directly; the setup wizard at http://localhost:8080 walks you through database, Redis, and admin account setup, then writes config.yaml for you.

  2. If you already created config.yaml: Temporarily move it aside so the wizard can trigger on first run, then restore it afterwards:

    mv config.yaml config.yaml.bak
    ./sub2api        # wizard runs at http://localhost:8080 and writes a fresh config.yaml
    # stop the server (Ctrl+C) once the wizard completes, then restore your config:
    mv config.yaml.bak config.yaml
    ./sub2api        # restart in normal mode and log in with the admin you just created
# 6. Run the application
./sub2api
Development Mode
# Backend (with hot reload)
cd backend
go run ./cmd/server

# Frontend (with hot reload)
cd frontend
pnpm run dev
Code Generation

When editing backend/ent/schema, regenerate Ent + Wire:

cd backend
go generate ./ent
go generate ./cmd/server

Simple Mode

Simple Mode is designed for individual developers or internal teams who want quick access without full SaaS features.

  • Enable: Set environment variable RUN_MODE=simple
  • Default groups are seeded on each startup. Set SIMPLE_MODE_AUTO_CREATE_DEFAULT_GROUPS=false (or YAML simple_mode.auto_create_default_groups: false) to manage groups yourself. The default is true; disabling it does not delete existing groups or change runtime auto-binding or admin concurrency setup.
  • Difference: Hides SaaS-related features and skips billing process
  • Optional key windows: Set SIMPLE_MODE_KEY_RATE_LIMIT_ENABLED=true to enforce each API key's configured 5-hour, daily, and 7-day spending windows. The default is false; balance and subscription debit remain bypassed when enabled.
  • Window enforcement uses the database as its source of truth and records only API-key window usage. It is a post-request soft cap, so concurrent in-flight requests can overshoot by their final costs. Historical simple-mode usage is not backfilled.
  • Security note: In production, you must also set SIMPLE_MODE_CONFIRM=true to allow startup

Asynchronous Image Tasks

Long-running OpenAI/Grok image generation and editing can be submitted through /v1/images/generations/async or /v1/images/edits/async, then polled at /v1/images/tasks/{task_id} without holding a CDN connection open. See Asynchronous Image Tasks for request and response examples.


Grok / xAI Support

Sub2API supports both Grok subscription accounts through xAI OAuth and standard xAI API-key accounts. Both account types forward OpenAI-compatible Responses traffic to xAI.

Supported Scope

  • Platform name: grok
  • Account types: OAuth subscription accounts and xAI API-key accounts
  • Public Responses targets: /v1/responses, /responses, and /backend-api/codex/responses, forwarded to the Grok subscription proxy for OAuth accounts or https://api.x.ai/v1/responses for API-key accounts
  • Public Claude-compatible target: /v1/messages, converted to xAI Responses and returned as Anthropic Messages output for Claude CLI style clients
  • Public Chat Completions targets: /v1/chat/completions and /chat/completions, forwarded to the account-type-specific xAI upstream
  • Codex CLI style Responses WebSocket ingress is accepted on the Responses targets and bridged to xAI HTTP/SSE Responses upstream
  • Text models: grok-4.5, grok-4.3, grok-build-0.1, grok-composer-2.5-fast, grok-4.20-0309-reasoning, grok-4.20-0309-non-reasoning, and grok-4.20-multi-agent-0309
  • Media targets for Grok groups: /v1/images/generations, /images/generations, /v1/images/edits, /images/edits, /v1/videos/generations, /videos/generations, /v1/videos/edits, /videos/edits, /v1/videos/extensions, /videos/extensions, /v1/videos/{request_id}, and /videos/{request_id}. Generation, editing, and extension requests require the group image-generation permission.
  • Media models: grok-imagine, grok-imagine-image-quality, grok-imagine-image, grok-imagine-image-2.0, grok-imagine-edit, grok-imagine-video, and grok-imagine-video-1.5
  • JSON image-edit and video-generation requests accept image references in image, images, reference_images, and mask objects. Use url for xAI-compatible payloads; the legacy image_url field remains accepted and is normalized to url before forwarding.
  • Out of scope for this provider: TTS, transcription, browser automation, cookies, and Grok web scraping

OAuth Configuration

The Grok OAuth flow uses PKCE and does not require committing private secrets. The default client details follow the public xAI OAuth flow used by compatible clients, and every value can be overridden by environment variable:

Variable Default
XAI_OAUTH_CLIENT_ID Public xAI OAuth client ID
XAI_OAUTH_SCOPE openid profile email offline_access grok-cli:access api:access
XAI_OAUTH_REDIRECT_URI http://127.0.0.1:56121/callback
XAI_OAUTH_AUTHORIZE_URL https://auth.x.ai/oauth2/authorize
XAI_OAUTH_TOKEN_URL https://auth.x.ai/oauth2/token
XAI_BASE_URL https://api.x.ai/v1; runtime-diagnostics override (account base_url controls request forwarding)
XAI_GROK_CLI_VERSION 0.2.114; optional override for the client identity sent to cli-chat-proxy.grok.com. The pinned value is also the floor: an override below it is dropped

Administrators can create Grok OAuth or API-key accounts from the dashboard. OAuth authorization and reauthorization are also available through the admin API:

Endpoint Purpose
POST /api/v1/admin/grok/oauth/auth-url Generate an xAI OAuth authorization URL
POST /api/v1/admin/grok/oauth/exchange-code Exchange a callback URL, query string, or code for OAuth credentials
POST /api/v1/admin/grok/oauth/refresh-token Validate or refresh a Grok refresh token
POST /api/v1/admin/grok/accounts/:id/refresh Refresh an existing Grok account

OAuth credential storage reuses the existing account JSON fields: access_token, refresh_token, token_type, expires_at, base_url, optional email, optional subscription_tier, and entitlement_status. OAuth inference defaults to https://cli-chat-proxy.grok.com/v1; existing OAuth accounts that stored the old https://api.x.ai/v1 default are redirected to the subscription proxy at runtime. Explicit custom upstreams remain unchanged.

For API-key accounts, select Grok → API Key in the create-account dialog. The official base URL defaults to https://api.x.ai/v1; credentials use the existing base_url and api_key account fields. OAuth accounts continue to use the subscription flow above.

Grok Build CLI Configuration

  1. In the Sub2API admin dashboard, add either a grok OAuth account and complete xAI authorization, or add a Grok API-key account.
  2. Create a Grok group, attach the account to it, then create a Sub2API API key assigned to that group.
  3. In the user API-key page, click Use Key and select Grok CLI. The modal generates the correct file and base URL for macOS/Linux or Windows. It also provides an OpenCode configuration on the OpenCode tab.
  4. If configuring manually, save the following as ~/.grok/config.toml (Windows: %USERPROFILE%\.grok\config.toml):
[models]
default = "grok"
web_search = "grok"

[model."grok"]
model = "grok-4.5"
base_url = "https://your-sub2api.example.com/v1"
name = "Grok 4.5"
api_key = "sk-your-sub2api-key"
api_backend = "responses"
context_window = 1000000
supports_backend_search = true

Back up an existing config.toml before merging the entry. The file contains a Sub2API API key, so keep it private and restrict its permissions where supported. Verify the effective configuration and make a smoke request:

grok inspect
grok -p "Reply with sub2api-ok" -m grok

The base_url above is the public Sub2API URL ending in /v1, not api.x.ai or the internal xAI OAuth proxy URL.

Usage And Quota Display

xAI quota is passive. Sub2API does not invent subscription quota values; it records whitelisted xAI rate-limit headers from successful or rate-limited upstream responses when xAI sends them. Before the first usable upstream response, the dashboard shows quota as unknown and still displays local Sub2API usage stats.

401 responses temporarily remove accounts with invalid credentials from scheduling. 403 responses are treated as access or entitlement failures instead of token-refresh loops. 429 responses use Retry-After or a short cooldown to temporarily remove the account from scheduling.

New Grok image and video generation requests use a media-specific eligibility check. API-key accounts remain eligible. OAuth accounts with explicit Free or forbidden billing evidence are excluded from new media generation. Missing or malformed observations are probed before dispatch; a successful but incomplete billing response is treated as billing_inconclusive and remains eligible for backwards compatibility, because an unknown billing schema is not proof that the account lacks media entitlement. Operators can quarantine a known-bad account with extra.grok_media_eligible=false or force-enable a verified account with true. Imports run the billing-first quota probe proactively. Chat requests and video status lookups are not affected by this media-only quarantine. If no eligible account remains, the media endpoint returns HTTP 503 with error type grok_media_no_eligible_account.

Administrators can override automatic media eligibility through the account create/update API by setting extra.grok_media_eligible to false (exclude) or true (force eligible). On update, set it to null to remove the override and return to automatic probe-based behavior; omitting the field preserves the current override. A weekly allowance period alone is not treated as a paid tier signal. Successful image responses must contain at least one actual image output; empty HTTP 200 responses trigger account failover instead of being counted and returned as successful generations.


Antigravity Support

Sub2API supports Antigravity accounts. After authorization, dedicated endpoints are available for Claude and Gemini models.

Dedicated Endpoints

Endpoint Model
/antigravity/v1/messages Claude models
/antigravity/v1beta/ Gemini models

Claude Code Configuration

export ANTHROPIC_BASE_URL="http://localhost:8080/antigravity"
export ANTHROPIC_AUTH_TOKEN="sk-xxx"

Hybrid Scheduling Mode

Antigravity accounts support optional hybrid scheduling. When enabled, the general endpoints /v1/messages and /v1beta/ will also route requests to Antigravity accounts.

⚠️ Warning: Anthropic Claude and Antigravity Claude cannot be mixed within the same conversation context. Use groups to isolate them properly.


Project Structure

sub2api/
├── backend/                  # Go backend service
│   ├── cmd/server/           # Application entry
│   ├── internal/             # Internal modules
│   │   ├── config/           # Configuration
│   │   ├── model/            # Data models
│   │   ├── service/          # Business logic
│   │   ├── handler/          # HTTP handlers
│   │   └── gateway/          # API gateway core
│   └── resources/            # Static resources
│
├── frontend/                 # Vue 3 frontend
│   └── src/
│       ├── api/              # API calls
│       ├── stores/           # State management
│       ├── views/            # Page components
│       └── components/       # Reusable components
│
└── deploy/                   # Deployment files
    ├── docker-compose.yml    # Docker Compose configuration
    ├── .env.example          # Environment variables for Docker Compose
    ├── config.example.yaml   # Full config file for binary deployment
    └── install.sh            # One-click installation script

Star History

Star History Chart

License

This project is licensed under the GNU Lesser General Public License v3.0 (or later).

Copyright (c) 2026 Wesley Liddick


If you find this project useful, please give it a star!

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Releases and announcements

52 total
  1. Sub2API 0.2.8v0.2.8Sep 23, 202625.2K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 本版本新增 GPT-6 Sol/Luna、Claude Opus 5.5、Grok 4.7 等模型支持,并接入 OpenCode Go 官方用量窗口查询与自动刷新。 ## 新增功能 - 新增模型支持:GPT-6 Sol、GPT-6 Luna、Claude Opus 5.5、Grok 4.7 - OpenCode Go 用量窗口:支持官方用量查询、自动刷新、同 Key 组共享与主动查询,账号列表/单元格展示余额(7d/1m 徽章) - 计费:支持按推理力度(reasoning effort)配置计费倍率 - 自动同步 Claude Code 客户端版本号 - 简易模式:可选启用 API Key 消费窗口限制;启动时默认分组创建改为可选 - 备份:支持月度归档与独立保留策略 - 联盟推广:提现记录支持登记线下提现 - 日志:支持配置滚动日志保留策略 - Codex:展示 Codex 积分并管理推荐邀请 - 内容审计:新增独立 TypeSafe 引擎配置档 - 插件:HostService 账号目录返回结构化只读元数据 ## 优化改进 - 工具调用:清洗工具 Schema 中非法的 null required、prefixItems/元组数组,避免上游 400 - Antigravity:裸 Gemini 模型名在所有转发入口解析到思考变体;系统提示词中和 Claude Agent SDK 身份避免 429;为 Gemini 分组列出混合 Antigravity 模型 - 调度:非高级调度按 previous_response 路由到持有响应的账号并补齐决策标签;调度倍率补充账号倍率回退;账号 RPM 配置保留在调度投影中 - 上游连接:流式在终止事件即结束不再等待上游 EOF;恢复 OpenAI HTTP/2 保活容错期限;关闭响应体前先取消响应尝试 - 视频计费按秒展示;管理端平台配额编辑器与支持的平台对齐 ## Bug 修复 - OpenCode/Command Code:修复 Cloudflare 1010 误将账号禁用;归一化 /zen/go 变体配额端点;账号更新时保留用量状态与自动刷新 - OpenAI/Codex:透传时选图尊重直通;测试选号按模型映射过滤并保留 OAuth 图像别名;剥离超长 input item ID;改写 Codex turn metadata 保留非 ASCII 转义;Codex base URL 补齐 /v1;DeepSeek Responses input_image 以 url 别名;保留携带 Responses Lite 标记的 GPT-5.5 请求;按 error.status 分类流内失败;流式协议错误只发一次 -

  2. Sub2API 0.2.7v0.2.7Sep 19, 202636.2K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 新增火山方舟 Seedance 原生视频任务 API,并为本地插件系统引入通用宿主服务与只读状态通道。 ## 新增功能 - Seedance (Ark) 原生视频 API:支持火山方舟异步视频任务协议(创建/查询/删除),按上游 usage 计费,响应保持原生格式 - 插件宿主服务:为本地插件提供按插件命名空间的 KV 存储、账号目录(受插件已声明能力范围限制)等通用能力 - 插件只读状态通道:新增 /admin/plugins/:id/status 与 plugin.status UI 通道,可无需二次验证轮询插件实时状态 ## 优化改进 - 手机竖屏顶栏保留模型广场图标入口 ## Bug 修复 - 修复 Antigravity Gemini 裸模型名(配合 thinkingConfig)被直发上游导致 404 的问题 - 修复 Antigravity Gemini 原生流对 go-genai / python-genai 客户端发送 SSE 注释心跳导致流中断的问题 - 修复 Kimi 国内 Coding Plan 账号配额耗尽(403)被误判为永久禁用的问题,改为按窗口重置时间限时暂停 - 修复 Codex 内置工具根级联合 schema(oneOf/anyOf/allOf)导致 /v1/responses → /v1/messages 返回 400 的问题 - 修复 DeepSeek 思考模式在 Chat 回退时缺少 reasoning_content 导致 400 的问题 --- ## 📥 Installation **Docker:** ```bash # Docker Hub docker pull weishaw/sub2api:0.2.7 # GitHub Container Registry docker pull ghcr.io/wei-shaw/sub2api:0.2.7 ``` **One-line install (Linux):** ```bash curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash ``` **Manual download:** Download the appropriate archive for your platform from the assets below. ## 📚 Documentation - [GitHub Repository](https://github.com/Wei-Shaw/sub2api) - [Installa

  3. Sub2API 0.2.5v0.2.5Sep 15, 202633.2K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 新增 OpenCode 平台接入(Zen / GO 双账号类型)与「站点类型」三态开关,可按需关闭订阅或充值入口;OpenAI WebSocket 连接池在容量、抢占与作用域隔离上做了系统性修正。 ## 新增功能 - OpenCode 平台:支持 Zen、GO 两种账号类型,按模型在 Chat Completions / Responses / Anthropic Messages 三种上游协议间路由,并派生 X-OpenCode-Session 以命中提示词缓存 - 站点类型开关:后台功能开关页新增「充值 & 订阅 / 仅充值 / 仅订阅」三态选择,关闭订阅后用户端自动收起所有订阅入口、页签与文案 - Antigravity 新增 Gemini 3.7 Flash、3.8 Flash 模型支持 - 订阅管理支持批量操作 - API Key 管理支持批量编辑 - 管理端支持批量删除选中用户 - API Key 分组支持按上游提供商过滤 - 运维页 Token 请求统计扩展到全部平台 - 模型检索接口改为基于可见模型目录返回 - OpenAI OAuth 图像请求改走原生 Codex Images 通道 - Ollama Cloud 用量窗口支持异步限额重置 - 注册流程新增确认密码 - 后台可隐藏自定义页面的打开按钮 - Apple container 部署支持 Web 端一键更新 ## 优化改进 - OpenAI WS 连接池:对齐新版上下文池容量计算、排队等待者在账号池变更时重选连接、常驻读循环应答上游 ping、每账号连接上限系数默认值调整为 5.0 - OpenAI WS/HTTP 执行作用域按 request_kind 分道,会话状态与抢占改用执行作用域键,避免跨场景串号 - 大体积图片 Responses 请求显著降低内存分配 - 用量明细费用精度提升至 8 位小数 - 运维错误详情列优先展示时间与响应内容 - 请求详情展示首字延迟(TTFT) - 后台 OpenAI WS 模式说明与链路提示文案完善 ## Bug 修复 - 修复 DeepSeek 模型名校验默认兜底问题,未配置映射时按官方名单校验 - 修复 DeepSeek V4.1-Flash 计费价格与 pro→Flash 切换 - 修复 Codex 配额窗口与重置时间未按规范窗口读取 - 修复 Codex 模型目录最大上下文窗口被覆盖 - 修复 Codex User-Agent 未校验即解析身份 - 修复 Antigravity Gemini 透传 SSE 事件间多写空行 - 修复 Antigravity OAuth Token 缓存按账号隔离,并失效历史 project 维度缓存 - 修

  4. Sub2API 0.2.4v0.2.4Sep 9, 202645.4K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 新增 MiniMax 平台接入,并为长时间生成的流式请求加入 HTTP/2 PING 保活,改善长任务断流问题。 ## 新增功能 - MiniMax 平台支持:新增账号类型、分组调度、渠道监控与额度监控完整接线 - OpenAI 生图支持 Image 2.5 模型 - Grok 媒体能力资格控制:可在账号维度配置媒体调用资格 - 长流保活:为长时间生成的上游流式请求启用 HTTP/2 PING 保活 - 账号列表新增 OpenAI 预估周消耗展示 - 渠道监控 V2 新增用户排行显隐开关,可对非管理员隐藏排行榜 - 支付帮助文案支持 Markdown 渲染(已做净化处理) - 自定义页面的打开链接按钮支持拖拽调整位置 - 部署支持自定义 Apple 容器网络子网 ## 优化改进 - 系统日志入库量收敛上限,避免数据库无限增长 - 渠道缓存失效改为集群广播,多实例部署下配置变更即时生效 - 账号调度以持久化冷却时间为准,自动丢弃过期的进程内运行时封锁 - 客户端断开后先取消上游流再关闭连接,并正确归类被取消的流 - 渠道监控中缺失首字延迟样本不再显示为异常,改为「不适用」状态 ## Bug 修复 - 修复 OAuth 账号生图时主控模型选择错误 - 修复 Grok Chat Completions 传入不支持的 external_web_access 参数导致请求失败 - 修复 429 未耗尽额度时仍触发账号退避,关闭默认回避时不再创建 OAuth 冷却 - 修复 Claude Code max_tokens=1 探测请求在部分模型上被拒绝 - 修复代理更新时未提交字段被清空,保留过期时间与回退设置 - 修复代理备份引用方向错误且无法共享的问题 - 修复代理过期回退只能触发一次的问题 - 修复公告与代理的日期范围缺少校验 - 修复代理列表返回异常数据时页面报错 - 修复模型广场未包含生效中的订阅分组 - 修复注册可见性设置在登录页未生效 - 修复账号无法移除已停用分组的问题 - 修复令牌刷新失败的账号在列表中丢失选中状态 - 修复 Antigravity OAuth 账号创建时订阅套餐信息丢失 - 修复账号操作菜单超出视口显示不全 - 修复 Windows 下插件 ZIP 包未关闭导致的提交失败 - 升级 go-redis 至 v9.22.0,修复连接池 nil-ctx panic --- ## 📥 Installation **Docker:** ```bash # Docker Hub docker pull weishaw/sub2api:0.2.4 # GitHub Container Registry docker pull ghcr.i

  5. Sub2API 0.2.3v0.2.3Sep 8, 202620K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 修复升级后 groups.model_allowlist 列缺失导致密钥/订阅页面 500 的问题,并补齐 Ollama Cloud 下 DeepSeek 模型在 Messages / Responses 协议的输出上限与鉴权处理。 ## Bug 修复 - 修复数据库回滚旧结构后升级不自愈,导致「API 密钥」「我的订阅」「管理端订阅列表」等页面加载失败的问题(新增可重放收敛迁移 236) - 修复挂载在 Ollama Cloud 下的 DeepSeek 模型请求在 Anthropic Messages 与原生 /v1/responses 路径未压制输出上限,被上游以 400 拒绝的问题 - 修复 Ollama Cloud base URL 带尾部斜杠时输出上限压制失效的问题 - 修复 Anthropic 兼容入口指向 Ollama Cloud 时未自动使用 Bearer 鉴权导致认证失败的问题 - 修复 OpenAI OAuth / API Key 账号连接测试的模型下拉列表显示为空白的问题 --- ## 📥 Installation **Docker:** ```bash # Docker Hub docker pull weishaw/sub2api:0.2.3 # GitHub Container Registry docker pull ghcr.io/wei-shaw/sub2api:0.2.3 ``` **One-line install (Linux):** ```bash curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash ``` **Manual download:** Download the appropriate archive for your platform from the assets below. ## 📚 Documentation - [GitHub Repository](https://github.com/Wei-Shaw/sub2api) - [Installation Guide](https://github.com/Wei-Shaw/sub2api/blob/main/deploy/README.md)

Code frequency

additions and deletions
+166.1K-166.1KWeek of 2025-12-14: +95,915 linesWeek of 2025-12-14: -4,067 linesWeek of 2025-12-21: +52,057 linesWeek of 2025-12-21: -17,025 linesWeek of 2025-12-28: +160,678 linesWeek of 2025-12-28: -38,390 linesWeek of 2026-01-04: +90,067 linesWeek of 2026-01-04: -32,555 linesWeek of 2026-01-11: +51,431 linesWeek of 2026-01-11: -9,576 linesWeek of 2026-01-18: +29,557 linesWeek of 2026-01-18: -3,601 linesWeek of 2026-01-25: +55,194 linesWeek of 2026-01-25: -2,047 linesWeek of 2026-02-01: +89,535 linesWeek of 2026-02-01: -28,733 linesWeek of 2026-02-08: +45,921 linesWeek of 2026-02-08: -7,213 linesWeek of 2026-02-15: +10,593 linesWeek of 2026-02-15: -804 linesWeek of 2026-02-22: +78,686 linesWeek of 2026-02-22: -42,092 linesWeek of 2026-03-01: +33,326 linesWeek of 2026-03-01: -10,248 linesWeek of 2026-03-08: +37,426 linesWeek of 2026-03-08: -5,203 linesWeek of 2026-03-15: +17,565 linesWeek of 2026-03-15: -3,923 linesWeek of 2026-03-22: +17,434 linesWeek of 2026-03-22: -1,935 linesWeek of 2026-03-29: +19,445 linesWeek of 2026-03-29: -4,801 linesWeek of 2026-04-05: +61,550 linesWeek of 2026-04-05: -38,003 linesWeek of 2026-04-12: +18,717 linesWeek of 2026-04-12: -5,483 linesWeek of 2026-04-19: +166,075 linesWeek of 2026-04-19: -33,568 linesWeek of 2026-04-26: +12,702 linesWeek of 2026-04-26: -3,074 linesWeek of 2026-05-03: +30,528 linesWeek of 2026-05-03: -3,291 linesWeek of 2026-05-10: +17,027 linesWeek of 2026-05-10: -1,495 linesWeek of 2026-05-17: +21,018 linesWeek of 2026-05-17: -3,736 linesWeek of 2026-05-24: +35,687 linesWeek of 2026-05-24: -5,671 linesWeek of 2026-05-31: +18,164 linesWeek of 2026-05-31: -1,630 linesWeek of 2026-06-07: +12,138 linesWeek of 2026-06-07: -1,619 linesWeek of 2026-06-14: +10,267 linesWeek of 2026-06-14: -898 linesWeek of 2026-06-21: +10,198 linesWeek of 2026-06-21: -1,089 linesWeek of 2026-06-28: +74,030 linesWeek of 2026-06-28: -6,500 linesWeek of 2026-07-05: +104,920 linesWeek of 2026-07-05: -64,504 linesWeek of 2026-07-12: +118,535 linesWeek of 2026-07-12: -9,702 linesWeek of 2026-07-19: +34,971 linesWeek of 2026-07-19: -2,977 linesWeek of 2026-07-26: +32,134 linesWeek of 2026-07-26: -2,630 linesWeek of 2026-08-02: +55,493 linesWeek of 2026-08-02: -7,881 linesWeek of 2026-08-09: +27,857 linesWeek of 2026-08-09: -2,214 linesWeek of 2026-08-16: +56,542 linesWeek of 2026-08-16: -8,026 linesWeek of 2026-08-23: +31,501 linesWeek of 2026-08-23: -3,388 linesWeek of 2026-08-30: +43,552 linesWeek of 2026-08-30: -16,642 linesWeek of 2026-09-06: +31,016 linesWeek of 2026-09-06: -2,964 linesWeek of 2026-09-13: +21,563 linesWeek of 2026-09-13: -1,824 linesWeek of 2026-09-20: +11,871 linesWeek of 2026-09-20: -1,644 linesDec 14, 2025Sep 20, 2026
+1.9M lines added, -442.7K removed over the last year.

Commits per week

last 52 weeks
2840Week of 2025-09-27: 0 commitsWeek of 2025-10-04: 0 commitsWeek of 2025-10-11: 0 commitsWeek of 2025-10-18: 0 commitsWeek of 2025-10-25: 0 commitsWeek of 2025-11-01: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 63 commitsWeek of 2025-12-21: 132 commitsWeek of 2025-12-28: 216 commitsWeek of 2026-01-04: 200 commitsWeek of 2026-01-11: 241 commitsWeek of 2026-01-18: 94 commitsWeek of 2026-01-25: 52 commitsWeek of 2026-02-01: 149 commitsWeek of 2026-02-08: 134 commitsWeek of 2026-02-15: 24 commitsWeek of 2026-02-22: 122 commitsWeek of 2026-03-01: 154 commitsWeek of 2026-03-08: 122 commitsWeek of 2026-03-15: 134 commitsWeek of 2026-03-22: 54 commitsWeek of 2026-03-29: 113 commitsWeek of 2026-04-05: 99 commitsWeek of 2026-04-12: 127 commitsWeek of 2026-04-19: 277 commitsWeek of 2026-04-26: 59 commitsWeek of 2026-05-03: 54 commitsWeek of 2026-05-10: 51 commitsWeek of 2026-05-17: 120 commitsWeek of 2026-05-24: 74 commitsWeek of 2026-05-31: 66 commitsWeek of 2026-06-07: 61 commitsWeek of 2026-06-14: 51 commitsWeek of 2026-06-21: 53 commitsWeek of 2026-06-28: 107 commitsWeek of 2026-07-05: 194 commitsWeek of 2026-07-12: 284 commitsWeek of 2026-07-19: 179 commitsWeek of 2026-07-26: 121 commitsWeek of 2026-08-02: 180 commitsWeek of 2026-08-09: 89 commitsWeek of 2026-08-16: 184 commitsWeek of 2026-08-23: 141 commitsWeek of 2026-08-30: 157 commitsWeek of 2026-09-06: 166 commitsWeek of 2026-09-13: 108 commitsWeek of 2026-09-20: 64 commitsSep 27, 2025Sep 20, 2026
5.1K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 19 commitsSun 1:00 — 19 commitsSun 2:00 — 17 commitsSun 3:00 — 9 commitsSun 4:00 — 7 commitsSun 5:00 — 3 commitsSun 6:00 — 4 commitsSun 7:00 — 6 commitsSun 8:00 — 16 commitsSun 9:00 — 11 commitsSun 10:00 — 22 commitsSun 11:00 — 29 commitsSun 12:00 — 21 commitsSun 13:00 — 34 commitsSun 14:00 — 33 commitsSun 15:00 — 31 commitsSun 16:00 — 45 commitsSun 17:00 — 37 commitsSun 18:00 — 54 commitsSun 19:00 — 23 commitsSun 20:00 — 42 commitsSun 21:00 — 47 commitsSun 22:00 — 47 commitsSun 23:00 — 31 commitsMon 0:00 — 31 commitsMon 1:00 — 15 commitsMon 2:00 — 8 commitsMon 3:00 — 14 commitsMon 4:00 — 5 commitsMon 5:00 — 3 commitsMon 6:00 — 11 commitsMon 7:00 — 8 commitsMon 8:00 — 21 commitsMon 9:00 — 31 commitsMon 10:00 — 48 commitsMon 11:00 — 57 commitsMon 12:00 — 26 commitsMon 13:00 — 27 commitsMon 14:00 — 45 commitsMon 15:00 — 45 commitsMon 16:00 — 69 commitsMon 17:00 — 61 commitsMon 18:00 — 44 commitsMon 19:00 — 57 commitsMon 20:00 — 51 commitsMon 21:00 — 50 commitsMon 22:00 — 43 commitsMon 23:00 — 12 commitsTue 0:00 — 47 commitsTue 1:00 — 30 commitsTue 2:00 — 13 commitsTue 3:00 — 6 commitsTue 4:00 — 22 commitsTue 5:00 — 5 commitsTue 6:00 — 10 commitsTue 7:00 — 13 commitsTue 8:00 — 15 commitsTue 9:00 — 43 commitsTue 10:00 — 55 commitsTue 11:00 — 53 commitsTue 12:00 — 33 commitsTue 13:00 — 53 commitsTue 14:00 — 49 commitsTue 15:00 — 64 commitsTue 16:00 — 52 commitsTue 17:00 — 46 commitsTue 18:00 — 30 commitsTue 19:00 — 55 commitsTue 20:00 — 60 commitsTue 21:00 — 49 commitsTue 22:00 — 44 commitsTue 23:00 — 32 commitsWed 0:00 — 32 commitsWed 1:00 — 17 commitsWed 2:00 — 13 commitsWed 3:00 — 15 commitsWed 4:00 — 4 commitsWed 5:00 — 6 commitsWed 6:00 — 5 commitsWed 7:00 — 7 commitsWed 8:00 — 15 commitsWed 9:00 — 37 commitsWed 10:00 — 47 commitsWed 11:00 — 55 commitsWed 12:00 — 25 commitsWed 13:00 — 29 commitsWed 14:00 — 53 commitsWed 15:00 — 45 commitsWed 16:00 — 57 commitsWed 17:00 — 47 commitsWed 18:00 — 42 commitsWed 19:00 — 30 commitsWed 20:00 — 27 commitsWed 21:00 — 31 commitsWed 22:00 — 37 commitsWed 23:00 — 30 commitsThu 0:00 — 30 commitsThu 1:00 — 21 commitsThu 2:00 — 27 commitsThu 3:00 — 9 commitsThu 4:00 — 17 commitsThu 5:00 — 4 commitsThu 6:00 — 16 commitsThu 7:00 — 9 commitsThu 8:00 — 27 commitsThu 9:00 — 27 commitsThu 10:00 — 29 commitsThu 11:00 — 35 commitsThu 12:00 — 24 commitsThu 13:00 — 21 commitsThu 14:00 — 39 commitsThu 15:00 — 57 commitsThu 16:00 — 53 commitsThu 17:00 — 45 commitsThu 18:00 — 42 commitsThu 19:00 — 44 commitsThu 20:00 — 39 commitsThu 21:00 — 61 commitsThu 22:00 — 24 commitsThu 23:00 — 29 commitsFri 0:00 — 19 commitsFri 1:00 — 12 commitsFri 2:00 — 11 commitsFri 3:00 — 8 commitsFri 4:00 — 6 commitsFri 5:00 — 4 commitsFri 6:00 — 5 commitsFri 7:00 — 10 commitsFri 8:00 — 23 commitsFri 9:00 — 40 commitsFri 10:00 — 52 commitsFri 11:00 — 41 commitsFri 12:00 — 26 commitsFri 13:00 — 44 commitsFri 14:00 — 48 commitsFri 15:00 — 40 commitsFri 16:00 — 56 commitsFri 17:00 — 45 commitsFri 18:00 — 36 commitsFri 19:00 — 32 commitsFri 20:00 — 49 commitsFri 21:00 — 38 commitsFri 22:00 — 25 commitsFri 23:00 — 30 commitsSat 0:00 — 35 commitsSat 1:00 — 44 commitsSat 2:00 — 9 commitsSat 3:00 — 4 commitsSat 4:00 — 6 commitsSat 5:00 — 5 commitsSat 6:00 — 12 commitsSat 7:00 — 5 commitsSat 8:00 — 19 commitsSat 9:00 — 27 commitsSat 10:00 — 43 commitsSat 11:00 — 40 commitsSat 12:00 — 25 commitsSat 13:00 — 29 commitsSat 14:00 — 54 commitsSat 15:00 — 39 commitsSat 16:00 — 48 commitsSat 17:00 — 54 commitsSat 18:00 — 21 commitsSat 19:00 — 38 commitsSat 20:00 — 37 commitsSat 21:00 — 35 commitsSat 22:00 — 28 commitsSat 23:00 — 26 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits2,648 (37%)
Community commits4,599 (63%)

7,247 commits in total over the last year.

DateListRankStars gained
Aug 24, 2026daily#2+278
Aug 23, 2026daily#2+278
  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    272.8K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    251.2K stars · Python

  • Significant-Gravitas/AutoGPT

    AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

    187.7K stars · Python

  • avelino/awesome-go

    A curated list of awesome Go frameworks, libraries and software

    186.9K stars · Go

  • f/prompts.chat

    f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

    172K stars · HTML

  • DietrichGebert/ponytail

    Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

    154.6K stars · JavaScript