Integrations
OpenAI Codex
Point OpenAI Codex at Token Harbor manually — Base URL, API key, and exact steps. One key, every model, no CLI required.
OpenAI Codex + Token Harbor
OpenAI's terminal coding agent. Route it through Token Harbor to use every model with a single key.
Get a thk_… key from /dashboard/api-keys (a free account works), then:
Codex reads $CODEX_HOME/config.toml (default: ~/.codex/config.toml). Add a Token Harbor provider and select it:
model = "deepseek-v4.1-flash:free"
model_provider = "tokenharbor"
[model_providers.tokenharbor]
name = "Token Harbor"
base_url = "https://tokenharbor.ai/v1"
wire_api = "responses"
env_key = "TOKENHARBOR_API_KEY"
Set your key in the environment, then run codex. (The Codex VS Code extension
shares this same file; on Windows it is %USERPROFILE%\.codex\config.toml.)
macOS / Linux:
export TOKENHARBOR_API_KEY=YOUR_thk_KEY
Windows (PowerShell):
$env:TOKENHARBOR_API_KEY = "YOUR_thk_KEY"
# to keep it for new windows too:
setx TOKENHARBOR_API_KEY "YOUR_thk_KEY"
Prefer one command? The tokenharbor CLI configures OpenAI Codex
automatically (and can undo it).
Keep model and model_provider above the first TOML table. See the
official Codex provider documentation.