Skip to content

Codex FAQ ​

Codex asks me to sign in to OpenAI ​

Symptom: Running codex shows the "Sign in with ChatGPT / Provide your own API key" screen.

Cause: config.toml has requires_openai_auth = true (from an older version of this guide).

Fix: Remove that line and ~/.codex/auth.json, then add experimental_bearer_token = "sk-your-clauddy-token" under [model_providers.clauddy]. See Codex Setup for the full config.

401 Missing API key ​

Symptom: unexpected status 401 Unauthorized: {"error":"Missing API key"}.

Cause: Codex has no token, so requests are sent without one.

Fix: Make sure [model_providers.clauddy] has experimental_bearer_token = "sk-your-clauddy-token", or rerun the setup script.

Connection failed ​

Check ~/.codex/config.toml:

  • model_provider = "clauddy"
  • base_url = "https://api.clauddy.com/v1" (must include /v1)
  • experimental_bearer_token is set to your Clauddy token

Also make sure your token group includes GPT models.

Model unavailable ​

Your token group may not include that model. See Token Groups.

Missing environment variable: CLAUDDY_API_KEY ​

Cause: Your config was written by setup script 0.5.1 or earlier, which reads the token from an environment variable (env_key = "CLAUDDY_API_KEY"). Terminals, tmux sessions, or IDE terminals opened before setup may not have that variable.

Fix: Rerun the setup script (from 0.5.2 the token is written straight into config.toml), or replace env_key = "CLAUDDY_API_KEY" with experimental_bearer_token = "sk-your-clauddy-token" yourself.

Clauddy | AI API 聚合平台