Connect CodeX to 211API
Add a provider pointing at 211API in the CodeX config file and the gpt-5.6 model family is ready — your task orchestration habits stay unchanged.
Prerequisites
- A 211API account with an API Key created in the console (starts with
sk-). - Node.js 18 or later installed locally.
Step 1 · Install CodeX
npm install -g @openai/codexStep 2 · Configure the provider
Edit ~/.codex/config.toml (on Windows: %USERPROFILE%\.codex\config.toml) and register 211API as a model provider:
model = "gpt-5.6-sol"
model_provider = "211api"
[model_providers.211api]
name = "211API"
base_url = "https://www.211api.com/v1"
env_key = "211API_API_KEY"Then put the API Key into an environment variable. macOS / Linux:
export 211API_API_KEY="sk-your-211API-key"Windows (PowerShell):
$env:211API_API_KEY = "sk-your-211API-key"
# Persist at user level:
# setx 211API_API_KEY "sk-your-211API-key"Note
gpt-5.6-sol targets complex reasoning and long tasks. For high-frequency light calls, switch model in config.toml to gpt-5.6-luna, which has a lower channel multiplier. Exact model names follow the console "Models" list.
Step 3 · Launch & verify
Send a simple request from your project directory to confirm auth and model routing:
cd your-project
codex "Describe this project's structure in one sentence"A normal response means you're connected. Call logs, token usage and multiplier details are visible entry by entry in the 211API console.
FAQ
Model not found — The model value must exactly match the 211API console model list, including case and suffixes.
Environment variable not applied — On Windows, setx requires a new terminal. Inside PowerShell, read it back with $env:211API_API_KEY to confirm.