Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

codex-lb

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
dashboard accounts

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
requires_openai_auth = true # required for codex app
Logo Client Endpoint Guide
OpenAI Codex CLI / IDE http://127.0.0.1:2455/backend-api/codex Client setup → Codex CLI
OpenCode (Anomaly) OpenCode http://127.0.0.1:2455/v1 Client setup → OpenCode
OpenClaw OpenClaw http://127.0.0.1:2455/v1 Client setup → OpenClaw
Hermes Agent (Nous Research) Hermes Agent http://127.0.0.1:2455/v1 Client setup → Hermes Agent
Python 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

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):

Soju06
Soju06

💻 ⚠️ 🚧 🚇
Jonas Kamsker
Jonas Kamsker

💻 🐛 🚧
Quack
Quack

💻 🐛 🚧 🎨
Jill Kok, San Mou
Jill Kok, San Mou

💻 ⚠️ 🚧 🐛
PARK CHANYOUNG
PARK CHANYOUNG

📖 💻 ⚠️
Choi138
Choi138

💻 🐛 ⚠️
LYA⚚CAP⚚OCEAN
LYA⚚CAP⚚OCEAN

💻 ⚠️
Eugene Korekin
Eugene Korekin

💻 🐛 ⚠️
jordan
jordan

💻 🐛 ⚠️
DOCaCola
DOCaCola

🐛 ⚠️ 📖
JoeBlack2k
JoeBlack2k

💻 🐛 ⚠️
Peter A.
Peter A.

📖 💻 🐛
Hannah Markfort
Hannah Markfort

💻 ⚠️
mws-weekend-projects
mws-weekend-projects

💻 ⚠️
Quang Do
Quang Do

💻 ⚠️
Anand Aiyer
Anand Aiyer

🐛 💻 ⚠️
defin85
defin85

💻 🐛 ⚠️
Jacky Fong
Jacky Fong

💻 🐛 💬 🚧 ⚠️
flokosti96
flokosti96

💻 ⚠️
Woonggi Min
Woonggi Min

💻 ⚠️
Yigit Konur
Yigit Konur

🐛 💻
Ruben
Ruben

💻 ⚠️ 🐛
Steve Santacroce
Steve Santacroce

💻 ⚠️ 🐛
Hugh Do
Hugh Do

💻 ⚠️
Hubert Salwin
Hubert Salwin

💻 ⚠️
Teemu Koskinen
Teemu Koskinen

📖
Yu Peng Zheng
Yu Peng Zheng

📖 💻
embogomolov
embogomolov

💻 ⚠️
Renat Sharipov
Renat Sharipov

💻 ⚠️
Liu Rui
Liu Rui

📖 💻 ⚠️ 🐛
OverHash
OverHash

💻 ⚠️
Kazet
Kazet

💻 ⚠️
Bala Kumar
Bala Kumar

💻 ⚠️ 🤔
ihazgithub
ihazgithub

💻 ⚠️
Temirkhan
Temirkhan

💻 ⚠️ 📖 🐛
tobwen
tobwen

💻 ⚠️ 🐛
Rio
Rio

💻 🐛 ⚠️
Mika
Mika

💻 📖 ⚠️
Darafei Praliaskouski
Darafei Praliaskouski

💻 📖 ⚠️ 🐛
Maxim Feofilov
Maxim Feofilov

💻 ⚠️
klaascommerce
klaascommerce

💻 ⚠️
JeffKandt
JeffKandt

⚠️ 👀
ozpool
ozpool

🤔 📖 💻 ⚠️
Manu
Manu

⚠️ 👀
Wojtek Majewski
Wojtek Majewski

⚠️
Andrew Noble
Andrew Noble

💻 ⚠️
Josu Gorostegui
Josu Gorostegui

💻 ⚠️
Linus Mixson
Linus Mixson

💻 ⚠️
timefox
timefox

💻 ⚠️
Lotfree
Lotfree

💻 ⚠️ 📖 🐛
hikki
hikki

💻 🎨
Miha Orazem
Miha Orazem

💻 ⚠️
Nikhil
Nikhil

💻 ⚠️
onlysdesign-ui
onlysdesign-ui

💻 ⚠️
Steven (Minh) Dang
Steven (Minh) Dang

📖
Nataprom
Nataprom

💻 ⚠️
Iweisc
Iweisc

💻 ⚠️
Mahir Taha Özdin
Mahir Taha Özdin

🤔 💻 ⚠️
ram/haidar
ram/haidar

💻
Rudra Tiwari
Rudra Tiwari

💻
Wu Chao
Wu Chao

💻
zwd0313
zwd0313

💻
mastertyko
mastertyko

💻 ⚠️
Diógenes Castro
Diógenes Castro

💻 ⚠️
jhordanjw123
jhordanjw123

💻 ⚠️
abarsegov
abarsegov

💻
Akshay Kakatkar
Akshay Kakatkar

💻 ⚠️
NeoClaw
NeoClaw

💻
plastictaste
plastictaste

💻 ⚠️ 📖
softkleenex
softkleenex

💻 ⚠️
n3crosis
n3crosis

💻 ⚠️
geoHeil
geoHeil

💻 ⚠️
copilot
copilot

💻
mercenarioZ
mercenarioZ

💻 ⚠️
Rubén Pérez Bachiller
Rubén Pérez Bachiller

💻 ⚠️ 🐛
Guanwei Chen
Guanwei Chen

💻 ⚠️
Jonáš Sivek
Jonáš Sivek

💻 ⚠️
落叶
落叶

💻 📖 ⚠️ 🌍
jawwadfirdousi
jawwadfirdousi

💻 ⚠️
Quang Do
Quang Do

💻 ⚠️
zvladru
zvladru

💻 ⚠️
Hwanmoo Yong
Hwanmoo Yong

💻 ⚠️
Abdullah Alzeiby
Abdullah Alzeiby

💻 ⚠️
anime girl
anime girl

💻 ⚠️
evaldass
evaldass

💻 ⚠️
Claude
Claude

💻
luawl
luawl

💻 ⚠️
Shawn
Shawn

💻
Hafiy
Hafiy

💻 ⚠️ 📖
Choong Jun Jin
Choong Jun Jin

💻 ⚠️
knightcn1983
knightcn1983

💻 ⚠️
Kevin van Zonneveld
Kevin van Zonneveld

💻
Roman Leventov
Roman Leventov

💻
AliReza Tofighi
AliReza Tofighi

📖
DOMANHDUC
DOMANHDUC

💻
Kwan Perry
Kwan Perry

💻
James
James

💻 ⚠️
SSY
SSY

💻 ⚠️ 📖
Fatih Özbek
Fatih Özbek

💻 ⚠️
Kushida
Kushida

💻 ⚠️
Aidid Haiqal
Aidid Haiqal

💻 ⚠️
yshishenya
yshishenya

💻
alchemistkiv
alchemistkiv

💻 ⚠️
mhooooo
mhooooo

💻 ⚠️
crowscc
crowscc

💻
Syakur Rahman
Syakur Rahman

💻 ⚠️
cigro-manager
cigro-manager

💻
Paul Eipper
Paul Eipper

💻 ⚠️ 📖
ret2basic.eth
ret2basic.eth

💻 ⚠️
유영준
유영준

💻 ⚠️
mrnaturalmonopoly-prog
mrnaturalmonopoly-prog

💻 ⚠️
mrunnaturalmonopoly-svg
mrunnaturalmonopoly-svg

💻 ⚠️
HulianBuligon
HulianBuligon

💻 ⚠️
joschi655
joschi655

💻 ⚠️
daydreamer.jin
daydreamer.jin

💻 ⚠️ 📖
rknightion
rknightion

💻 ⚠️
glopyglerky
glopyglerky

💻 ⚠️
Ahmad Maulana Iqbal
Ahmad Maulana Iqbal

💻 ⚠️
Dvredin
Dvredin

💻
DuyBui
DuyBui

💻 ⚠️
Kevin Lin
Kevin Lin

💻 ⚠️
Borealin
Borealin

💻 ⚠️
Nikita Maximilian Grimm
Nikita Maximilian Grimm

💻 📖 ⚠️
BrenticusMaximus
BrenticusMaximus

💻 ⚠️
Sakthimaran
Sakthimaran

💻 ⚠️
Evan
Evan

💻
Chao Xu
Chao Xu

💻 ⚠️
zenasharp
zenasharp

💻 ⚠️ 📖
HanSu Lee
HanSu Lee

💻 ⚠️
Derek Pearson
Derek Pearson

💻
JustYannicc
JustYannicc

💻 ⚠️ 📖
ygx
ygx

💻 ⚠️
Aarav
Aarav

💻
Evan Haug
Evan Haug

💻 ⚠️
Jason HONG
Jason HONG

💻
Mohammad Saleh Mahdinejad
Mohammad Saleh Mahdinejad

💻 ⚠️ 🐛 📖
Muhammad Ilham Dedi
Muhammad Ilham Dedi

💻 🐛 ⚠️
Victor Statko
Victor Statko

📖
flameboy
flameboy

📖
elmakus
elmakus

💻 ⚠️ 🐛
Abaddollyon
Abaddollyon

💻 ⚠️
Markus Jakl
Markus Jakl

💻 ⚠️ 🐛

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

Metadata

Release files for codex-lb 1.25.0b9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codex-lb 1.25.0b9
File Size Uploaded
codex_lb-1.25.0b9.tar.gz 19.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for codex-lb 1.25.0b9
File Interpreter ABI Platform
codex_lb-1.25.0b9-py3-none-any.whl Python 3 none any Details

Total release size: 22.5 MB

Release files / codex_lb-1.25.0b9.tar.gz

Download URL codex_lb-1.25.0b9.tar.gz
Size 19.4 MB
Tags Source
SHA-256 checksum
How to use checksums
bf690c012c9266608945a652df70da7d6cb53b25350a492627816eb0c77d67bb
BLAKE2b-256 checksum
How to use checksums
40c9eb18e669a8637e3bdab90f7ecb17194997675adc9efe6228e649613fab22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / codex_lb-1.25.0b9-py3-none-any.whl

Download URL codex_lb-1.25.0b9-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b475bfda98bfc663ddbc465a83a60eb28cc0dda223e877eafb5b649ed6331e43
BLAKE2b-256 checksum
How to use checksums
d036db7350dd177db65d7159fea1385e20e414c9bdaf090efccecad8177c1e3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.25.0b9 This release

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.20.1

2 release files

1.19.0

2 release files

1.18.2

2 release files

1.18.1

2 release files

1.18.0

2 release files

1.17.0

2 release files

1.16.0

2 release files

1.15.0

2 release files

1.14.1

2 release files

1.14.0

2 release files

1.13.1

2 release files

1.13.0

2 release files

1.9.0

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page