πŸ“– Recipes
Power Model (GPT-5.5)

Setup: GPT-5.5 via OpenAI Codex OAuth

Platform: OpenClaw (starting from GLM-5) Difficulty: Intermediate Time to set up: 5–10 minutes

Overview

This connects your ChatGPT Plus or Pro account to OpenClaw using OpenAI Codex OAuth β€” no API key required, no credentials in chat.

This uses your existing ChatGPT Plus or Pro subscription via OAuth. You do not need a separate OpenAI API key.

Before you start

  • OpenClaw running with GLM-5 as the current model
  • A ChatGPT Plus or Pro account
  • A local browser to complete the OAuth flow

Bootstrap prompt

Paste this into your Claw's chat to start the full setup:

Set up OpenAI Codex GPT-5.5 in OpenClaw starting from GLM-5.

Do not ask for an OpenAI API key. This uses the user's ChatGPT Plus/Pro account via OpenAI Codex OAuth.

Steps:

1. Start the OAuth login flow in a PTY:
   openclaw models auth login --provider openai-codex --method oauth

2. When the CLI prints an OpenAI OAuth URL, send that full URL to the user.

3. Tell the user:
   - Open the link in their local browser
   - Sign in with their ChatGPT Plus or Pro account
   - Complete authorization
   - Copy the full localhost callback URL, for example:
     http://localhost:1455/auth/callback?code=...&state=...
   - Paste it back into chat

4. Keep the PTY process running while waiting.

5. When the user sends the callback URL, paste the full callback URL into the waiting CLI prompt:
   "Paste the authorization code (or full redirect URL):"
   Then press Enter.

6. Wait for the CLI to finish. Success should mention an auth profile like:
   openai-codex:<email> (openai-codex/oauth)
   and a model like:
   openai-codex/gpt-5.5

7. Set GPT-5.5 as the default model:
   openclaw models set openai-codex/gpt-5.5

8. Verify with session status. If the current session is still on GLM-5,
   switch the current session or model override to:
   openai-codex/gpt-5.5

9. Confirm to the user only after:
   - OAuth auth profile was saved
   - default model was updated
   - current session status shows openai-codex/gpt-5.5

What happens step by step

Start the OAuth flow

Your Claw runs:

openclaw models auth login --provider openai-codex --method oauth

It prints an OpenAI OAuth URL and waits.

Open the URL and authorize

Your Claw sends you the URL. Open it in your local browser, sign in with your ChatGPT Plus or Pro account, and complete the authorization.

Copy the callback URL

After authorizing, your browser redirects to a localhost URL that looks like:

http://localhost:1455/auth/callback?code=...&state=...

Copy the full URL from your browser's address bar and paste it back into chat.

Your Claw completes the flow

It pastes the callback URL into the waiting CLI prompt and presses Enter. When it succeeds, you'll see an auth profile like:

openai-codex:you@example.com (openai-codex/oauth)

and a model confirmed as:

openai-codex/gpt-5.5

Set as default and verify

Your Claw runs:

openclaw models set openai-codex/gpt-5.5

Then checks session status to confirm the current session has switched away from GLM-5. It only confirms success to you once all three checks pass: auth profile saved, default model updated, and session showing openai-codex/gpt-5.5.

Common mistakes

  • Pasting a raw API key into chat β€” this flow uses OAuth specifically to avoid that
  • Closing the browser before copying the callback URL β€” the code expires quickly
  • Assuming it worked without the final verify step β€” always confirm session status shows the new model