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.
macOS
Use OpenAI-compatible environment variables on macOS so Codex routes model requests through 2KEN.
Endpoint
Replace only the base URL. SDK shape, JSON body, and bearer auth stay familiar.
https://apis.2ken.com/v1export OPENAI_BASE_URL="https://apis.2ken.com/v1"
export OPENAI_API_KEY="sk-2ken-your-key"
export OPENAI_MODEL="gpt-4.1-mini"
codexNotesIf the client is launched from a GUI, enter the same API address, token, and model in that application's settings.
Ready to ship?
Open the console next, copy a token, inspect model policy, and place the real values into the matching client.