Docs.
Detailed guides for every way to connect to 2KEN. Use the same token, base URL, and model configuration from command lines, OpenAI-compatible SDKs, HTTP APIs, code clients, and switching tools.
Linux
Save the 2KEN OpenAI-compatible configuration in a separate env file on Linux, then load it into Codex sessions as needed.
Endpoint
Replace only the base URL. SDK shape, JSON body, and bearer auth stay familiar.
https://apis.2ken.com/v1mkdir -p ~/.config/2ken
cat > ~/.config/2ken/codex.env <<'EOF'
OPENAI_BASE_URL=https://apis.2ken.com/v1
OPENAI_API_KEY=sk-2ken-your-key
OPENAI_MODEL=gpt-4.1-mini
EOF
set -a
. ~/.config/2ken/codex.env
set +a
codexNotesA separate env file makes project switching easier. Make sure only the current user can read the file.
Ready to ship?
Open the console next, copy a token, inspect model policy, and place the real values into the matching client.