CodexUse logo CodexUse Download
Home Docs Accounts Pool

Accounts Pool

Accounts Pool is the CodexUse Pro feature that turns selected saved Codex accounts into one local API for another OpenAI-compatible app.

Last updated: 2026-04-03 Pro Local API
What it does: give another app one base URL and one key, while CodexUse shares quota across the selected accounts, load-balances fresh requests, and fails over when one account runs into trouble.

Five-minute setup

  1. Open Settings → Accounts Pool or use codexuse account-pool status.
  2. Enable the pool.
  3. Select the profiles you want available to the pool.
  4. Choose how new requests should be routed.
  5. Generate a local API key for the runtime that will serve the client.

CodexUse shows the current base URL in Settings, and the CLI can inspect the same setup. Keep the exact base URL and runtime-specific key together when connecting a client.

Connect a local client

Accounts Pool is for apps and tools that already speak the OpenAI Responses API shape. Typical examples: scripts, editor extensions, local agent runners, and desktop apps that want one base URL, one key, and more total headroom than a single account can provide.

curl http://127.0.0.1:PORT/v1/models \
  -H "Authorization: Bearer cux_pool_..."
curl http://127.0.0.1:PORT/v1/responses \
  -H "Authorization: Bearer cux_pool_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "input": "Summarize what changed in this repository."
  }'
Local-first: this is designed as a loopback endpoint on your machine, not a hosted shared proxy.

Manage it from the CLI Pro

You can manage the same Accounts Pool settings from the terminal without opening the desktop app.

codexuse account-pool status
codexuse account-pool enable
codexuse account-pool profiles list
codexuse account-pool keys create
codexuse account-pool keys create --runtime=daemon
codexuse account-pool sessions list
One settings owner, separate runtime stores: desktop and daemon share the same pool settings on the same machine, but API keys and live sessions are runtime-specific because each runtime keeps its own pool store. Use the plain key command for the desktop runtime and --runtime=daemon for a headless daemon URL.

Daemon runtime

If you want the pool on a headless server or SSH session, run the CodexUse daemon and pin the port so the client keeps one stable loopback URL.

codexuse daemon start --port=3773
codexuse account-pool status --runtime=daemon --port=3773
codexuse account-pool keys create --runtime=daemon
  • Requires Bun on PATH because the bundled Projects server runs on Bun.
  • Use --runtime=daemon when you inspect or create keys for the headless daemon.
  • Desktop keys will not work against the daemon URL, and daemon keys will not work against the desktop URL.
  • If you also want Telegram remote control, add --telegram-bot-token to the same daemon start command.

Choose the model names your client will see

You choose which model IDs the pool exposes. If you want simpler setup on the other side, CodexUse can also publish aliases that keep a preferred reasoning level or speed bias behind one easier public name.

Base models

Expose the upstream model IDs you want local clients to see on /v1/models.

Reasoning aliases

Publish simpler public names that keep a preferred reasoning level behind the scenes.

Fast-mode variants

Optionally expose speed-biased variants for clients that should stay quick by default.

How routing works

New pooled sessions can start on any eligible selected profile. That gives the pool a way to spread fresh work across the accounts you selected instead of burning through one account first. After a session starts, CodexUse keeps it on that account unless a rollover is needed.

  • Least used: prefer the eligible profile with the most breathing room right now.
  • Round robin: spread new sessions more evenly across the selected pool.
  • Session continuity: once a pooled session exists, later turns stay with it unless a rollover is needed.

What happens when one account runs out

If a selected account hits quota, a rate limit, an auth problem, or a runtime failure, Accounts Pool can move that logical session to another eligible profile and continue there. That is the practical upside of pooling: more shared headroom, smoother load distribution, and fewer hard stops for the client.

Important: bad requests are still returned as errors. The pool helps with account availability, not with unsupported or malformed input.

What this will not fix

Accounts Pool helps when you truly have multiple eligible accounts to route across. If two saved profiles are really the same underlying OpenAI account, they still share the same headroom. The pool can organize that setup, but it cannot invent extra quota.

Good fits

Local agent tools

Give a local tool one API while CodexUse shares quota across the accounts behind it.

One-machine automation

Keep helper scripts on the same laptop while CodexUse load-balances new work across eligible profiles.

Safer failover

Keep longer response workflows alive when one account runs out or temporarily fails.