Last updated: 2026-08-03; third-party tools can change at any time. If configuration fails, follow the latest official documentation.
Codex CLI provides a terminal workflow for OpenAI Codex. Review the official Codex CLI installation guide, configuration basics, and configuration reference.
npm install -g @openai/codex
In ~/.codex/config.toml add:
[model_providers.token_market]
name = "Token Market Responses API"
base_url = "https://api.tokensmarket.ai/v1"
env_key = "TOKEN_MARKET_API_KEY"
wire_api = "responses"
requires_openai_auth = false
request_max_retries = 4
stream_max_retries = 10
stream_idle_timeout_ms = 300000
| Setting | Purpose |
|---|---|
base_url | Token Market Responses API endpoint. |
env_key | Name of the API Key environment variable to read from the current terminal. |
model_provider | Provider ID used when starting the profile. |
Set the default configuration in ~/.codex/token-market.config.toml:
model = "<MODEL_ID>"
model_provider = "token_market"
export TOKEN_MARKET_API_KEY="<YOUR_TOKEN_MARKET_API_KEY>"
codex --profile token-market
Do not write the API Key to a TOML file or commit it to Git. Custom Codex providers currently support only wire_api = "responses"; direct configuration fails if the endpoint implements only Chat Completions. If the CLI version and configuration fields differ, follow the Codex configuration reference.