OpenAI / Codex
OpenAI
OpenAI has two main paths inside OpenClaw: standard OpenAI Platform API keys and the subscription-style OpenAI Code / Codex route. The first is a normal API integration; the second is built around OAuth and subscription reuse.
Two Access Paths
OpenAI Platform
The standard API path for usage-based billing, servers and explicit key management.
OpenAI Code (Codex)
A good fit when you want to reuse ChatGPT or Codex subscription auth, especially for cloud Codex capabilities.
Common Setup Paths
API key
openclaw onboard --auth-choice openai-api-key
openclaw onboard --openai-api-key "$OPENAI_API_KEY" Codex OAuth
openclaw onboard --auth-choice openai-codex
openclaw models auth login --provider openai-codex Default model snippet
{
agents: {
defaults: {
model: { primary: "openai/gpt-5.2" }
}
}
}