Tool guides / Codex

DocsTool guidesCodex

Codex

OpenAI’s coding agent for the terminal. It uses the Responses API: add ACCTOKEN as a provider in ~/.codex/config.toml with the /v1 base URL.

Root URLhttps://intl.acctoken.com+ /v1https://intl.acctoken.com/v1Full paththe whole endpoint, e.g. https://intl.acctoken.com/v1/chat/completions

On this page
  1. Connection details
  2. Set it up
  3. Check it works
  4. Common problems

Before you start

  • An ACCTOKEN API key. Create one on API Keys in the console.
  • Codex CLI installed. Run codex --version to check.

01Connection details

CONNECTION RECORDCODEX
Format
Responses API
Base URL
https://intl.acctoken.com/v1+ /v1
API key
YOUR_API_KEYin the ACCTOKEN_API_KEY variable
Model
gpt-6.1-sola GPT model
Set in
~/.codex/config.toml
LIVE CHECKCommands run on the live APIEvery command on this page is run against intl.acctoken.com before it is published.ACCTOKEN DOCS DESK

02Set it up

Add a provider to ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml). Keep model and model_provider above the first [table]. If you have set CODEX_HOME, the file is $CODEX_HOME/config.toml instead.

model = "gpt-6.1-sol"model_provider = "acctoken" [model_providers.acctoken]name = "ACCTOKEN"base_url = "https://intl.acctoken.com/v1"env_key = "ACCTOKEN_API_KEY"wire_api = "responses"
wire_api = "responses" is the only value current Codex accepts. base_url ends in /v1; Codex adds /responses.

The key lives in the environment variable named by env_key. Set it once:

export ACCTOKEN_API_KEY="YOUR_API_KEY"
This lasts for the current terminal. To keep it, add the line to ~/.zshrc or ~/.bashrc.

03Check it works

Run one task without opening the interactive view:

codex exec --skip-git-repo-check "Reply with exactly: OK"
Expected outputOK

Inside an interactive session, /status shows the model and provider in use.

Common problems

404

No available channel for model … (distributor)

Codex asked for a model ID that is not on the Models page, often its built-in default. Set model in config.toml to one of the IDs listed in the error.

Some models fail in Codex

Codex only uses the Responses API. Claude and Gemini models do not support it. Pick a model from the table in Model IDs.

Missing environment variable: `ACCTOKEN_API_KEY`

The variable is not set where Codex started. Set it as above, then open a new terminal, or quit and reopen the desktop app.

401

Invalid token

The variable holds an old or incomplete key. Copy the key again from API Keys.

401

Incorrect API key provided … url: https://api.openai.com/v1/responses

Codex is still calling OpenAI, so it did not pick up the provider. Check that model_provider = "acctoken" sits above the first [table] and, if CODEX_HOME is set, that you edited $CODEX_HOME/config.toml.

wire_api = "chat" stopped working

Current Codex only supports the Responses API. Set wire_api = "responses" or remove the line.

It works in the terminal but not in the desktop app

Apps opened from the desktop do not see variables exported in a terminal. Use the permanent setting above, then quit and reopen the app.

Something else? Look up the exact message in Errors.