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
44.8K
+198 today
Forks
9.6K
Watchers
88
Open issues
2.7K
Open PRs
969
Contributors
~494
Commits
7.7K
Branches
49
Views (30d)
2

GoLGPL-3.0Created Dec 18, 2025Last push 2d agoLatest release v0.2.17+556 stars this week+2.4K 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 44,771 stars and 9,616 forks on GitHub, and gained 556 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 2026Oct 2026Oct 2026
44.8K stars as of Oct 24, 2026. Measured daily since Aug 23, 2026; GitHub no longer exposes earlier star timestamps.

Update history

2 recorded
  • Oct 19, 2026New release v0.2.17 (previously v0.2.14).
  • Oct 7, 2026New release v0.2.14 (previously v0.2.8).

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepOctMonWedFri2025-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: 9 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: 26 commits2026-09-20: 25 commits2026-09-21: 9 commits2026-09-22: 24 commits2026-09-23: 24 commits2026-09-24: 9 commits2026-09-25: 7 commits2026-09-26: 6 commits2026-09-27: 14 commits2026-09-28: 18 commits2026-09-29: 15 commits2026-09-30: 22 commits2026-10-01: 18 commits2026-10-02: 21 commits2026-10-03: 14 commits2026-10-04: 3 commits2026-10-05: 1 commit2026-10-06: 11 commits2026-10-07: 15 commits2026-10-08: 5 commits2026-10-09: 15 commits2026-10-10: 12 commits2026-10-11: 4 commits2026-10-12: 7 commits2026-10-13: 8 commits2026-10-14: 9 commits2026-10-15: 15 commits2026-10-16: 5 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 1 commit2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 0 commits2026-10-23: 0 commits2026-10-24: 0 commits
5,344 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    44,771 stars

  • Very active

    5,344 commits in 52 weeks

  • Community-driven

    ~494 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.
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.
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!
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
Modelflare Modelflare: Full strength, stable, nothing watered down. Global SOTA models at a lower cost. Operated by US-based Havenbyte LLC, Modelflare supports GPT, Claude, Gemini, Grok, and other leading models through common compatible protocols, plus 40+ image and video models. Cache compensation is a highlight: selected OpenAI groups (price-first, stable, and premium) guarantee daily cache hit rates of 65%, 75%, or 85%, and if eligible requests fall short, Modelflare refunds the difference, visible on the usage dashboard after settlement. Special offers: a single top-up of US$20 unlocks the GPT discount group at a 0.015x price multiplier, and a single top-up of US$50 unlocks the Claude discount group at a 0.03x multiplier. Register via this exclusive link to get started.

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
# Leave empty to auto-generate a random email (login username) and password, shown in logs on first startup.
# Avoid guessable values such as [email protected]: they are brute-force targets.
ADMIN_EMAIL=
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 the admin email (login username) or password was auto-generated, find them in logs:

docker compose -f docker-compose.local.yml logs sub2api | grep "Generated admin"
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.


TypeSafe / Jev Support

Sub2API supports TypeSafe API-key accounts through Jev's native, non-streaming System One protocol.

  • Platform: typesafe; account type: API Key
  • Default upstream: https://api.typesafe.ai
  • Public endpoint: POST /v1/systemone
  • Model: jev-latest, also returned by /v1/models for TypeSafe groups
  • Questions: noul, choice, and score

Requests and successful responses retain the native System One JSON structure. This endpoint is not compatible with Chat Completions, Responses, Anthropic Messages, or streaming clients.

Question validation follows the TypeSafe OpenAPI wire schema (also used by SDK v0.5.7). instructions may be omitted or null for all question types. Noul criteria may be omitted or null; its true/false descriptions and Choice descriptions accept strings, objects, arrays, or null. Score criteria must be a non-empty array of string, object, or array descriptions; a single level is valid. SDK integer-keyed Score maps are normalized to arrays by the SDK before sending.

curl https://your-sub2api.example.com/v1/systemone \
  -H 'Authorization: Bearer sk-your-sub2api-key' \
  -H 'Content-Type: application/json' \
  --data '{"model":"jev-latest","state":"Text to evaluate","questions":{"safety":{"type":"noul","instructions":"Evaluate whether the text is unsafe"}}}'

The built-in jev-latest price is $0.042 per million input tokens and $0 for output tokens. Channel pricing can override both values. Credential, billing, permission, rate-limit, overload, server, and network failures (401, 402, 403, 429, 529, 5xx, transport errors) use the existing account error policy (including custom error codes and temporary-unschedulable rules) and fail over to another account; request errors (400, 413, and 422) are returned without retrying another account and never change account state. TypeSafe groups (and Composite requests routed to TypeSafe) reject Messages, Chat Completions, Responses, and count_tokens requests with 404.


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

Releases and announcements

61 total
  1. Sub2API 0.2.17v0.2.17Oct 16, 202624.2K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 Antigravity / Gemini 支持 Gemini 4 Argon(含计费与上游模型目录同步),Gemini 兼容入口支持思考档位与流式思考摘要;同时集中修复支付退款、易支付查单等多处资金链路问题。 ## 新增功能 - Gemini 4 Argon:Antigravity、Gemini API、Gemini CLI 支持 gemini-4-argon(low/medium/high),并补齐计费价格 - Antigravity 模型目录:同步上游模型目录时按账号实际端点拉取,并保存上下文窗口、图像输入、思考等能力信息 - Gemini 兼容入口思考档位:chat/messages 兼容入口转发 reasoning_effort / thinking 为 Gemini 思考配置,流式返回思考摘要 - 最小输出 token 可配置:新增 gateway.min_output_tokens(默认 128,最低 16),作用于各协议转换路径 - OpenAI API Key 账号支持 Web Search 模拟:Claude Code 走 OpenAI 分组的 /v1/messages 也可启用 web_search 模拟 ## 优化改进 - Vertex 共享容量不足的 429 不再冷却账号,改为同号退避重试,避免绑定显式缓存的请求直接 503 - Vertex 服务账号已被删除时将账号置为 error 并换号,不再持续调度返回 502 - 账号管理页恢复筛选项直接平铺展示,并优化窄屏布局 ## Bug 修复 - 修复易支付(彩虹易支付 / ZPay)查单参数无法被识别、数字字符串解析失败的问题,回调确认后再入账 - 修复退款处理中余额/订阅扣减时机问题:退款待定期间保留扣减,网关确认失败后原子回退 - 修复支付宝退款无法查询状态的问题,查询异常保持待定、未找到记录延迟判定失败 - 修复不支持的订单类型导致支付回调无法确认的问题,下单时校验订单类型 - 修复 Stripe 支付页 client_secret 经 URL 传递的问题,改为从本地订单快照读取 - 修复 GPT-5.5 退役后仍向 ChatGPT 订阅账号调度和展示该模型的问题(API Key 账号不受影响) - 修复 Responses 对象缺少 created_at 导致 grok-build 等客户端反序列化失败的问题 - 修复 composite 分组模型归属歧义时 OpenAI OAuth 凭据可能误入 Anthropic 管线的问题 - 修复自适应账号在原生 Anthropic 网关和 count_tokens 路径忽略 Anthropic 协议 base URL 的问题 - 修复同

  2. Sub2API 0.2.16v0.2.16Oct 13, 202625.8K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 Gemini 支持显式上下文缓存(AI Studio / Vertex / 自建网关上游),并新增 Claude Haiku 5.5 模型适配。 ## 新增功能 - Claude Haiku 5.5:全链路适配模型注册、推理强度、定价与计费,并接入 Responses 桥接 - Gemini 显式上下文缓存:支持创建、续期、删除缓存,内置官方存储价并按 Pro / Flash 系列兜底,存储费按 API Key 额度与订阅额度预留校验 - Gemini Vertex(Agent Platform):支持 API Key 认证,服务账号支持同步上游模型列表,模型列表与详情接口支持 Vertex 账号 - Gemini AI Studio:适配新的 AQ. 格式 Key - 临时不可调度规则新增作用范围选项:可选择命中后暂停整个账号或只冷却当前模型,未设置的存量规则行为不变 - 分组名称与描述支持多语言 - 运维请求详情表新增账号名称列 ## 优化改进 - GPT-6.1 Sol 订阅账号不再收取长上下文附加费 - GPT-6.1 Sol 生成上下文默认值提升至 500k - Gemini 3.6 Flash 兜底价改为官方优惠价 - 第三方上游 API Key 与 Vertex 账号不再套用 AI Studio 等级和模拟配额 - Vertex 显示名改为 Agent Platform (Vertex) - Kimi 国际版 Coding 端点(api.kimi.ai)支持配额查询 ## Bug 修复 - 修复上游拒绝结构化输入时 Chat 回退重试的问题,并保留 Responses 语义、避免不安全重试 - 修复 Kimi / DeepSeek / MiniMax 等非 OpenAI 账号被注入 Codex 图像生成桥接导致 400 的问题 - 修复 Gemini 引用不存在的缓存返回 403 时账号被停用并换号的问题 - 修复 Gemini 工具结果中的图片丢失问题 - 修复 Antigravity 图像模型限流影响同账号其他模型的问题 - 修复显式模型级 401 规则在故障转移、计数、Bedrock 等入口未生效、仍整号置错的问题 - 修复 Gemini 原生路由网关本地错误在运维中的归类问题 - 修复 Gemini 授权链接生成失败时错误信息丢失的问题 - 修复同步上游模型失败时未显示后端错误原因的问题 - 修复风控审核范围中残留已删除分组的问题 - 修复分组 RPM 覆盖加载过期数据的问题,并拒绝非正数的倍率修改 - 修复支付二维码倒计时漂移、用量倒计时切回标签页不刷新的问题 - 修复渠道监控 v2 设置无法添加缺失平台、自动刷新不更新缓存可用性的问题

  3. Sub2API 0.2.15v0.2.15Oct 9, 202630.5K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 新增 Cline 与 Command Code 两个上游平台;平台列表、多协议转发与账号表单统一改由平台清单驱动,同时集中修复一批协议转换、计费与前端竞态问题。 ## 新增功能 - 新增 Cline 平台:支持 ClinePass 订阅(5 小时 / 7 天 / 30 天额度)与积分计费,ClinePass 账号连接测试优先使用订阅模型 - 新增 Command Code 平台:按模型自动分流到 Anthropic / Responses / Chat Completions,并按上游模型目录对支持的协议直通 - 用量页默认展示单请求输出 TPS,运维监控新增输出 TPS 分位数 - 账号管理页搜索与筛选栏改为紧凑布局 ## 优化改进 - 平台列表、多协议账号表单与转发/探测逻辑统一由平台清单驱动,后续新增平台无需再写数据库约束迁移 - 前端按平台能力展示模型同步入口 - Responses 命名空间剥离改为仅在需要时重建输入,降低请求处理开销 - 长上下文倍率徽标替换为更准确的展示 ## Bug 修复 - 修复多协议供应商 Claude 模型计费与钱包冷却问题,并隔离各账号的模型目录缓存 - 修复 Responses WebSocket 长连接后续轮次不使用最新分组价格计费的问题 - 修复 WS 透传模式下图片输入用量未计入的问题 - 修复 /v1/responses 转 Anthropic 时带首尾空白的模型名导致计费模型名不一致的问题 - 修复 OAuth 历史回放 web_search_call 时未声明 web_search 工具导致上游报错的问题(含 Responses Lite) - 修复上游拒绝加密 reasoning 签名后请求失败的问题,现可自动恢复 - 修复 Anthropic thinking 块缺少 signature 字段导致严格客户端(如 Grok Build)解析失败的问题 - 修复 Chat ↔ Responses 协议转换问题:developer 角色被改写、具名 tool_choice 未展平、旧版 function_call 与结果未配对、refusal 内容丢失 - 修复缓冲式 Anthropic 路径遇到负数内容块索引时的异常 - 修复 Chat 流式响应心跳注释被丢弃的问题 - 修复 Anthropic 拟态路径缓存 TTL 顺序不合法、tool change beta 头被丢弃的问题 - 修复 Grok Responses 流静默拒答(空 response.completed)不触发故障转移的问题 - 修复 Grok SSO 设备授权缺少 consent token 与 origin 的问题 - 修复 OpenC

  4. Sub2API 0.2.14v0.2.14Oct 7, 202623K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 修复两处安全问题:全新安装不再使用可猜测的默认管理员账号,并封堵 EasyPay 支付回调伪造漏洞。 ## Bug 修复 - 修复全新安装默认管理员邮箱固定为 [email protected] 且不校验密码强度、易被暴力破解的问题:未设置 ADMIN_EMAIL 时自动生成随机登录邮箱(admin-<随机串>@sub2api.local,启动日志中输出),自动安装时校验 ADMIN_PASSWORD 长度(8-72 字节)与 ADMIN_EMAIL 格式(#7850) - 修复 EasyPay 下单签名可被重放为支付成功回调、无需商户密钥即可伪造到账的安全漏洞:return_url 不再保留客户端查询参数,回调验签拒绝非标准通知参数(#7881) - 修复使用远程 Codex 模型目录时,「使用密钥」生成的 Codex 配置缺少 api_key_model_discovery 导致无法通过 API Key 发现模型的问题 ## 破坏性变更 - 全新自动安装(AUTO_SETUP)时,若显式设置的 ADMIN_PASSWORD 少于 8 字节或超过 72 字节、或 ADMIN_EMAIL 不是可登录的合法邮箱,安装将直接失败;已有管理员或已有用户的部署不受影响,不会因此阻断启动 - 未设置 ADMIN_EMAIL 的全新安装,管理员登录邮箱不再是 [email protected],请从首次启动日志中获取生成的邮箱 ## 升级指南 - 已有实例无需任何操作即可升级;若仍在使用旧默认邮箱 [email protected] 或弱密码,建议在后台修改管理员邮箱与密码 --- ## 📥 Installation **Docker:** ```bash # Docker Hub docker pull weishaw/sub2api:0.2.14 # GitHub Container Registry docker pull ghcr.io/wei-shaw/sub2api:0.2.14 ``` **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]

  5. Sub2API 0.2.13v0.2.13Oct 2, 202624.3K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 - 修复创建 TypeSafe API Key 账号时,因默认开启上游计费自动探测而返回 400 无法创建的问题 - 修复特定情况下请求用量未能正常结算的问题 --- ## 📥 Installation **Docker:** ```bash # Docker Hub docker pull weishaw/sub2api:0.2.13 # GitHub Container Registry docker pull ghcr.io/wei-shaw/sub2api:0.2.13 ``` **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,944 linesWeek of 2026-09-13: -1,847 linesWeek of 2026-09-20: +17,639 linesWeek of 2026-09-20: -2,129 linesWeek of 2026-09-27: +12,709 linesWeek of 2026-09-27: -1,594 linesWeek of 2026-10-04: +775 linesWeek of 2026-10-04: -162 linesDec 14, 2025Oct 4, 2026
+2M lines added, -444.9K removed over the last year.

Commits per week

last 52 weeks
2840Week 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: 121 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: 110 commitsWeek of 2026-09-20: 104 commitsWeek of 2026-09-27: 122 commitsWeek of 2026-10-04: 62 commitsWeek of 2026-10-11: 48 commitsWeek of 2026-10-18: 1 commitsOct 25, 2025Oct 18, 2026
5.3K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 19 commitsSun 1:00 — 20 commitsSun 2:00 — 17 commitsSun 3:00 — 9 commitsSun 4:00 — 7 commitsSun 5:00 — 4 commitsSun 6:00 — 4 commitsSun 7:00 — 6 commitsSun 8:00 — 17 commitsSun 9:00 — 13 commitsSun 10:00 — 23 commitsSun 11:00 — 40 commitsSun 12:00 — 22 commitsSun 13:00 — 35 commitsSun 14:00 — 34 commitsSun 15:00 — 31 commitsSun 16:00 — 45 commitsSun 17:00 — 37 commitsSun 18:00 — 54 commitsSun 19:00 — 24 commitsSun 20:00 — 42 commitsSun 21:00 — 48 commitsSun 22:00 — 48 commitsSun 23:00 — 31 commitsMon 0:00 — 31 commitsMon 1:00 — 15 commitsMon 2:00 — 8 commitsMon 3:00 — 15 commitsMon 4:00 — 5 commitsMon 5:00 — 3 commitsMon 6:00 — 11 commitsMon 7:00 — 8 commitsMon 8:00 — 24 commitsMon 9:00 — 31 commitsMon 10:00 — 49 commitsMon 11:00 — 58 commitsMon 12:00 — 31 commitsMon 13:00 — 27 commitsMon 14:00 — 48 commitsMon 15:00 — 46 commitsMon 16:00 — 72 commitsMon 17:00 — 66 commitsMon 18:00 — 47 commitsMon 19:00 — 59 commitsMon 20:00 — 52 commitsMon 21:00 — 50 commitsMon 22:00 — 43 commitsMon 23:00 — 12 commitsTue 0:00 — 49 commitsTue 1:00 — 30 commitsTue 2:00 — 13 commitsTue 3:00 — 6 commitsTue 4:00 — 23 commitsTue 5:00 — 6 commitsTue 6:00 — 10 commitsTue 7:00 — 14 commitsTue 8:00 — 16 commitsTue 9:00 — 45 commitsTue 10:00 — 58 commitsTue 11:00 — 59 commitsTue 12:00 — 33 commitsTue 13:00 — 56 commitsTue 14:00 — 53 commitsTue 15:00 — 65 commitsTue 16:00 — 54 commitsTue 17:00 — 46 commitsTue 18:00 — 31 commitsTue 19:00 — 55 commitsTue 20:00 — 60 commitsTue 21:00 — 50 commitsTue 22:00 — 45 commitsTue 23:00 — 39 commitsWed 0:00 — 32 commitsWed 1:00 — 17 commitsWed 2:00 — 28 commitsWed 3:00 — 15 commitsWed 4:00 — 5 commitsWed 5:00 — 6 commitsWed 6:00 — 7 commitsWed 7:00 — 8 commitsWed 8:00 — 17 commitsWed 9:00 — 39 commitsWed 10:00 — 48 commitsWed 11:00 — 62 commitsWed 12:00 — 26 commitsWed 13:00 — 34 commitsWed 14:00 — 61 commitsWed 15:00 — 47 commitsWed 16:00 — 59 commitsWed 17:00 — 49 commitsWed 18:00 — 44 commitsWed 19:00 — 32 commitsWed 20:00 — 28 commitsWed 21:00 — 31 commitsWed 22:00 — 37 commitsWed 23:00 — 31 commitsThu 0:00 — 30 commitsThu 1:00 — 24 commitsThu 2:00 — 29 commitsThu 3:00 — 11 commitsThu 4:00 — 19 commitsThu 5:00 — 4 commitsThu 6:00 — 17 commitsThu 7:00 — 9 commitsThu 8:00 — 28 commitsThu 9:00 — 27 commitsThu 10:00 — 30 commitsThu 11:00 — 36 commitsThu 12:00 — 27 commitsThu 13:00 — 22 commitsThu 14:00 — 41 commitsThu 15:00 — 65 commitsThu 16:00 — 54 commitsThu 17:00 — 46 commitsThu 18:00 — 43 commitsThu 19:00 — 44 commitsThu 20:00 — 41 commitsThu 21:00 — 67 commitsThu 22:00 — 30 commitsThu 23:00 — 32 commitsFri 0:00 — 19 commitsFri 1:00 — 12 commitsFri 2:00 — 11 commitsFri 3:00 — 9 commitsFri 4:00 — 7 commitsFri 5:00 — 4 commitsFri 6:00 — 10 commitsFri 7:00 — 11 commitsFri 8:00 — 23 commitsFri 9:00 — 45 commitsFri 10:00 — 62 commitsFri 11:00 — 46 commitsFri 12:00 — 28 commitsFri 13:00 — 46 commitsFri 14:00 — 49 commitsFri 15:00 — 42 commitsFri 16:00 — 56 commitsFri 17:00 — 47 commitsFri 18:00 — 37 commitsFri 19:00 — 35 commitsFri 20:00 — 54 commitsFri 21:00 — 38 commitsFri 22:00 — 27 commitsFri 23:00 — 30 commitsSat 0:00 — 35 commitsSat 1:00 — 44 commitsSat 2:00 — 9 commitsSat 3:00 — 4 commitsSat 4:00 — 7 commitsSat 5:00 — 6 commitsSat 6:00 — 12 commitsSat 7:00 — 5 commitsSat 8:00 — 20 commitsSat 9:00 — 28 commitsSat 10:00 — 44 commitsSat 11:00 — 40 commitsSat 12:00 — 29 commitsSat 13:00 — 29 commitsSat 14:00 — 55 commitsSat 15:00 — 39 commitsSat 16:00 — 49 commitsSat 17:00 — 56 commitsSat 18:00 — 22 commitsSat 19:00 — 41 commitsSat 20:00 — 40 commitsSat 21:00 — 37 commitsSat 22:00 — 40 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,840 (37%)
Community commits4,855 (63%)

7,695 commits in total over the last year.

DateListRankStars gained
Aug 24, 2026daily#2+278
Aug 23, 2026daily#2+278
  • morluto/rea

    Reverse engineer anything with agents, from app behavior down to native binaries.

    388.1K stars · TypeScript

  • 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.

    289.2K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    257.2K stars · Python

  • avelino/awesome-go

    A curated list of awesome Go frameworks, libraries and software

    190.4K stars · Go

  • 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.8K stars · Python

  • DietrichGebert/ponytail

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

    176.6K stars · JavaScript