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
Store the key in your shell or secret manager:
export ANYINT_API_KEY="your_api_key"Add an AnyInt provider to ~/.codex/config.toml:
model_provider = "anyint"
model = "YOUR_MODEL_ID"
[model_providers.anyint]
name = "AnyInt"
base_url = "https://api.anyint.ai/openai/v1"
env_key = "ANYINT_API_KEY"
wire_api = "responses"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. - Keep the API key out of
config.toml;env_keynames the environment variable and does not embed its value.
The configuration fields above follow the official OpenAI Docs Codex configuration reference.