Skip to main content

Codex load balancer and proxy for ChatGPT accounts with usage dashboard

Project description

codex-lb

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

Screenshots

Main Dashboard View

main dashboard view

Accounts View

Accounts list and details

Quick Start

Docker

docker run -d --name codex-lb \
  -p 2455:2455 -p 1455:1455 \
  -v ~/.codex-lb:/var/lib/codex-lb \
  ghcr.io/soju06/codex-lb:latest

uvx

uvx codex-lb

Open localhost:2455 → Add account → Done.

Codex CLI & Extension Setup

Add to ~/.codex/config.toml:

model = "gpt-5.2-codex"
model_reasoning_effort = "xhigh"
model_provider = "codex-lb"

[model_providers.codex-lb]
name = "OpenAI"  # MUST be "OpenAI" - enables /compact endpoint
base_url = "http://127.0.0.1:2455/backend-api/codex"
wire_api = "responses"
chatgpt_base_url = "http://127.0.0.1:2455"
requires_openai_auth = true  # Required: enables model selection in Codex IDE extension

OpenCode Setup

Run:

opencode auth login

Then select OpenAI -> Manually enter API Key and enter any value.

Add the following to ~/.config/opencode/opencode.json:

{
  ...
  "provider": {
    "openai": {
      "options": {
        "baseURL": "http://127.0.0.1:2455/v1"
      }
    },
    ...
  }
}

Data

All data stored in ~/.codex-lb/:

  • store.db – accounts, usage logs
  • encryption.key – encrypts tokens (auto-generated)

Backup this directory to preserve your accounts.

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

📖

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_lb-0.5.0.tar.gz (744.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_lb-0.5.0-py3-none-any.whl (126.4 kB view details)

Uploaded Python 3

File details

Details for the file codex_lb-0.5.0.tar.gz.

File metadata

  • Download URL: codex_lb-0.5.0.tar.gz
  • Upload date:
  • Size: 744.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_lb-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a613eee0fee2f6a9ad42bf15368fd42256cdb84146a0df5c514542baf5f0720e
MD5 bb0fc6ee769f58f6b46b93e3d38b1bbb
BLAKE2b-256 ec1f03d198fefb71f3f7637abab57796d4cb628d103cb5800889cc82255e5e13

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_lb-0.5.0.tar.gz:

Publisher: release.yml on Soju06/codex-lb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codex_lb-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: codex_lb-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 126.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_lb-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 730fd8a3f10936fdc8c91d2b4767172821da9b2a9c5bf7bbb46fd2e4f953791a
MD5 d20aa737de73fb1ad2374bc1e7a4ce8c
BLAKE2b-256 8b66da1192efaac0df391acb5e48140e772b95d581b9687e3c7febc66c96f4f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_lb-0.5.0-py3-none-any.whl:

Publisher: release.yml on Soju06/codex-lb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page