GetAPI.ONE
Configure Codex CLI for GetAPI.ONE
Install Codex CLI from the official source, keep the ONE key in an environment variable, configure a Responses-compatible custom provider, and verify the active connection.
Scope and prerequisites
This guide covers the terminal Codex CLI. It does not establish compatibility for every desktop client, IDE extension, model, or Codex feature.
- A GetAPI.ONE account with usable balance or an applicable package.
- A named, scoped GetAPI.ONE key stored privately.
- A model selected from the current catalog that explicitly lists the Responses endpoint.
- Permission to install Codex CLI and edit your user-level Codex configuration.
1. Install and identify Codex CLI
Use the current official Codex CLI page for the installer matching your operating system. The official macOS/Linux standalone installer reviewed on 2026-09-07 uses the command below. Windows users should follow the Windows tab on the official page rather than run a Unix shell command blindly.
curl -fsSL https://chatgpt.com/codex/install.sh | shcodex --version2. Load the key into the terminal
Set the key for the current shell before starting Codex. These examples deliberately contain a placeholder.
export GETAPI_ONE_API_KEY="replace-with-your-private-key"$env:GETAPI_ONE_API_KEY = "replace-with-your-private-key"3. Configure the ONE provider
Open the user-level Codex config.toml (normally under your .codex directory) and add the provider below. Replace YOUR_RESPONSES_MODEL with a current GetAPI.ONE catalog model that explicitly declares the Responses endpoint.
model_provider = "getapi_one"
model = "YOUR_RESPONSES_MODEL"
[model_providers.getapi_one]
name = "GetAPI One"
base_url = "https://www.getapi.one/v1"
env_key = "GETAPI_ONE_API_KEY"
wire_api = "responses"4. Run and verify
- Open a new terminal if you made the environment variable persistent; otherwise keep the current terminal where the variable is set.
- Open a project directory and run codex. Confirm the displayed provider/model corresponds to the configuration you intended.
- Send one minimal prompt only when you accept that it may be billed.
- A successful check requires a valid CLI response and a corresponding GetAPI.ONE console request/usage record. No model call was made while producing this guide.
Troubleshoot in order
| Symptom | Checks |
|---|---|
| codex: command not found | Revisit the official installer for your OS and confirm the install directory is on PATH. |
| Missing API key | Confirm GETAPI_ONE_API_KEY exists in the same environment that starts Codex and env_key is spelled exactly. |
| 401 / Unauthorized | Re-copy the ONE key, confirm it is enabled, and verify the key is paired with https://www.getapi.one/v1. |
| 404 / incompatible path | Confirm /v1 remains in base_url and that the gateway declares /v1/responses. |
| Model not found | Replace the placeholder with an exact catalog name visible to the key group and marked for the Responses endpoint. |
| Configuration did not change | Check that you edited the user-level file Codex loads, model_provider points to getapi_one, and the terminal/client was restarted. |