TokenPool Docs

Configure TokenPool by topic

Short, focused guides for API Keys, base_url values, Codex App, Codex CLI, OpenCode, and CC Switch.

View my API Key

Sign in, reveal your current TokenPool API Key, then copy it into Codex or OpenCode.

Tool Setup

Configure Codex CLI

Install Codex CLI, run the setup script, or write config.toml and auth.json manually.

Last updated 2026-05-12 | Maintained by TokenPool documentation team

Codex CLI is OpenAI's command-line coding tool. TokenPool supports Codex CLI through a TokenPool API Key, an OpenAI-compatible base_url, and the Responses API wire format.

Install Codex CLI

bash
npm install -g @openai/codex

Verify:

bash
codex --version

Automatic setup

macOS / Linux:

bash
TOKENPOOL_API_KEY="<your TokenPool API Key>" \
TOKENPOOL_BASE_URL="https://api.clawto.link" \
bash -c "$(curl -fsSL 'https://cdn.tokenpool.dev/scripts/codex-install-config.sh')"

Windows PowerShell:

powershell
$env:TOKENPOOL_API_KEY='<your TokenPool API Key>'; $env:TOKENPOOL_BASE_URL='https://api.clawto.link'; irm 'https://cdn.tokenpool.dev/scripts/codex-install-config.ps1' | iex

Manual setup

Create ~/.codex/config.toml:

toml
model_provider = "OpenAI"
model = "gpt-5.5"
review_model = "gpt-5.5"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
model_context_window = 1000000
model_auto_compact_token_limit = 900000

[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://api.clawto.link"
wire_api = "responses"
requires_openai_auth = true

Create ~/.codex/auth.json:

json
{
  "OPENAI_API_KEY": "<your TokenPool API Key>"
}

Verify

bash
codex "Reply with one sentence if this configuration works"

If the command succeeds, Codex CLI is using TokenPool for the request.

Common errors

SymptomCheck
Unauthorized requestAPI Key in auth.json may be missing or incomplete
Connection failedbase_url may point to the website instead of the API endpoint
Model not foundLocal model catalog may need the GPT-5.5 fix command
Quota exhaustedCheck balance and usage in the TokenPool console

Related docs

FAQ

Can Codex CLI use a TokenPool API Key?

Yes. Put the TokenPool API Key in ~/.codex/auth.json and configure the TokenPool endpoint in ~/.codex/config.toml.

Which base_url should I use for Codex CLI?

Start with https://api.clawto.link. If your network is more stable with the standard endpoint, use https://api.tokenpool.dev.

Should I store the API Key in config.toml?

No. Keep the API Key in auth.json or an environment variable. Do not commit secrets to Git.