Configure Codex
Connect Codex to AnyInt through the OpenAI Responses API.
Codex uses an OpenAI Responses provider when it connects to AnyInt.
Beta route
The AnyInt OpenAI Responses API is published as Beta. Verify the target model, account, streaming behavior, and Codex version before using this path for production work.
What you need
- an AnyInt API key
- a model ID visible to that key
- Codex installed and initialized once
export ANYINT_API_KEY="your-anyint-api-key"
curl https://api.anyint.ai/openai/v1/models \
-H "Authorization: Bearer $ANYINT_API_KEY"Configure the provider
Open ~/.codex/config.toml on macOS or Linux, or %USERPROFILE%\.codex\config.toml on Windows. Add this profile and provider:
[profiles.anyint]
model_provider = "anyint"
model = "<MODEL_ID>"
[model_providers.anyint]
name = "AnyInt"
base_url = "https://api.anyint.ai/openai/v1"
env_key = "ANYINT_API_KEY"
wire_api = "responses"The base URL must stop at /openai/v1. Do not append /chat/completions or /responses.
Verify the connection
Provide the key through the environment and run a minimal command:
export ANYINT_API_KEY="your-anyint-api-key"
codex exec --profile anyint "Reply exactly: AnyInt connected"The setup is complete when the command returns the requested text through the anyint profile.
Make AnyInt the default
After the profile works, you can point the global defaults at the same provider:
model_provider = "anyint"
model = "<MODEL_ID>"
[model_providers.anyint]
name = "AnyInt"
base_url = "https://api.anyint.ai/openai/v1"
env_key = "ANYINT_API_KEY"
wire_api = "responses"Common problems
| Symptom | Check |
|---|---|
| Provider or base URL error | Confirm base_url is exactly https://api.anyint.ai/openai/v1. |
| The key is missing | Export ANYINT_API_KEY in the same shell that starts Codex. |
| The model is unavailable | Fetch /openai/v1/models again with the same key and copy an exact ID. |
| A response starts but does not complete | Treat the integration as unverified for that client/model combination and review the Responses API limitations. |
For additional diagnosis, use Agent Setup Troubleshooting.