Skip to content
繁體中文
Agent Quick Start

Connect Codex CLI to Tokatlas ​

Configure Codex CLI with a Tokatlas key, endpoint, and enabled model.

Before You Start ​

Install from the official CLI guide, then check codex --version. npm installation: npm install -g @openai/codex.

Prepare a Tokatlas API key and a model enabled for your account. Replace all YOUR_... placeholders. Back up existing settings before merging changes.

Connection Settings ​

SettingValue
Provider nameTokatlas
ProtocolResponses
Endpoint / Base URLhttps://api.tokatlas.ai/v1
API KeyYOUR_TOKATLAS_API_KEY
Model IDYOUR_TOKATLAS_MODEL_ID

Setup ​

  1. Back up and merge the configuration below into user-level ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml). Replace the model placeholder.
  2. Set TOKATLAS_API_KEY in the launching terminal: Bash/Zsh uses export TOKATLAS_API_KEY="YOUR_TOKATLAS_API_KEY"; PowerShell uses $env:TOKATLAS_API_KEY = "YOUR_TOKATLAS_API_KEY".
  3. Run codex in a project and check /status. Create a new conversation after changing the model.

Configuration Example ​

toml
model = "YOUR_TOKATLAS_MODEL_ID"
model_provider = "tokatlas"
web_search = "disabled"

[model_providers.tokatlas]
name = "Tokatlas"
base_url = "https://api.tokatlas.ai/v1"
wire_api = "responses"
env_key = "TOKATLAS_API_KEY"

Compatibility Notes ​

Keep top-level settings before the first table. Do not duplicate existing keys. The chosen model must support Codex’s Responses and tool flow; custom aliases may need a matching model catalog. See Codex Desktop for desktop credential handling.

Verify and Troubleshoot ​

  1. Open a new conversation and send “Reply with OK only”; check that text returns.
  2. Check Tokatlas usage for a successful request at the same time with the configured model.
  3. If you need tools, ask the client to list files in a test directory and check that the tool result returns to the conversation.
  4. If step 1 fails, test the key and model directly using API Basics. If that succeeds, troubleshoot client settings below.
ProblemCheck
401 / 403Re-enter the Tokatlas key without quotes or spaces; check the auth mode and model access.
404Compare the full request URL with the table above; remove a duplicated /v1 or endpoint suffix.
Unknown modelCopy an enabled ID from the model list, save it, and select that model in a new chat.
Tool failureModel capabilities and client protocol support.
Changes ignoredSelect the Tokatlas provider/profile, fully quit the client, and reopen it.

References ​