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.

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. Authentication works via device-flow OAuth — you sign in with your ChatGPT account and OpenClaw uses your subscription credits. No API key needed. This is the same flow used by the Codex CLI tool, so if you've already authenticated Codex, OpenClaw can piggyback on those credentials. The catch: usage is capped by your subscription tier. ChatGPT Plus ($20/mo) gives you limited Codex usage that resets periodically. ChatGPT Pro ($200/mo) gives much higher limits. When you hit the ceiling, you can buy additional credits or switch to API key billing. Business ($30/user/mo), Edu, and Enterprise plans also include Codex access with varying limits. This provider is ideal for developers who want predictable monthly costs and already pay for ChatGPT. You get access to GPT-5.4 and other models at effectively zero marginal cost (within limits). However, you lose access to Batch API and some advanced features that are API-key-only. For heavy or unpredictable workloads, the standard OpenAI API key provider may be more reliable.

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.4

Codex 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