Users install the public Codex CLI and point it at the hosted provider.
Documentation and prospectus
Hosted Codex CLI access, wallet billing, and dashboards in one system.
CodexAPI.pro is a hosted provider layer for the official OpenAI Codex CLI. The customer keeps Codex local on their own machine, while this service supplies a Responses-compatible API endpoint, wallet-linked credentials, usage billing, Stripe top-ups, generated startup commands, and admin tooling for support and marketplace delivery.
The stock CLI reaches a Responses-compatible gateway on this domain.
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 Codex CLI. It is a hosted compatibility, account, and billing layer that lets customers run the official OpenAI Codex CLI with a wallet-backed provider config. 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 compatibility path is the public Codex CLI provider shape: `GET /v1/models` and `POST /v1/responses`. 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 the official Codex CLI, copy one generated command, and start coding with web search and 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 a Codex request flows
- 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 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.
Customer setup
Customers should start in the dashboard because the dashboard inserts the exact API username into every command. Generic setup looks like this:
npm install -g @openai/codex@latest
mkdir -p "$HOME/.codex"
cat > "$HOME/.codex/config.toml" <<'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.
Wallet billing and plans
Wallet credit is deducted after completed API calls based on input and output token usage. The customer-facing rate shown in the dashboard is `$5` per million input tokens and `$30` per million output tokens. 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.
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.