OpenAI Codex Installation and Configuration Guide
This guide will help you configure OpenAI Codex to use the claude-code.club AI API service.
1. Install the Codex CLI
Install the Codex CLI globally using one of the following methods:
npm install -g @openai/codexFor more installation options and detailed instructions, refer to the OpenAI Codex official documentation.
2. Configure Codex
Configuring Codex requires editing two files: ~/.codex/config.toml and ~/.codex/auth.json.
Configuration file: config.toml
Add the following configuration to the beginning of your ~/.codex/config.toml file:
model_provider = "club"
model = "gpt-5.3-codex"
model_reasoning_effort = "medium"
disable_response_storage = true
preferred_auth_method = "apikey"
personality = "pragmatic"
[model_providers.club]
name = "ai code club"
base_url = "https://claude-code.club/openai/v1"
wire_api = "responses"
requires_openai_auth = true
env_key = "OPENAI_API_KEY"
[features]
shell_snapshot = true
collaboration_modes = true
multi_agent = true
unified_exec = trueAuthentication file: auth.json
Configure ~/.codex/auth.json as follows:
{
"OPENAI_API_KEY": <your-api-key>
}3. Configure Environment Variables
Set the OPENAI_API_KEY environment variable to your API key (format: cr_xxxxxxxxxx).
Temporary (current session only):
export OPENAI_API_KEY=cr_xxxxxxxxxxPermanent (recommended):
For zsh (macOS default):
echo 'export OPENAI_API_KEY="cr_xxxxxxxxxx"' >> ~/.zshrc
source ~/.zshrcFor bash:
echo 'export OPENAI_API_KEY="cr_xxxxxxxxxx"' >> ~/.bashrc
source ~/.bashrcNote: After setting this, you may need to reopen your terminal window, or manually run source ~/.zshrc (zsh) / source ~/.bashrc (bash) for the configuration to take effect.
Replace cr_xxxxxxxxxx with your actual API key obtained from claude-code.club.
4. Verify the Configuration
Once configured, start Codex to verify everything is working:
codexCongratulations! You have successfully configured OpenAI Codex. You can now start using AI-assisted coding.
Frequently Asked Questions
Q: Getting an “Invalid API Key” error?
A: Check that your environment variable is configured correctly, and make sure OPENAI_API_KEY in ~/.codex/auth.json is set to the correct API key.
Q: How do I get an API key? A: Visit the Get API Key page to learn how to obtain a key.