OpenAI Codex (Subscription)
OpenAI Codex subscription access lets you use OpenAI's GPT models through your existing ChatGPT subscription instead of paying per-token API fees. This is the most cost-effective way to run OpenClaw with OpenAI models if you're already on a ChatGPT plan.
Tags: subscription, codex, oauth
Use Cases
- Cost-effective OpenClaw setup for developers already paying for ChatGPT Plus/Pro
- Predictable monthly AI costs for personal assistant workflows
- Running OpenClaw on cloud VPS with OAuth authentication (no API key management)
- Secondary/overflow provider paired with a primary API-key-based provider
- Quick onboarding for new OpenClaw users who don't want to set up API billing
Tips
- Use Codex OAuth for your main interactive agent session, and keep a standard OpenAI API key configured as fallback for batch/overflow work.
- ChatGPT Plus at $20/mo is the cheapest way to get GPT-5.4 access for moderate OpenClaw usage.
- If you're spending $50+/mo on OpenAI API tokens, evaluate whether ChatGPT Pro ($200/mo) with Codex OAuth would be cheaper.
- Run 'openclaw configure --provider openai-codex' to set up OAuth. The device-flow will prompt you to sign in via browser.
- Monitor your usage in the ChatGPT app/dashboard to avoid surprise limit hits during critical workflows.
- Combine with a cheap per-token provider (Nano, Haiku) for heartbeats and cron to preserve subscription credits for interactive work.
Known Issues & Gotchas
- Usage limits are capped by your ChatGPT subscription tier and reset periodically — not unlimited.
- No Batch API access — subscription-based billing only supports interactive requests.
- No embeddings support through the Codex OAuth path — you'll need a separate provider or API key for RAG/memory.
- OAuth tokens can expire and require re-authentication. If OpenClaw stops working, re-run the configure flow.
- When you hit your subscription limit, tasks fail silently or get queued. Monitor your usage in the ChatGPT dashboard.
- Codex OAuth and standard OpenAI API key are separate providers in OpenClaw — configure them independently.
- Model availability depends on your ChatGPT plan tier. Some models may not be accessible on Plus.
Alternatives
- OpenAI (API Key)
- Anthropic (Claude)
- Claude Max API Proxy
- GitHub Copilot
Community Feedback
OpenClaw on DigitalOcean with OpenAI Codex OAuth — skip the DO setup wizard. Always use the oc wrapper, never bare openclaw commands (avoids the root/service user confusion).
— Reddit r/codex
You could technically replicate everything OpenClaw does, be inspired by their ideas, and build a minimal foundation on top of the Codex Harness.
— Reddit r/codex
The whole point of the $200 subscription is that you never use its full limit so OpenAI can be in profit. That's why there is no $40-60-80-100 tier.
— OpenAI Community Forum
Configuration Examples
Codex OAuth setup
providers:
openai-codex:
# No API key needed — uses ChatGPT subscription
# Run: openclaw configure --provider openai-codex
# Sign in with your ChatGPT account when prompted
model: openai/gpt-5.4Codex OAuth + API key fallback
providers:
openai-codex:
model: openai/gpt-5.4
openai:
apiKey: sk-proj-xxxxx
model: openai/gpt-5.4-nano
# Nano as fallback when subscription limits hit
# Also handles embeddings and batch work