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

  1. Install or update Codex using the official Codex CLI instructions.
  2. Create an AnyInt API key.
  3. Choose a Responses-compatible model ID from the model catalog.

Configure the Provider

Store the key in your shell or secret manager:

bash
export ANYINT_API_KEY="your_api_key"

Add an AnyInt provider to ~/.codex/config.toml:

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:

bash
codex

Verify and Troubleshoot

  • Run /status in Codex and confirm the selected provider and model.
  • A 401 response means ANYINT_API_KEY is not visible to the Codex process or the key is inactive.
  • A model error means YOUR_MODEL_ID was not replaced with a current Responses-compatible catalog entry.
  • Keep the API key out of config.toml; env_key names the environment variable and does not embed its value.

The configuration fields above follow the official OpenAI Docs Codex configuration reference.