API GuideGetting StartedClient Setup
Codex Setup
Connect Codex to Tokenfly
Installation
npm install -g @openai/codexAfter installation, start it with:
codexConfigure config.toml
Create the file ~/.codex/config.toml with the following content:
model_provider = "OpenAI"
model = "gpt-5.4"
review_model = "gpt-5.4"
model_reasoning_effort = "medium"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
model_context_window = 1000000
model_auto_compact_token_limit = 900000
[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://tokenfly.com/v1"
wire_api = "responses"
requires_openai_auth = trueConfigure auth.json
Create the file ~/.codex/auth.json with the following content:
{
"OPENAI_API_KEY": "sk-xxx"
}Configuration Reference
| Field | Purpose |
|---|---|
model_provider | Default model provider |
model | Primary model |
review_model | Code review model |
model_reasoning_effort | Reasoning effort level |
disable_response_storage | Disables response storage |
network_access | Whether network access is allowed |
model_context_window | Context window size |
model_auto_compact_token_limit | Auto-compaction threshold |
Starting
Once configured, run:
codexHow is this guide?