Load-balance your pile of ChatGPT accounts
A proxy that pools multiple ChatGPT accounts, tracks token spend, and exposes a single OpenAI-compatible endpoint.

What it does
codex-lb sits between your AI clients and OpenAI’s API, spreading requests across a pool of ChatGPT accounts. It tracks per-account token burn, cost, and 28-day trends in a built-in dashboard, and presents a single OpenAI-compatible endpoint so tools like the Codex CLI, OpenCode, or the standard Python SDK need no special treatment. Think of it as an API gateway that happens to rotate your logins.
The interesting bit
The granularity of its API-key controls stands out: you can rate-limit individual keys by token count, cost, time window, and even model. It also auto-syncs available models from upstream and supports WebSocket passthrough for Codex streaming, which is more plumbing than most simple proxies bother with.
Key highlights
- Pools multiple ChatGPT accounts with usage tracking (tokens, cost, 28-day trends)
- Per-key rate limits scoped by token spend, cost, window, and model
- Dashboard with password auth and optional TOTP
- OpenAI-compatible endpoints for Codex CLI, OpenCode, OpenClaw, and standard SDKs
- Auto-discovers upstream models and supports WebSocket streaming transport
Caveats
- API key authentication is disabled by default, so remote access requires careful bootstrap setup or local tunneling
- Multi-replica deployments need shared encryption keys for restart recovery, adding operational complexity
- Some client integrations (like Codex WebSockets) rely on experimental or undocumented upstream flags
Verdict
Worth a look if you manage multiple ChatGPT accounts for a team or personal project and need unified billing visibility. Skip it if you already have a single, high-limit enterprise API key and no use for a middleman.
Frequently asked
- What is Soju06/codex-lb?
- A proxy that pools multiple ChatGPT accounts, tracks token spend, and exposes a single OpenAI-compatible endpoint.
- Is codex-lb open source?
- Yes — Soju06/codex-lb is open source, released under the MIT license.
- What language is codex-lb written in?
- Soju06/codex-lb is primarily written in Python.
- How popular is codex-lb?
- Soju06/codex-lb has 2.4k stars on GitHub and is currently cooling off.
- Where can I find codex-lb?
- Soju06/codex-lb is on GitHub at https://github.com/Soju06/codex-lb.