โ† Open Source

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

InfrastructureObservabilityGatewayPython
Momentum
+4stars in 24 hours+0.1%
3.45k
Stars
564
Forks
+21
This week
100
Contributors
Created 2026-01-07 ยท Updated 2026-11-19 ยท #2628 today
Top developers
README

codex-lb

English | ็ฎ€ไฝ“ไธญๆ–‡

Load balancer for ChatGPT accounts. Pool multiple accounts, track usage, manage API keys, view everything in a dashboard.

Documentation: https://soju06.github.io/codex-lb/ โ€” getting started, client setup, configuration, deployment, troubleshooting, and more screenshots.

Features

Account Pooling
Load balance across multiple ChatGPT accounts
Usage Tracking
Per-account tokens, cost, 28-day trends
API Keys
Per-key rate limits by token, cost, window, model
Dashboard Auth
Password + optional TOTP
OpenAI-compatible
Codex CLI, OpenCode, any OpenAI client
Auto Model Sync
Available models fetched from upstream

Quick Start

# Docker (recommended)
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

# or uvx
uvx codex-lb

# or nix
nix run github:Soju06/codex-lb

Open localhost:2455 โ†’ Add account โ†’ Done.

Accessing the dashboard remotely for the first time? You need a one-time bootstrap token โ€” see Getting started.

Client Setup

Point any OpenAI-compatible client at codex-lb. For Codex CLI, ~/.codex/config.toml:

model = "gpt-5.6-sol"
model_reasoning_effort = "xhigh"
model_provider = "codex-lb"

[model_providers.codex-lb]
name = "openai"  # required โ€” enables remote /responses/compact. Lowercase since Codex 2026-05-23; older "OpenAI" stops resolving gpt-5.5
base_url = "http://127.0.0.1:2455/backend-api/codex"
wire_api = "responses"
supports_websockets = true
supports_standalone_web_search = true # requires codex-lb >= 1.22.0
requires_openai_auth = true # required for codex app
Logo Client Endpoint Guide
Codex CLI / IDE http://127.0.0.1:2455/backend-api/codex Client setup โ†’ Codex CLI
OpenCode http://127.0.0.1:2455/v1 Client setup โ†’ OpenCode
OpenClaw http://127.0.0.1:2455/v1 Client setup โ†’ OpenClaw
Hermes Agent http://127.0.0.1:2455/v1 Client setup โ†’ Hermes Agent
OpenAI Python SDK http://127.0.0.1:2455/v1 Client setup โ†’ Python SDK

Remote clients need an API key created from the dashboard.

Configuration

Environment variables with CODEX_LB_ prefix or .env.local โ€” see .env.example and the configuration guide. SQLite is the default database backend; PostgreSQL is optional via CODEX_LB_DATABASE_URL.

Data

Environment Path
Local / uvx ~/.codex-lb/
Docker /var/lib/codex-lb/

Backup this directory to preserve your data.

Documentation

Full docs live at https://soju06.github.io/codex-lb/:

Community companions

Independent projects that consume the dashboard API, maintained outside codex-lb (see the docs listing for access guidance):

  • Codex LB Status Bar โ€” native macOS app: account status, quota details, account controls
  • codex-lb SwiftBar โ€” read-only SwiftBar/Bun monitor for pool status and quota headroom
  • Codex LB Status โ€” read-only Ubuntu tray monitor for pooled quota, account health, reset credits, and update state
  • Codex LB for Omarchy โ€” read-only Linux/Omarchy Quattro bar plugin for account quotas, usage totals, reset times, and optional desktop alerts
  • Codex-LB Rates โ€” Home Assistant integration for pool and per-account quota remaining sensors (5h / weekly / monthly)

Development

# Docker
docker compose watch

# Local
uv sync && cd frontend && bun install && cd ..
uv run codex-lb                              # backend :2455
cd frontend && bun run dev                   # frontend :5173

# Nix
nix run .
nix develop # enter dev environment

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Amin

๐Ÿ’ป

JanPlessow

๐Ÿ’ป

Alessandro Benassi

๐Ÿ’ป

ngallodev

๐Ÿ’ป

Max Kaplan

๐Ÿ’ป

Sezai Enes YILDIZHAN

๐Ÿ’ป

Shuhul

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Soju06

๐Ÿ’ป โš ๏ธ ๐Ÿšง ๐Ÿš‡

Jonas Kamsker

๐Ÿ’ป ๐Ÿ› ๐Ÿšง

Quack

๐Ÿ’ป ๐Ÿ› ๐Ÿšง ๐ŸŽจ

Jill Kok, San Mou

๐Ÿ’ป โš ๏ธ ๐Ÿšง ๐Ÿ›

PARK CHANYOUNG

๐Ÿ“– ๐Ÿ’ป โš ๏ธ

Choi138

๐Ÿ’ป ๐Ÿ› โš ๏ธ

LYAโššCAPโššOCEAN

๐Ÿ’ป โš ๏ธ

Eugene Korekin

๐Ÿ’ป ๐Ÿ› โš ๏ธ

jordan

๐Ÿ’ป ๐Ÿ› โš ๏ธ

DOCaCola

๐Ÿ› โš ๏ธ ๐Ÿ“–

JoeBlack2k

๐Ÿ’ป ๐Ÿ› โš ๏ธ

Peter A.

๐Ÿ“– ๐Ÿ’ป ๐Ÿ›

Hannah Markfort

๐Ÿ’ป โš ๏ธ

mws-weekend-projects

๐Ÿ’ป โš ๏ธ

Quang Do

๐Ÿ’ป โš ๏ธ

Anand Aiyer

๐Ÿ› ๐Ÿ’ป โš ๏ธ

defin85

๐Ÿ’ป ๐Ÿ› โš ๏ธ

Jacky Fong

๐Ÿ’ป ๐Ÿ› ๐Ÿ’ฌ ๐Ÿšง โš ๏ธ

flokosti96

๐Ÿ’ป โš ๏ธ

Woonggi Min

๐Ÿ’ป โš ๏ธ

Yigit Konur

๐Ÿ› ๐Ÿ’ป

Ruben

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Steve Santacroce

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Hugh Do

๐Ÿ’ป โš ๏ธ

Hubert Salwin

๐Ÿ’ป โš ๏ธ

Teemu Koskinen

๐Ÿ“–

Yu Peng Zheng

๐Ÿ“– ๐Ÿ’ป

embogomolov

๐Ÿ’ป โš ๏ธ

Renat Sharipov

๐Ÿ’ป โš ๏ธ

Liu Rui

๐Ÿ“– ๐Ÿ’ป โš ๏ธ ๐Ÿ›

OverHash

๐Ÿ’ป โš ๏ธ

Kazet

๐Ÿ’ป โš ๏ธ

Bala Kumar

๐Ÿ’ป โš ๏ธ ๐Ÿค”

ihazgithub

๐Ÿ’ป โš ๏ธ

Temirkhan

๐Ÿ’ป โš ๏ธ ๐Ÿ“– ๐Ÿ›

tobwen

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Rio

๐Ÿ’ป ๐Ÿ› โš ๏ธ

Mika

๐Ÿ’ป ๐Ÿ“– โš ๏ธ

Darafei Praliaskouski

๐Ÿ’ป ๐Ÿ“– โš ๏ธ ๐Ÿ›

Maxim Feofilov

๐Ÿ’ป โš ๏ธ

klaascommerce

๐Ÿ’ป โš ๏ธ

JeffKandt

โš ๏ธ ๐Ÿ‘€

ozpool

๐Ÿค” ๐Ÿ“– ๐Ÿ’ป โš ๏ธ

Manu

โš ๏ธ ๐Ÿ‘€

Wojtek Majewski

โš ๏ธ

Andrew Noble

๐Ÿ’ป โš ๏ธ

Josu Gorostegui

๐Ÿ’ป โš ๏ธ

Linus Mixson

๐Ÿ’ป โš ๏ธ

timefox

๐Ÿ’ป โš ๏ธ

Lotfree

๐Ÿ’ป โš ๏ธ ๐Ÿ“– ๐Ÿ›

hikki

๐Ÿ’ป ๐ŸŽจ

Miha Orazem

๐Ÿ’ป โš ๏ธ

Nikhil

๐Ÿ’ป โš ๏ธ

onlysdesign-ui

๐Ÿ’ป โš ๏ธ

Steven (Minh) Dang

๐Ÿ“–

Nataprom

๐Ÿ’ป โš ๏ธ

Iweisc

๐Ÿ’ป โš ๏ธ

Mahir Taha ร–zdin

๐Ÿค” ๐Ÿ’ป โš ๏ธ

ram/haidar

๐Ÿ’ป

Rudra Tiwari

๐Ÿ’ป

Wu Chao

๐Ÿ’ป

zwd0313

๐Ÿ’ป

mastertyko

๐Ÿ’ป โš ๏ธ

Diรณgenes Castro

๐Ÿ’ป โš ๏ธ

jhordanjw123

๐Ÿ’ป โš ๏ธ

abarsegov

๐Ÿ’ป

Akshay Kakatkar

๐Ÿ’ป โš ๏ธ

NeoClaw

๐Ÿ’ป

plastictaste

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

softkleenex

๐Ÿ’ป โš ๏ธ

n3crosis

๐Ÿ’ป โš ๏ธ

geoHeil

๐Ÿ’ป โš ๏ธ

copilot

๐Ÿ’ป

mercenarioZ

๐Ÿ’ป โš ๏ธ

Rubรฉn Pรฉrez Bachiller

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Guanwei Chen

๐Ÿ’ป โš ๏ธ

Jonรกลก Sivek

๐Ÿ’ป โš ๏ธ

่ฝๅถ

๐Ÿ’ป ๐Ÿ“– โš ๏ธ ๐ŸŒ

jawwadfirdousi

๐Ÿ’ป โš ๏ธ

Quang Do

๐Ÿ’ป โš ๏ธ

zvladru

๐Ÿ’ป โš ๏ธ

Hwanmoo Yong

๐Ÿ’ป โš ๏ธ

Abdullah Alzeiby

๐Ÿ’ป โš ๏ธ

anime girl

๐Ÿ’ป โš ๏ธ

evaldass

๐Ÿ’ป โš ๏ธ

Claude

๐Ÿ’ป

luawl

๐Ÿ’ป โš ๏ธ

Shawn

๐Ÿ’ป

Hafiy

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Choong Jun Jin

๐Ÿ’ป โš ๏ธ

knightcn1983

๐Ÿ’ป โš ๏ธ

Kevin van Zonneveld

๐Ÿ’ป

Roman Leventov

๐Ÿ’ป

AliReza Tofighi

๐Ÿ“–

DOMANHDUC

๐Ÿ’ป

Kwan Perry

๐Ÿ’ป

James

๐Ÿ’ป โš ๏ธ

SSY

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

monsterlag

๐Ÿ’ป

Fatih ร–zbek

๐Ÿ’ป โš ๏ธ

Kushida

๐Ÿ’ป โš ๏ธ

Aidid Haiqal

๐Ÿ’ป โš ๏ธ

yshishenya

๐Ÿ’ป

alchemistkiv

๐Ÿ’ป โš ๏ธ

mhooooo

๐Ÿ’ป โš ๏ธ

crowscc

๐Ÿ’ป

Syakur Rahman

๐Ÿ’ป โš ๏ธ

cigro-manager

๐Ÿ’ป

Paul Eipper

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

ret2basic.eth

๐Ÿ’ป โš ๏ธ

์œ ์˜์ค€

๐Ÿ’ป โš ๏ธ

mrnaturalmonopoly-prog

๐Ÿ’ป โš ๏ธ

mrunnaturalmonopoly-svg

๐Ÿ’ป โš ๏ธ

HulianBuligon

๐Ÿ’ป โš ๏ธ

joschi655

๐Ÿ’ป โš ๏ธ

daydreamer.jin

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

rknightion

๐Ÿ’ป โš ๏ธ

glopyglerky

๐Ÿ’ป โš ๏ธ

Ahmad Maulana Iqbal

๐Ÿ’ป โš ๏ธ

Dvredin

๐Ÿ’ป

DuyBui

๐Ÿ’ป โš ๏ธ

Kevin Lin

๐Ÿ’ป โš ๏ธ

Borealin

๐Ÿ’ป โš ๏ธ

Nikita Maximilian Grimm

๐Ÿ’ป ๐Ÿ“– โš ๏ธ

BrenticusMaximus

๐Ÿ’ป โš ๏ธ

Sakthimaran

๐Ÿ’ป โš ๏ธ

Evan

๐Ÿ’ป

Chao Xu

๐Ÿ’ป โš ๏ธ

zenasharp

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

HanSu Lee

๐Ÿ’ป โš ๏ธ

Derek Pearson

๐Ÿ’ป

JustYannicc

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

ygx

๐Ÿ’ป โš ๏ธ

Mustafa J

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Aarav

๐Ÿ’ป

Evan Haug

๐Ÿ’ป โš ๏ธ

Jason HONG

๐Ÿ’ป

kostazol

๐Ÿ’ป โš ๏ธ

Mohammad Saleh Mahdinejad

๐Ÿ’ป โš ๏ธ ๐Ÿ› ๐Ÿ“–

Muhammad Ilham Dedi

๐Ÿ’ป ๐Ÿ› โš ๏ธ

phuongdung160114-ux

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Victor Statko

๐Ÿ“–

Nohj

๐Ÿ’ป ๐Ÿ› โš ๏ธ

flameboy

๐Ÿ“–

elmakus

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Abaddollyon

๐Ÿ’ป โš ๏ธ

Markus Jakl

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Felix Cake

๐Ÿ’ป

Tsury

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Uniskela

๐Ÿ“–

nhdong1993

๐Ÿ’ป

Vincent Dev

๐Ÿ’ป

Younes Beriane

๐Ÿ’ป

โƒŸ

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Justike001

๐Ÿ’ป โš ๏ธ

justikeVoltage

๐Ÿ’ป

alinne

๐Ÿ’ป

Hao-Liang Wen

๐Ÿ’ป โš ๏ธ

SantaDiegoKairos

๐Ÿ’ป

Smit Patel

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

hanmin6

๐Ÿ“– ๐Ÿ’ป โš ๏ธ

This project follows the all-contributors specification. Contributions of any kind welcome!

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store