Available Models
| Model | Context | Images | Tools | Price (1M tokens) |
|---|---|---|---|---|
| GPT-5.2 Latest flagship model with advanced capabilities | 128K | ✓ | ✓ | $5 / $15 |
| GPT-4 Turbo Fast, capable model for most tasks | 128K | ✓ | ✓ | $10 / $30 |
Authentication
API KEY
Standard API key authentication
Environment Variable: OPENAI_API_KEY
Setup Steps:
- Create an account at platform.openai.com
- Navigate to API Keys section
- Generate a new API key
- Set OPENAI_API_KEY environment variable
OAUTH
OAuth for ChatGPT/Codex subscriptions
Setup Steps:
- Run openclaw onboard
- Select OpenAI OAuth
- Complete browser-based login
Configuration Example
{
"models": {
"providers": {
"openai-codex": {
"apiKey": "${OPENAI_API_KEY}"
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "openai-codex/gpt-5.2"
}
}
}
} Use OpenAI Codex with Messaging Channels
Connect OpenAI Codex to your favorite messaging platforms:
Connect AI to WhatsApp via Baileys protocol
View Guide →Telegram
Full-featured Telegram bot with commands and reactions
View Guide →Discord
Discord bot with slash commands and threads
View Guide →Slack
Slack app with Block Kit and threads
View Guide →Signal
Encrypted messaging via signal-cli daemon
View Guide →iMessage
Apple iMessage integration (macOS only)
View Guide →Matrix
Decentralized Matrix protocol support
View Guide →Microsoft Teams
Enterprise Teams integration via Microsoft SDK
View Guide →Nostr
Decentralized Nostr protocol support
View Guide →Frequently Asked Questions
How much does OpenAI Codex cost with OpenClaw?
OpenAI Codex pricing depends on your usage. OpenAI Codex charges based on tokens processed. OpenClaw itself is free and open source. You only pay for the AI provider API costs.
How do I authenticate OpenAI Codex with OpenClaw?
OpenAI Codex supports api_key, oauth. The most common method is using an API key which you can get from the OpenAI Codex console.
Which OpenAI Codex models work with OpenClaw?
OpenClaw supports all OpenAI Codex models including GPT-5.2, GPT-4 Turbo. You can configure your preferred model in openclaw.json or use model aliases for convenience.
Can I use OpenAI Codex as a fallback provider?
Yes, OpenClaw supports automatic failover. You can configure OpenAI Codex as a fallback in the model configuration. If your primary provider fails, OpenClaw will automatically switch to OpenAI Codex.