Codex Setup
Codex is OpenAI's terminal coding agent. Clauddy is compatible with the OpenAI Responses API, so it connects directly.
| Cheat sheet | |
|---|---|
| API endpoint | https://api.clauddy.com/v1 (must include /v1) |
| Token group | OpenAI (0.5x, Codex only) or Unified |
| Recommended model | gpt-6-astra |
| Config file | ~/.codex/config.toml, on Windows %USERPROFILE%\.codex\config.toml |
| Launch | codex |
Choose a setup method
One-click script
curl -fsSL https://docs.clauddy.com/install.sh | bash -s -- --lang en- Type
2in the menu for Codex CLI. If it is not installed, the script offers to install it. - Create a token in the OpenAI group when prompted and paste it. The script validates it live.
- Open a new terminal and run
codex.
The script does not run in Windows PowerShell / CMD. Use CC Switch or the manual setup below. Script details →
Install Codex
Script and CC Switch users can skip this. The npm route needs Node.js 18+ (environment check).
brew install codexnpm install -g @openai/codexRun codex --version to confirm.
Manual setup
A single config.toml holds the endpoint and key. Do not create auth.json.
model_provider = "clauddy"
model = "gpt-6-astra"
[model_providers.clauddy]
name = "clauddy"
base_url = "https://api.clauddy.com/v1"
wire_api = "responses"
experimental_bearer_token = "sk-your-clauddy-token"model_provider = "clauddy"
model = "gpt-6-astra"
[model_providers.clauddy]
name = "clauddy"
base_url = "https://api.clauddy.com/v1"
wire_api = "responses"
experimental_bearer_token = "sk-your-clauddy-token"Windows: how to create and open the file
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex" | Out-Null
notepad "$env:USERPROFILE\.codex\config.toml"| Field | Meaning |
|---|---|
base_url | https://api.clauddy.com/v1, the /v1 is required |
experimental_bearer_token | Your Clauddy token |
model | gpt-6-astra recommended |
The old recipe triggers a login screen
requires_openai_auth = true plus auth.json is the old approach. Newer Codex versions respond with "Sign in with ChatGPT". Remove that line and auth.json, and use experimental_bearer_token as above.
The token is stored in plain text in config.toml. Don't share or commit the file. On macOS / Linux run chmod 600 ~/.codex/config.toml.
Verify
cd your-project-folder
codexSend any message. A reply means you are done. Open a new terminal after changing config.
Common issues
- "Sign in with ChatGPT" appears: see the warning above. Remove
requires_openai_authandauth.json. - 401 Missing API key:
experimental_bearer_tokenis missing or incomplete. - 404 / connection failed:
base_urlis missing/v1.
More in the Codex FAQ.
Stuck? Let an AI assistant walk you through
I want to connect Codex CLI to Clauddy (an AI API platform). Read this tutorial in full first, then walk me through it step by step: https://docs.clauddy.com/en/cli/codex Rules: 1. After reading, ask me three things: my operating system (Windows / macOS / Linux), whether Codex CLI is already installed, and whether I already have a Clauddy account and API key. 2. Guide me through ONE step at a time. Wait for my reply before moving on. 3. Use only the URLs, file paths, group names and config values from the tutorial. Do not invent model names, group names or UI options. If the tutorial does not cover something, say "not covered by the tutorial". 4. Before I edit any existing config file, remind me to back it up. 5. Write every example key as sk-xxx. Never ask me to paste my real key to you. 6. You cannot operate my computer. Never claim you changed a file for me. Tell me what to do and I will do it. 7. If a step fails, ask me to paste the full error first, then check it against the tutorial's FAQ section.
