codex-lb — What is it?

Codex/ChatGPT multiple account load balancer & proxy with usage tracking, dashboard, and OpenCode-compatible endpoints.

⭐ 2,254 Stars 🍴 347 Forks Python MIT Author: Soju06
Source: Official README and linked documentation View on GitHub →

Why it matters

This project is being discussed because its ability to manage multiple ChatGPT accounts efficiently, track usage, and integrate with various OpenAI-compatible clients. Its unique feature of OpenCode compatibility and a broad dashboard for monitoring and managing accounts sets it apart.

Source: Official README and linked documentation

Core Features

Account Pooling

Balances requests across multiple ChatGPT accounts, ensuring even usage and preventing any single account from being overwhelmed.

Source: Official README and linked documentation
Usage Tracking

Monitors and tracks per-account tokens, costs, and usage trends over 28 days, providing insights into resource consumption.

Source: Official README and linked documentation
API Keys

Enables per-key rate limits by token, cost, window, and model, ensuring that API usage is controlled and optimized.

Source: Official README and linked documentation
Dashboard Auth

Supports authentication via password and optional TOTP for secure access to the dashboard.

Source: Official README and linked documentation
OpenAI-compatible

Integrates with Codex CLI, OpenCode, and other OpenAI clients, allowing direct interaction with the load balancer.

Source: Official README and linked documentation
Auto Model Sync

Automatically fetches available models from the upstream source, ensuring that the latest models are always available.

Source: Official README and linked documentation

Architecture

The architecture is modular, with clear separation of concerns. It includes a load balancer module, usage tracking module, and a dashboard for user interaction. The codebase is structured into various subdirectories, indicating a focus on maintainability and scalability. The use of FastAPI for the backend and Rust for certain components suggests a blend of Python's ease of use with Rust's performance and safety.

Source: Official repository tree and dependency files

Project Knowledge Graph

Knowledge graph: project (center) + core features (inner hexagons) + key dependencies (outer chips) aiohttp anyio alembic aiosqlite asyncpg Account Pooling Usage Tracking API Keys Dashboard Auth OpenAI-compatible Auto Model Sync codex-lb Project Core feature Key dependency

Tech Stack

LanguagePythonFrameworkFastAPI
aiohttpanyioalembicaiosqliteasyncpgbcryptcryptographyfastapigreenletmakopydanticpyjwtpython-sockspyotppython-dotenvpython-multipartpsycopg
Docker
Source: Official repository tree and dependency files

Quick Start

docker volume create codex-lb-data docker network inspect codex-lb-net >/dev/null 2>&1 || docker network create codex-lb-net docker run -d --name codex-lb --network codex-lb-net -p 2455:2455 -p 1455:1455 -v codex-lb-data:/var/lib/codex-lb ghcr.io/soju06/codex-lb:latest
Source: Official README and linked documentation

Use Cases

This project is suitable for developers and technical teams that require efficient management of multiple ChatGPT accounts, especially those working with OpenAI-compatible tools and needing detailed usage tracking and control over API keys.

Source: Official README and linked documentation

Strengths & Limitations

Strengths

  • broad management of ChatGPT accounts with detailed usage tracking.
  • OpenCode compatibility allows integration with a wide range of OpenAI clients.
  • Modular architecture supports scalability and maintainability.

Limitations

  • Being in an alpha stage, it may have stability issues and limited features compared to fully-fledged solutions.
  • The project's documentation could be more extensive to assist new users.
Source: Official README and linked documentation

Latest Release

When checking 2026-09-23, the latest stable version is v1.24.0; v1.25.0-beta.9 is a pre-release version released on 2026-09-14 and cannot be confused with the stable version. main The current pyproject is still 1.25.0-beta.9 and contains subsequent commits, so the deployment should be fixed release tag or container digest.

Source: github.com/Soju06/codex-lb/releases;https://github.com/Soju06/codex-l…

Verification and evidence

status: docs-only  |  checked_at: 2026-09-23  |  environment: Read the official README, stable and beta Releases, Getting Started, Authentication, API Keys, Routing, Remote Access, Telemetry, Configuration, pyproject and license; shallow clone main commit 3d23d53. The agent is not started.  |  limitations: No local installation or runtime verification was performed. OAuth import, encryption key, routing correctness, cross-account continuity, API compatibility, content retention, telemetry, database migration, reverse proxy, crash recovery, Kubernetes, or upstream account disposition not verified.  |  observed_output: The latest stable version is v1.24.0, and the latest pre-release is v1.25.0-beta.9; the main pyproject is marked as beta.9 and requires Python 3.13. The documentation explains that the API key auth is turned off by default, remote requests need to be authenticated, telemetry adopts opt-out, and the server retention period is not specified.

Source: github.com/Soju06/codex-lb;https://github.com/Soju06/codex-lb/release…

Comparison

Compared to Codex Switcher, codex-lb is a long-running web proxy: it allows multiple clients to consume account pools via local API keys and save more complete request, routing, and cost status. Codex Switcher is a standalone desktop switch, the core action is to replace ~/.codex/auth.json. As long as I manually cut off the account, the network surface of the desktop switcher is smaller; when a centralized agent is required, codex-lb is considered, and it is operated and maintained by a highly sensitive identity service.

Source: github.com/Soju06/codex-lb;https://github.com/Lampese/codex-switcher

Verdict

Codex/ChatGPT Load Balancer is a project for those needing advanced management of ChatGPT accounts. Its unique features and modular architecture make it a option for teams looking to optimize their OpenAI usage. However, its alpha status suggests that it may not be fully ready for production environments.

Frequently Asked Questions

What did the documentation review verify for codex-lb on 2026-09-23?

The latest stable version is v1.24.0, and the latest pre-release is v1.25.0-beta.9; the main pyproject is marked as beta.9 and requires Python 3.13.

What evidence boundary applies to this codex-lb review?

The review environment was: Read the official README, stable and beta Releases, Getting Started, Authentication, API Keys, Routing, Remote Access, Telemetry, Configuration, pyproject and license; shallow clone main commit 3d23d53. The agent is not started. codex-lb behavior outside that scope still needs a local check.

Sources and review scope
This review is based on the project's public documentation. Versions, installation commands, and feature boundaries can change upstream; check the cited sources and current release before use. Sources checked on: 2026-09-23 13:55.

Reference materials: README, GitHub API, dependency files