Connect Codex CLI
Configure Codex CLI to use AnyInt as a custom OpenAI Responses provider.
Codex CLI supports custom model providers with a base URL and an environment-backed API key. AnyInt exposes the Responses API at the canonical OpenAI-compatible base.
Before You Start
- Install or update Codex using the official Codex CLI instructions.
- Create an AnyInt API key.
- Choose a Responses-compatible model ID from the model catalog.
Configure the Provider
Run our one-line automated installer to configure ~/.codex/config.toml with timestamped backup and chmod 600 permissions, sync via CC Switch from the API keys page, or store the key in your shell for manual setup:
# Automated install (configures ~/.codex/config.toml with backup):
curl -fsSL https://api.anyint.ai/install/codex.sh | bash -s -- --key "your_api_key" --url "https://api.anyint.ai/v1" --model "YOUR_MODEL_ID"
# Or configure environment variable for manual setup:
export ANYINT_API_KEY="your_api_key"For manual setup, add the AnyInt provider to ~/.codex/config.toml:
model_provider = "anyint"
model = "YOUR_MODEL_ID"
[model_providers.anyint]
name = "AnyInt Gateway"
base_url = "https://api.anyint.ai/v1"
wire_api = "responses"
experimental_bearer_token = "your_api_key"Run Codex from your repository:
codexVerify and Troubleshoot
- Run
/statusin Codex and confirm the selected provider and model. - A
401response meansANYINT_API_KEYis not visible to the Codex process or the key is inactive. - A model error means
YOUR_MODEL_IDwas not replaced with a current Responses-compatible catalog entry. - The automated installer locks permissions to 600; for manual setup you can use
experimental_bearer_tokenorenv_key = "ANYINT_API_KEY".
The configuration fields above follow the official OpenAI Docs Codex configuration reference.