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
46.8K
+161 today
Forks
10.2K
Watchers
91
Open issues
2.8K
Open PRs
1.1K
Contributors
~535
Commits
8.3K
Branches
55

GoLGPL-3.0Created Dec 18, 2025Last push 2d agoLatest release v0.2.24+385 stars this week+1.6K 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 46,792 stars and 10,193 forks on GitHub, and gained 385 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 2026Nov 2026
46.8K stars as of Nov 30, 2026. Measured daily since Aug 23, 2026; GitHub no longer exposes earlier star timestamps.

Update history

5 recorded
  • Nov 21, 2026New release v0.2.24 (previously v0.2.20).
  • Nov 10, 2026New release v0.2.20 (previously v0.2.19).
  • Oct 31, 2026New release v0.2.19 (previously v0.2.17).
  • 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
NovDecJanFebMarAprMayJunJulAugSepOctNovMonWedFri2025-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: 26 commits2026-09-20: 25 commits2026-09-21: 9 commits2026-09-22: 24 commits2026-09-23: 25 commits2026-09-24: 9 commits2026-09-25: 8 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: 17 commits2026-10-10: 13 commits2026-10-11: 4 commits2026-10-12: 7 commits2026-10-13: 8 commits2026-10-14: 9 commits2026-10-15: 18 commits2026-10-16: 9 commits2026-10-17: 4 commits2026-10-18: 1 commit2026-10-19: 4 commits2026-10-20: 5 commits2026-10-21: 7 commits2026-10-22: 4 commits2026-10-23: 7 commits2026-10-24: 7 commits2026-10-25: 25 commits2026-10-26: 5 commits2026-10-27: 17 commits2026-10-28: 14 commits2026-10-29: 4 commits2026-10-30: 9 commits2026-10-31: 4 commits2026-11-01: 2 commits2026-11-02: 5 commits2026-11-03: 3 commits2026-11-04: 15 commits2026-11-05: 12 commits2026-11-06: 5 commits2026-11-07: 15 commits2026-11-08: 9 commits2026-11-09: 5 commits2026-11-10: 9 commits2026-11-11: 18 commits2026-11-12: 25 commits2026-11-13: 12 commits2026-11-14: 35 commits2026-11-15: 10 commits2026-11-16: 26 commits2026-11-17: 14 commits2026-11-18: 16 commits2026-11-19: 8 commits2026-11-20: 10 commits2026-11-21: 0 commits
5,727 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    46,792 stars

  • Very active

    5,727 commits in 52 weeks

  • Community-driven

    ~535 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

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

Quota distribution

Allocate 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?

Click to collapse

WandAPI

WandAPI — an enterprise-grade, stable AI model API gateway built by a core contributor to this project. One API key gives you access to Claude, GPT, Gemini and other leading models, natively compatible with the OpenAI and Anthropic protocols, so Claude Code, Codex and your existing SDKs work by simply changing the Base URL. Real-time routing by latency and upstream health with millisecond-level automatic failover keeps requests online, backed by 99.99% service availability. Pay as you go, with per-request token and cost breakdowns.

Free trial credits: sign up via this exclusive link to claim free trial credits.


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! A subscription-based AI coding platform, not just pay-per-token. One account, one monthly plan for Claude Code, Codex and Gemini, with direct connection on the mainland and fast responses. Subscribe via this link to get an extra 10% credits!
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.
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!
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.
Chenju Thanks to Chenju for sponsoring this project! This is probably the only ad slot in this section that doesn't ask you to sign up for anything. Good open-source projects deserve to be paid for, so Chenju is chipping in a gift and raising a glass to the author. Find Chenju on X to chat about API relays, upstream providers, or just shoot the breeze.
ooko.ai 🔑 Buying AI accounts at top prices | Gemini · Claude · GPT | Main and alt accounts all welcome, any channel wanted | Pay-per-usage supported | Seeking first-hand resources from major providers, I'll bring the KEY.
WeChat: Liuyou-zawd | Telegram: AACC8888888
NiuProxy NiuProxy provides affordable global proxy solutions for web scraping, AI agents, automation, and data collection. With residential proxies starting at $0.35/GB across 190+ countries and regions, NiuProxy offers flexible plans and HTTP(S)/SOCKS5 support.
🎁 Use code PAY2 for 10% OFF your recharge!
SoleAPI Thanks to SoleAPI for supporting this project! SoleAPI is an AI model gateway for developers and enterprises: one API key gives you access to 30+ leading models including Claude, GPT and Gemini. It is natively compatible with the OpenAI and Anthropic protocols, so Claude Code, Codex, Cursor and your existing SDKs work by simply changing the Base URL. Requests are routed in real time by latency and upstream health, with millisecond-level automatic failover to backup channels, 99.99% service availability and 24/7 technical support. Every call lands on a single bill with per-request token and cost breakdowns you can inspect at any time. Sign up through this project's referral link to receive free trial credits, and earn ongoing cashback by inviting friends who top up!
MaruCode MaruCode — a small, no-frills API site that does a bit of charity now and then. 🍟 Every Thursday it runs limited-time rate-multiplier events. In operation for over half a year, with a 3K-member main group, focused on stability and welcoming collaboration with universities, enterprises, and more — thank you 🙇. It runs a self-operated account pool with no top-up marketing gimmicks, mainly offering mainstream models such as Codex (GPT 6.2 Astra), Claude Code (Claude Opus 5.5), and GPT Image 2.6, with WebSocket protocol support, clearly published pricing (Codex 0.3x, CC 1.7x), and a transparent exchange rate (1:1).
Massive Tokens Massive Tokens supplies Claude API access at wholesale per-token prices to businesses and high-volume developers. It serves the standard Anthropic Messages API, so it works with Claude Code, Sub2API, LiteLLM and One API without code changes. Sign up with code SUB2API for 5% off every call, then join our Telegram group @massivetokens (https://t.me/massivetokens) and ask an admin for $10 in credits.
DataEyesAI DataEyesAI is an all-in-one AI API platform for developers and businesses, offering unified access to leading models including OpenAI, Claude, and Gemini for AI coding and text, image, audio, and video generation. It supports popular AI coding tools such as Claude Code and Codex, with pay-as-you-go pricing, real-time usage and cost monitoring, and 24/7 technical support to simplify model integration and keep development costs under control. New users can sign up through this link to claim usage credits. From coding to multimodal creation, start your AI journey in one place!

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 admin@example.com: 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

OpenAI Image Output Formats

On /v1/images/generations and /v1/images/edits, OAuth / Setup Token requests use the Codex-native Images endpoints when the mapped upstream model is a supported GPT Image 1.5, 2, 2.5, or 2.6 model. Models before 2.6 can fall back to Responses if the native endpoint returns 404 or 405.

Sub2API forwards output_format and output_compression, but whether they take effect depends on the upstream account and endpoint. An upstream may reject a format with a 4xx error or return HTTP 200 with a different format: for example, requesting jpeg or svg can yield output_format: "png" and PNG data. This behavior has also been reported for gpt-image-2.5-flare requests for jpeg.

Before saving or serving an image, compare the returned output_format (including any per-image value) with the request and verify the actual image format. Use the actual output format for the filename extension and MIME type. A successful response containing a different format retains its status, image content, and usage; it can still incur charges. Automatically retrying may generate and bill another image.


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
View on GitHub

Recent activity

commits and pull requests

Releases and announcements

68 total
  1. Sub2API 0.2.24v0.2.24Nov 20, 202612.4K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 安全修复:网关拒绝含重复字段的请求,修复利用重复字段使计费模型与实际调用模型不一致的问题;同时修复 Codex 文献检索返回 403 时 OpenAI OAuth 账号被批量停调的问题。 ## 新增功能 - 网页搜索模拟新增 Exa 搜索服务商,web_search 结果块返回搜索来源 - Claude Code 上下文压缩请求按 5 分钟缓存 TTL 写入 - Claude OAuth / Setup Token 账号显示窗口费用估算 - 模型广场支持一键复制模型 ID - 频繁手动刷新 Token 时给出风险提示 ## 优化改进 - 网关请求体只解析一次,并减少工具 schema 清洗、命名空间剥离、图片意图识别、cache_control 检查中的重复遍历与拷贝,降低大请求的 CPU 与内存占用 - 调度器账号缓存不再保存展开后的分组信息 - 运维面板模型平均 Tokens/秒改为按累计请求耗时计算 - 网关在读取请求体阶段返回的错误(如 413)改为按各协议入口的格式返回,文案与 handler 一致 - Codex Messages 桥接把 ToolSearch 映射为原生 tool_search - 合成路由改写到 Claude 5.5 模型时自动适配 thinking 参数 ## Bug 修复 - 安全修复:请求体(含嵌套字段)及 WebSocket 帧中同名字段重复声明时直接拒绝,修复按低价模型计费、实际调用高价模型,以及绕过账号模型映射、强制 service_tier、推理强度上限的问题(GHSA-p3r4-jcm3-2hph) - 修复带 BOM 或 Content-Type 标为 multipart 的请求体可绕过分组模型白名单的问题 - 修复 Codex 文献检索返回 403 时逐个暂停甚至永久禁用 OpenAI OAuth 账号的问题 - 修复 embeddings、alpha search、systemone 等纯文本接口的请求体上限未提前生效的问题 - 修复 Antigravity 单个请求的裸 429 冷却多个账号的问题,额度查询改用账号转发端点,并保留上游 Gemini SSE 注释帧 - 修复 OpenAI 上游请求超时不切换账号的问题 - 修复 OpenAI OAuth 令牌轮换后凭据可能因补全超时或并发被覆盖的问题 - 修复 ChatGPT OAuth 账号(含透传)调度到非 OpenAI 模型的问题 - 修复 Grok 搜索按 xAI 返回的成功次数计费,Grok 图片编辑支持 5 张输入图并保留校验错误信息 - 修复转发图片的 usage 被拆成多行 SSE、缓冲输出为空时 Responses 结果缺失的问题 - 修

  2. Sub2API 0.2.23v0.2.23Nov 18, 202621.1K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 接入 GPT-6.2 Sol 和 Astra,支持 Ultra Fast 档位;修正多条协议转换链路上的缓存写入用量和计费。 ## 新增功能 - 支持 GPT-6.2 Sol / Astra 模型:价格与官方一致;上下文超过 272K 时按长上下文计费;Fast 档 2 倍价;Ultra Fast 档在 2027-03-01 00:00(太平洋时间)前是 3 倍促销价,之后自动切为 6 倍 - GPT-6.2 Ultra Fast 按订阅套餐放行:Pro 200 只开放 Sol,Pro 500 开放 Sol 和 Astra - 渠道定价新增「Ultra Fast 倍率」,可按渠道覆盖。不填时沿用模型自带倍率,只影响 Ultra Fast 档 ## 优化改进 - OpenAI 流式请求在首次输出前空闲超时,现在会切换账号重试,不再直接报错给客户端。最多切换 1 次,避免一个卡住的请求把超时惩罚扩散到整个账号池 - 流式空闲计时改为每收到上游数据就重置,避免持续出数据的长流被误判超时 - 原生 Chat Completions 流式透传减少 flush 次数,降低网关 CPU 占用 - DeepSeek reasoning 占位和 Ollama Cloud reasoning 回填改为一次改写请求体,大幅降低长对话请求的 CPU 和内存开销 ## Bug 修复 - 修复 Anthropic ↔ OpenAI Responses / Chat Completions 互转时丢失缓存写入 TTL(5m/1h)明细的问题 - 修复缓存写入明细之和小于总量时少计费的问题,差额现在按 5m 价格补计 - 修复 OpenAI 网关走 Anthropic 原生路径时 1h 缓存写入按 5m 价格计费的问题,现在按 1h 价格计费 - 修复流式过程中只更新缓存字段时,prompt 总量和缓存写入总量被覆盖或算错的问题 --- ## 📥 Installation **Docker:** ```bash # Docker Hub docker pull weishaw/sub2api:0.2.23 # GitHub Container Registry docker pull ghcr.io/wei-shaw/sub2api:0.2.23 ``` **One-line install (Linux):** ```bash curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash ``` **Manual download:** Dow

  3. Sub2API 0.2.22v0.2.22Nov 17, 202615.3K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 分组新增强制 OpenAI Ultra Fast 档位,Vertex 账号支持 us/eu 多区域端点;同时大幅优化单用户高并发扣费、调度快照与请求体解析性能。 ## 新增功能 - 分组强制 Ultra Fast:OpenAI / Composite 分组可强制 service_tier=ultrafast,仅对支持的模型(GPT-6 Astra、GPT-6.1 Sol)生效,可与强制 Fast 并存(优先级 Ultra Fast > Fast > 客户端) - Vertex 多区域:Gemini 账号支持 us/eu 多区域端点,不支持的模型自动走 global;发往多区域的请求在默认定价下按 1.1 倍计费(分组/渠道自定义价格不受影响) - 新增 Gemini 4 Carbon 模型支持,补齐 Gemini 4 Hydrogen 计费 - OpenAI 透传账号可选按模型白名单过滤调度 - 并发等待 ping 支持配置 concurrency.ping_interval=0 关闭,避免提前写入 HTTP 状态码 ## 优化改进 - 同一用户的扣费按用户通道合并结算,消除余额热点行排队,单用户高并发下延迟与内存显著下降 - 调度快照加载与数据库回源按 bucket 合并,减少大分组选号时的重复加载与整组复制 - 请求体热点路径改用零拷贝读取,Anthropic 请求路径与流事件转发减少 JSON 解码与复制 - 分组日汇总重建与保留期清理不再阻塞 usage_logs 写入,避免清理期间用量记录丢失 - 上游死连接检测由约 165 秒缩短到约 30 秒 - 启动时远程价格哈希检查改为后台进行,不再阻塞服务启动 - Gemini 原生请求按稳定前缀生成粘性会话哈希,提升隐式缓存命中 - Bedrock 按错误语义区分封号、用例缺失、限流与内容过滤,429 只冷却对应模型 - Kimi 支持新版月度套餐额度解析 - Codex 分叉会话沿用父会话的 prompt cache key,保留缓存命中 - 模型白名单禁止添加通配符条目并给出提示 ## Bug 修复 - 修复 GPT-6.1 Sol 的 Ultra Fast 计费倍率(由 2 倍修正为 6 倍,与 Astra 一致) - 修复 Gemini 粘性会话换号时强制按缓存读取计费的问题,改为按上游实际用量计费 - 修复 Gemini 流式同名并行工具调用、分片工具调用参数快照丢失的问题 - 修复 Gemini 兼容入口未转发 response_format 结构化输出的问题 - 修复 Antigravity 兼容流思考内容未流式输出、空流后未释放粘性账号的问题 - 修复 OpenAI 首个输出前的上游 ke

  4. Sub2API 0.2.21v0.2.21Nov 11, 202628.9K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 新增 Claude Fable 5.2 与 Mythos 5.2 支持;OpenAI 用量与计费区分 30m/12h 缓存写入 TTL,并根据实例内存上限自动设定请求体内存预算,减少高并发下误报 503 的情况。 ## 新增功能 - 支持 Claude Fable 5.2 与 Mythos 5.2:包括模型目录、Anthropic 预设、Bedrock 映射、OpenCode 配置和兜底定价($8/$40 每百万 token,Fast 模式 2 倍) - OpenAI 缓存写入计费按 TTL 拆分:渠道、分组、账号统计价卡新增独立的 12h 缓存写入价(GPT-5.6 / GPT-6 系列未配置时默认按输入价 2.5 倍;已配置通用写入价的价卡不受影响),管理员用量详情按实际 TTL 展示 - Antigravity 账号用量单元格新增「查询」按钮,可跳过缓存强制刷新用量 - EasyPay 支付实例可单独配置退款成功码(默认 1,可选 0),兼容退款以 code=0 表示成功的易支付网关 ## 优化改进 - 请求体内存预算未配置时,自动取进程内存上限的 1/4(取物理内存、cgroup 限制、GOMEMLIMIT 中的最小值),最低 1GiB - API 密钥列表不再等近 30 天用量统计返回才渲染,并为用量统计新增覆盖索引,大数据量下 /keys 页面不再长时间停在骨架屏 - 账号列表刷新时保留现有行和配额数值,不再整表闪烁成骨架屏 - 系统设置页的保存按钮改为吸附在视口右下角的浮标,长表单不用滚到底部也能保存 - 余额充值倍率支持最多 6 位小数,便于跟随实时汇率 - 安全审计任务入队后立即唤醒本进程 worker 认领,不再平均等待约 250ms - OpenAI WebSocket 首 token 时间改为遵循管理员配置的 TTFT 口径,与 SSE 保持一致 - 客户端未提供会话标识时,Responses 会话种子在工具回合中保持稳定,减少粘性会话中途切换账号 - 内置 Claude Code CLI 版本基线升至 2.1.321 ## Bug 修复 - 修复 OpenAI 合成的 reasoning effort 未应用 effort 映射规则和上限校验的问题;保留已配置的 GLM 降级语义 - 修复 OpenAI 显式配置的模型级冷却规则对 overloaded/slow_down 及流内 503 不生效的问题;关键词只匹配实际错误字段 - 修复 Codex 元数据事件(codex.rate_limits 等)提前提交响应流,导致后续上游过载无法 failover 的问题 - 修复原生 Responses WebSocket 在后续轮次限流时重

  5. Sub2API 0.2.20v0.2.20Nov 7, 202624.5K downloads

    > AI API Gateway Platform - 将 AI 订阅配额分发和管理 新增基于 OAuth 授权的管理 MCP 接口,并完善管理员密钥的细粒度权限;同时全面治理网关请求体内存与读写超时,提升高并发下的稳定性。 ## 新增功能 - 管理 MCP:新增 OAuth 认证的管理 MCP 接口及前端授权确认/连接管理页面,需显式配置 MCP_PUBLIC_URL 才会启用(默认关闭) - 管理员密钥:补全权限项(统计、OpenAI OAuth、邀请等)与中英文权限展示,新增需输入确认文字才能开启的「全权兼容模式」 - 注册邮箱精确黑名单:支持批量粘贴(上限 20000 条),按收件箱身份匹配 Gmail 点号/+后缀变体,保存时可批量禁用命中的已注册用户 - OpenAI 生图账号支持按 1K/2K/4K 尺寸档位分流,未指定尺寸时按档位偏好逐层选号 - 新增 gateway.disable_openai_transport_error_cooldown 开关,可关闭 OpenAI 传输错误冷却 - Antigravity 账号用量显示每个配额组真实的 5 小时与每周窗口,Pro 套餐的独立 Argon 配额单独成行 - Antigravity INTERNAL 500 账号惩罚档位可通过环境变量配置 ## 优化改进 - 网关请求体内存预算、上游/下游读写超时与后台任务全面加上限,减少慢连接和大请求对实例的影响 - 网关热路径减少 JSON 拷贝与重复解析(thinking 过滤、Codex 引导/压缩判断、Gemini 流增量等),RPM 覆盖与分组隐私门控不再每请求查库 - 请求体读取失败按超时(408)、客户端断开(499)、截断、解码错误分类返回,并记录不含内容的诊断日志 - 打通 GPT Image 2.6 原生图片链路,保留 complexity 与原生编辑选项 - Antigravity 连接测试改为发送管理员填写的提示词并返回模型真实回复 - Kimi 并发上限 403 改用短冷却,不再长时间下线账号 - Antigravity 图像模型的 INTERNAL 500 只冷却该模型,不再连带整个账号进入惩罚 - 用户使用记录导出每页 1000 条,遇面板限流 429 按 Retry-After 等待后重试 - Codex 密钥导出与 CC Switch 导出默认模型统一改为 GPT-6.1 Sol,并启用实时联网搜索、保留图片配置 - GPT-6.1 Terra 使用官方 Codex 描述(上下文窗口 500k),校验 effort 与兼容缓存键 - 错误透传规则可覆盖内置的请求体过大 413 - MCP 客户端 ID 过长时前端截断显示,MCP 关闭时隐藏入口 ## Bug 修复 - 修复 Anthropic setup

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,871 linesWeek of 2026-09-20: -2,129 linesWeek of 2026-09-27: +25,964 linesWeek of 2026-09-27: -3,036 linesWeek of 2026-10-04: +18,016 linesWeek of 2026-10-04: -1,441 linesWeek of 2026-10-11: +13,315 linesWeek of 2026-10-11: -1,648 linesWeek of 2026-10-18: +18,411 linesWeek of 2026-10-18: -1,143 linesWeek of 2026-10-25: +25,724 linesWeek of 2026-10-25: -1,583 linesWeek of 2026-11-01: +21,316 linesWeek of 2026-11-01: -1,503 linesWeek of 2026-11-08: +24,501 linesWeek of 2026-11-08: -2,036 linesWeek of 2026-11-15: +13,993 linesWeek of 2026-11-15: -1,888 linesDec 14, 2025Nov 15, 2026
+2.1M lines added, -457.5K removed over the last year.

Commits per week

last 52 weeks
2840Week 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: 110 commitsWeek of 2026-09-20: 106 commitsWeek of 2026-09-27: 122 commitsWeek of 2026-10-04: 65 commitsWeek of 2026-10-11: 59 commitsWeek of 2026-10-18: 35 commitsWeek of 2026-10-25: 78 commitsWeek of 2026-11-01: 57 commitsWeek of 2026-11-08: 113 commitsWeek of 2026-11-15: 84 commitsNov 23, 2025Nov 15, 2026
5.7K commits in the last 52 weeks.

When work happens

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

Who is committing

last 52 weeks
Maintainer commits3,111 (37%)
Community commits5,223 (63%)

8,334 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.

    486.9K 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.

    315K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    267.7K 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.

    203.4K stars · JavaScript

  • avelino/awesome-go

    A curated list of awesome Go frameworks, libraries and software

    197.2K 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.

    188.3K stars · Python