Discover and explore top open-source AI tools and projects—updated daily.
AI key rotation for smarter, secure API access
Top 79.3% on SourcePulse
One Balance is a Cloudflare Worker-based API key load balancer designed to maximize the utilization of AI service quotas and enhance security. It targets developers and power users who manage multiple API keys for services like Google AI Studio or OpenAI, offering intelligent key rotation, rate limiting, and automatic key blocking to reduce costs and prevent service disruptions.
How It Works
The system leverages Cloudflare AI Gateway for routing and adds intelligent key management. It sits as a proxy, receiving client requests and forwarding them to the AI Gateway, which then uses the appropriate API key. Key states (active, cooling down, blocked) are managed in a D1 database. The core innovation lies in its granular rate-limiting detection, distinguishing between minute-level and day-level quotas for specific models (e.g., Google AI Studio) and implementing differentiated cooldown periods, alongside automatic blocking of permanently banned keys.
Quick Start & Requirements
pnpm install
, and deploy using pnpm run deploycf
(requires Cloudflare account and wrangler
CLI).Highlighted Details
Maintenance & Community
The project is maintained by glidea. There are no explicit mentions of community channels like Discord/Slack or a public roadmap in the provided README.
Licensing & Compatibility
The repository does not explicitly state a license. This is a significant omission for evaluating commercial use or closed-source linking.
Limitations & Caveats
The project lacks an explicit license, making its usage terms unclear. Access to the management UI might be restricted for users in mainland China due to network access. The README also notes that sharing keys can negatively impact the system's ability to manage global call information, potentially increasing rate limit errors.
1 week ago
Inactive