claude-lb

Anyone who juggles several Claude subscriptions and API keys can pool them behind one endpoint with this gateway, which tracks spending per client. Conversations are pinned to the account that already holds their prompt cache, and the dashboard prices what that saved per model. Overloads and rate limits fail over to the next account; recovered accounts rejoin the rotation by themselves. Client keys carry per-window request, token, or dollar budgets, plus a model allowlist and assigned accounts. Capacity rings show five-hour and seven-day quota with a pace forecast. Nine routing strategies switch live, no restart. Reports slice cost, tokens, latency, and cache savings by day, account, key, model, or user agent for any range up to 366 days, with CSV export. Automations send a tiny prompt through chosen accounts on weekdays, starting a subscription's five-hour window before work begins. Sign-in takes a password and optional TOTP; a read-only guest role, a proxy IP allowlist, and an audit log round out access control. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.

claude-lb
claude-lb
claude-lb
claude-lb
claude-lb
claude-lb

Benefits

  • Keep prompt caches warm across keys
  • claude-lb hashes the system prompt, tools, and first user turn to pin each conversation to one account, so cache reads cost 0.025 to 0.1 times instead of 1.25 times rewrites.
  • Budget every client with its own key
  • Issue clb_ keys with request, token, and dollar limits over 5-hour, 7-day, daily, weekly, monthly, or custom windows, plus per-key model allowlists, enforced models, and assigned accounts.
  • Survive rate limits without downtime
  • 429, 529, 5xx, and transport errors retry on the next account up to three attempts by default, and background probes against the model list return recovered accounts to rotation automatically.
  • See quota, spend, and savings live
  • The dashboard charts five-hour and seven-day subscription capacity with a safe-pace line and weekly forecast, plus cost, tokens, error rate, and the dollars prompt caching saved over 1 hour to 30 days.

Features

  • Subscription And Key Pooling
  • Pools Claude Pro, Max, Team, and Enterprise subscriptions with Console API keys; subscription accounts run through an isolated, unmodified Claude Code process, and bearer or OAuth accounts are supported.
  • Nine Routing Strategies
  • Capacity-weighted by default, with usage-weighted, reset-drain, sequential-drain, round-robin, least-used, fill-first, relative-availability, and single-account modes, all switchable live from Settings without a restart.
  • Usage Reports And Export
  • Date-range reports up to 366 days compare against the previous period, filter by account, key, model, and user agent, chart cost, tokens, requests, and latency, and export CSV.
  • Scheduled Automations
  • Weekday schedules with an IANA time zone and random spread send a tiny prompt through chosen accounts, starting a five-hour quota window before work, with a run history.
  • Dashboard Access Controls
  • Password and optional TOTP sign-in, a read-only guest role, an IP allowlist for the proxy, hashed client keys, Fernet-encrypted upstream credentials, and an append-only audit log of every change.
  • Model Catalog And Pricing
  • A synced model catalog lists per-account availability, context windows, and per-million-token prices, and reroutes models a subscription refuses to other accounts for 12 hours.

Apps Similar to claude-lb