Users can install Codex CLI, Claude Code CLI, or the codexclaude launcher.
Documentation and prospectus
Hosted Codex CLI and Claude Code access, wallet billing, and dashboards in one system.
CodexAPI.pro is a hosted provider layer for the official OpenAI Codex CLI and Claude Code CLI. The customer keeps the coding tool local on their own machine, while this service supplies API endpoints, wallet-linked credentials, usage billing, Stripe top-ups, generated startup commands, and admin tooling for support and marketplace delivery.
Codex uses Responses compatibility while Claude Code uses the hosted messages route.
Input and output token usage deducts from the user's saved wallet.
Users resume projects through Codex's normal local session history.
System overview
What CodexAPI.pro is
CodexAPI.pro is not a replacement for local coding tools. It is a hosted compatibility, account, and billing layer that lets customers run the official OpenAI Codex CLI or Claude Code CLI with one wallet-backed account. The local CLI still handles the terminal experience, project files, local history, approvals, and resume behavior. CodexAPI.pro handles account creation, key delivery, model routing, usage metering, wallet deduction, Stripe top-ups, support visibility, and API docs.
The primary Codex compatibility path is the public Codex CLI provider shape: `GET /v1/models` and `POST /v1/responses`. Claude Code uses the hosted Claude-compatible messages route from the same Token Wallet. In both CLI modes, the user's local Codex or Claude client remains the agent harness: tool execution, file reads, file writes, and project directory access happen on the user's machine, not inside a CodexAPI.pro cloud VM. Hosted project workspace APIs are separate optional endpoints for web-app integrations. The platform also keeps a broader Codex app-server mental model for richer agent workflows: threads, turns, items, streaming events, approvals, and project-aware resume.
Who the service is for
Developers
Install Codex CLI or Claude Code CLI, copy one generated command, and start coding with wallet-backed API access.
Marketplace buyers
Receive a ready-made dashboard login plus commands that already include the correct API username/token.
Administrators
Create accounts, manage credits, simulate customers, inspect usage, approve pending signups, and tune service provider routing.
Component map
How Codex and Claude requests flow
Codex CLI flow
- The user installs `@openai/codex@latest` and opens the dashboard.
- The dashboard displays a wallet-linked username/token and generated provider commands.
- The user runs the one-time OS setup command, which writes CodexAPI.pro and the wallet username into Codex's normal config file and starts `codex --search`.
- Future sessions can start with `codex`, `codex --search`, or `codex resume --search` without repeating API setup.
- Codex calls `https://codexapi.pro/v1/models` for model discovery and `https://codexapi.pro/v1/responses` for work.
- The model response comes from the hosted API, but Codex executes shell commands and file edits in the local project directory where the user launched the CLI.
- The backend validates the bearer value, chooses the configured provider, forwards the request, streams the result, records token usage, and deducts wallet credit.
- The dashboard updates balance and usage history so the user can top up without changing their Codex settings.
Claude Code CLI flow
- The user chooses Claude Code CLI at the top of the dashboard.
- The dashboard changes the visible next-session model to Opus 4.8 and reveals Claude-specific setup commands.
- The user installs Claude Code with
npm install -g @anthropic-ai/claude-code@latest. - The one-time setup command writes
~/.claude/settings.jsonon Linux/macOS or%USERPROFILE%\.claude\settings.jsonon Windows. - The setup points Claude Code at CodexAPI.pro, stores the user's CodexAPI.pro username as
ANTHROPIC_AUTH_TOKENin Claude settings and the shell environment, keepsANTHROPIC_API_KEYas a compatibility fallback, and enables a root-compatible no-prompt permission mode. - Claude Code sends Anthropic-compatible Messages API traffic to CodexAPI.pro. The backend validates the same wallet username/token, proxies the request, records token usage, and deducts the same Token Wallet.
- Future Claude sessions can start with
claude --permission-mode dontAsk --allowedTools Bash. Resume usesclaude -cfor continue andclaude -rfor Claude Code's resume picker.
Customer setup
Customers should start in the dashboard because the dashboard inserts the exact API username into every command. The first visible setup block asks the customer to choose Codex CLI or Claude Code CLI. That selection changes the install command, setup commands, model label, resume examples, and smoke-test commands shown underneath.
Official Codex CLI setup
Choose Codex CLI when the customer wants to use the public OpenAI Codex CLI locally with CodexAPI.pro as the saved Responses provider. The dashboard command writes CodexAPI.pro into Codex's normal configuration file, saves the wallet username as the bearer token, sets medium reasoning, and starts Codex with search. Generic Linux or WSL shape:
npm install -g @openai/codex@latest
CODEX_HOME_DIR="$HOME/.codex"
CONFIG_PATH="$CODEX_HOME_DIR/config.toml"
mkdir -p "$CODEX_HOME_DIR" 2>/dev/null || true
if [ -e "$CODEX_HOME_DIR" ] && [ ! -w "$CODEX_HOME_DIR" ]; then
sudo chown -R "$(id -u):$(id -g)" "$CODEX_HOME_DIR"
fi
if [ -e "$CONFIG_PATH" ] && [ ! -w "$CONFIG_PATH" ]; then
sudo chown "$(id -u):$(id -g)" "$CONFIG_PATH"
fi
mkdir -p "$CODEX_HOME_DIR"
cat > "$CONFIG_PATH" <<'TOML'
model = "gpt-5.5"
preferred_auth_method = "apikey"
model_provider = "codexapi"
model_reasoning_effort = "medium"
approval_policy = "never"
sandbox_mode = "danger-full-access"
[model_providers.codexapi]
name = "CodexAPI.pro"
base_url = "https://codexapi.pro/v1"
experimental_bearer_token = "your_codexapi_username"
wire_api = "responses"
supports_websockets = false
TOML
codex --search
Resume uses Codex's local history. After the first setup writes
~/.codex/config.toml, the user can return later with
codex, codex --search, or
codex resume --search.
Claude Code CLI setup
Choose Claude Code CLI when the customer wants to
spend the same CodexAPI.pro Token Wallet through Claude Code. The
dashboard switches the visible model to Opus 4.8,
displays the Claude npm install command, and reveals Linux/WSL,
macOS, Windows PowerShell, future-start, resume, and smoke-test
commands generated from /api/v1/cli/public-claude-code.
The official Claude Code install command is:
npm install -g @anthropic-ai/claude-code@latest
Generic Linux or WSL setup shape. Notice that this writes and runs
a child script in /tmp; that keeps setup errors from
closing the user's active SSH shell while still opening Claude Code
in the same terminal when setup succeeds. It writes both Claude's
settings file and a managed shell-profile environment block, because
Claude Code's gateway mode expects ANTHROPIC_AUTH_TOKEN
in the terminal environment before it skips the login picker. It also
clears local Claude auth files and installs the latest Claude Code build. It uses
dontAsk with explicit coding tools, which works under root as well as
normal SSH users. The setup command runs a bounded non-interactive smoke test and then returns to the shell:
SETUP_SCRIPT="$(mktemp /tmp/codexapi-claude-setup.XXXXXX.sh)"
cat > "$SETUP_SCRIPT" <<'SH'
#!/usr/bin/env bash
set -e
SUDO=""
if command -v sudo >/dev/null 2>&1; then SUDO="sudo"; fi
if ! command -v npm >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
$SUDO apt-get update
$SUDO apt-get install -y ca-certificates curl gnupg
if [ -n "$SUDO" ]; then
curl -fsSL https://deb.nodesource.com/setup_22.x | $SUDO -E bash -
else
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
fi
$SUDO apt-get install -y nodejs git
else
echo "Install Node.js LTS and npm first, then rerun this block. Your SSH session is still open." >&2
exit 1
fi
fi
CLAUDE_HOME_DIR="$HOME/.claude"
mkdir -p "$CLAUDE_HOME_DIR"
rm -f "$CLAUDE_HOME_DIR/.credentials.json" "$CLAUDE_HOME_DIR/credentials.json" "$CLAUDE_HOME_DIR/auth.json" "$CLAUDE_HOME_DIR/oauth.json" "$CLAUDE_HOME_DIR/cache/gateway-models.json"
if ! npm install -g @anthropic-ai/claude-code@latest; then
if [ -n "$SUDO" ]; then
$SUDO npm install -g @anthropic-ai/claude-code@latest
else
echo "Claude Code npm install failed. Fix npm global permissions and rerun. Your SSH session is still open." >&2
exit 1
fi
fi
CLAUDE_HOME_DIR="$HOME/.claude"
SETTINGS_PATH="$CLAUDE_HOME_DIR/settings.json"
mkdir -p "$CLAUDE_HOME_DIR"
if [ -f "$SETTINGS_PATH" ]; then
cp "$SETTINGS_PATH" "$SETTINGS_PATH.backup.$(date +%Y%m%d%H%M%S)"
fi
cat > "$SETTINGS_PATH" <<'JSON'
{
"permissions": {
"defaultMode": "dontAsk"
},
"env": {
"ANTHROPIC_BASE_URL": "https://codexapi.pro",
"ANTHROPIC_AUTH_TOKEN": "your_codexapi_username",
"ANTHROPIC_API_KEY": "your_codexapi_username",
"ANTHROPIC_MODEL": "claude-opus-4-8",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}
JSON
write_codexapi_claude_env() {
PROFILE_FILE="$1"
touch "$PROFILE_FILE"
sed -i.bak '/# BEGIN CODEXAPI_PRO_CLAUDE/,/# END CODEXAPI_PRO_CLAUDE/d' "$PROFILE_FILE" 2>/dev/null || true
cat >> "$PROFILE_FILE" <<'ENV'
# BEGIN CODEXAPI_PRO_CLAUDE
export ANTHROPIC_BASE_URL='https://codexapi.pro'
export ANTHROPIC_AUTH_TOKEN='your_codexapi_username'
export ANTHROPIC_API_KEY='your_codexapi_username'
export ANTHROPIC_MODEL='claude-opus-4-8'
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8'
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
# END CODEXAPI_PRO_CLAUDE
ENV
}
write_codexapi_claude_env "$HOME/.bashrc"
write_codexapi_claude_env "$HOME/.profile"
export ANTHROPIC_BASE_URL='https://codexapi.pro'
export ANTHROPIC_AUTH_TOKEN='your_codexapi_username'
export ANTHROPIC_API_KEY='your_codexapi_username'
export ANTHROPIC_MODEL='claude-opus-4-8'
export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8'
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
echo "CodexAPI.pro Claude environment saved to ~/.bashrc and ~/.profile."
echo "Running a short non-interactive smoke test. This will return to your shell."
SMOKE_OUTPUT="$(mktemp /tmp/codexapi-claude-smoke.XXXXXX.txt)"
if command -v timeout >/dev/null 2>&1; then
timeout 180s claude --permission-mode dontAsk --allowedTools Bash -p "Reply exactly: CodexAPI.pro Claude Code ready." >"$SMOKE_OUTPUT" 2>&1 || echo "Claude smoke test did not complete. Start manually with: claude --permission-mode dontAsk --allowedTools Bash"
else
claude --permission-mode dontAsk --allowedTools Bash -p "Reply exactly: CodexAPI.pro Claude Code ready." >"$SMOKE_OUTPUT" 2>&1 || echo "Claude smoke test did not complete. Start manually with: claude --permission-mode dontAsk --allowedTools Bash"
fi
cat "$SMOKE_OUTPUT" 2>/dev/null || true
rm -f "$SMOKE_OUTPUT"
echo "Setup complete. Start Claude Code with: claude --permission-mode dontAsk --allowedTools Bash"
SH
bash "$SETUP_SCRIPT"
Generic macOS setup is the same once Node.js and npm are available.
The dashboard version can also install Homebrew dependencies first
when needed, then writes the same ~/.claude/settings.json
structure, saves the same API environment to the user's shell
profiles, and starts Claude in the root-compatible no-prompt
permission mode.
Generic Windows PowerShell setup shape:
$ErrorActionPreference = "Stop"
$ClaudeHome = "$env:USERPROFILE\.claude"
$SettingsPath = Join-Path $ClaudeHome "settings.json"
New-Item -ItemType Directory -Force -Path $ClaudeHome | Out-Null
Remove-Item -Force -ErrorAction SilentlyContinue "$ClaudeHome\.credentials.json", "$ClaudeHome\credentials.json", "$ClaudeHome\auth.json", "$ClaudeHome\oauth.json", "$ClaudeHome\cache\gateway-models.json"
npm install -g @anthropic-ai/claude-code@latest
if (Test-Path $SettingsPath) {
Copy-Item $SettingsPath "$SettingsPath.backup.$((Get-Date).ToString('yyyyMMddHHmmss'))" -Force
}
@'
{
"permissions": {
"defaultMode": "dontAsk"
},
"env": {
"ANTHROPIC_BASE_URL": "https://codexapi.pro",
"ANTHROPIC_AUTH_TOKEN": "your_codexapi_username",
"ANTHROPIC_API_KEY": "your_codexapi_username",
"ANTHROPIC_MODEL": "claude-opus-4-8",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}
'@ | Set-Content -Path $SettingsPath -Encoding utf8
$env:ANTHROPIC_BASE_URL = "https://codexapi.pro"
$env:ANTHROPIC_AUTH_TOKEN = "your_codexapi_username"
$env:ANTHROPIC_API_KEY = "your_codexapi_username"
$env:ANTHROPIC_MODEL = "claude-opus-4-8"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL = "claude-opus-4-8"
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://codexapi.pro", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "your_codexapi_username", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your_codexapi_username", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL", "claude-opus-4-8", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_OPUS_MODEL", "claude-opus-4-8", "User")
[Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "1", "User")
Write-Host "Setup complete. Start Claude Code with: claude --permission-mode dontAsk --allowedTools Bash"
After the first setup, the customer does not need to paste API
details again. The setup stores ANTHROPIC_BASE_URL,
ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_API_KEY
in their shell profile or Windows user
environment, so Claude Code uses CodexAPI.pro instead of showing its
login-method selector. They can run
claude --permission-mode dontAsk --allowedTools Bash when they
want to force the root-compatible no-prompt mode, claude -c to continue,
or claude -r to open Claude Code's resume picker.
A quick smoke test is
claude --permission-mode dontAsk --allowedTools Bash -p "Say hello from CodexAPI.pro Claude Code.".
CodexAPI.pro launcher option
Customers who want one managed launcher can install
@codexapi/codexclaude. Version 2.0.5 launches official
Codex 0.134.0, lets them log in with their dashboard username/password,
choose ChatGPT-5.5, Opus 4.8, or Deepseek v4 Budget, and have the app write the matching
root-compatible setup with high reasoning, fast mode, Full Access,
and a Token Wallet status line.
npm install -g @codexapi/codexclaude@latest
codexclaude login
codexclaude start
Wallet billing and plans
Wallet credit is deducted after completed API calls based on input and output token usage. During the current Surge Pricing window, the customer-facing rate shown in the dashboard is $6 per million input tokens and $32 per million output tokens. Normal displayed rates are $5 input and $30 output, and Reduced Pricing targets $4.50 input and $27 output when service load settles after a surge event. Top-up packs and the Unlimited Credit plan are sold through Stripe. Successful payments load credit onto the same wallet key, so users do not need to reinstall or reconfigure Codex. The Unlimited Credit subscription is currently offered at a promotional $149/month lock-in rate: customers who subscribe during the promotion keep that monthly rate while their subscription remains active, even if the public price is increased later. Unlimited currently supports only the official OpenAI Codex CLI with ChatGPT-5.5. Opus 4.8, Claude Code, and codexclaude are not included on that subscription.
G2G marketplace delivery
Admins can create marketplace accounts before the buyer signs in. One order should produce one dashboard login, one API username/token, one wallet balance, and one paste-ready delivery message. The buyer receives `Dashboard Login: https://codexapi.pro/dashboard.html`, their dashboard username/password, install commands, new-session commands, resume commands, and smoke tests.
Admin operations
The admin dashboard at `/admin` manages the live business surface: customer search, simulation, deletion, pending signup review, manual credit add/deduct with transaction notes, G2G creation, API key creation, SMTP testing, provider selection, usage charts, and service metadata. Provider selection applies to new requests; active generations should not be switched mid-run.
API surfaces
| Route | Purpose |
|---|---|
/v1/models | Model discovery for the official Codex CLI provider. |
/v1/responses | Responses-compatible Codex work endpoint with wallet billing. |
/api/v1/cli/public-codex | Generated install/start/resume configuration payload. |
/api/v1/me | Client dashboard identity, wallet, and account state. |
/api-docs | Verbose generated API reference for developers. |
Reliability, privacy, and support posture
The system is designed around stable provider routing, explicit wallet state, and visible usage records. Customers can see their balance and top up without changing their CLI configuration. Admins can inspect operational state and customer accounts from a single dashboard. Sensitive operational secrets are kept in server environment files and are not published in documentation.
For troubleshooting, first confirm the user's dashboard account, wallet balance, API username, installed Codex version, provider command, and whether they are starting a new session or resuming local history. Most setup issues come from missing environment variables, using the wrong Codex home, or running a command without the generated provider flags.