Skip to main content

OpenAI

WednesdayAI supports OpenAI’s GPT and Codex model families. Authenticate with an API key, or with OAuth for Codex subscribers.

API key

Create a key at platform.openai.com and onboard:
openclaw onboard --auth-choice openai-api-key
Or set the key on the gateway host:
echo 'OPENAI_API_KEY=sk-proj-...' >> ~/.openclaw/.env
Rotation variables (OPENAI_API_KEYS, OPENAI_API_KEY_1, OPENAI_API_KEY_2, and the single-override OPENCLAW_LIVE_OPENAI_KEY) are also honoured — see Authentication.

Codex subscription (OAuth)

OpenAI Codex OAuth is explicitly supported for external tools like WednesdayAI:
openclaw onboard --auth-choice openai-codex
# or
openclaw models auth login --provider openai-codex
This opens a browser for the OAuth flow and stores the token in the auth profile store.

Selecting a model

{
  agents: {
    defaults: {
      model: { primary: "openai/gpt-5.1-codex" },
    },
  },
}
The Codex subscription provider uses the openai-codex/ prefix, e.g. openai-codex/gpt-5.3-codex. Run openclaw models list --all to see the full catalog, or openclaw models status for what your auth can reach.

Transport

The default transport is auto (WebSocket-first, with SSE fallback). Override per model:
{
  agents: {
    defaults: {
      models: {
        "openai/gpt-5.1-codex": {
          params: { transport: "sse" }, // "sse" | "websocket" | "auto"
        },
      },
    },
  },
}
The OpenAI Responses WebSocket warm-up defaults to on via params.openaiWsWarmup.

Troubleshooting

The API key is invalid or revoked. Generate a new one and re-run onboarding, or update ~/.openclaw/.env.
You hit your tier limits. Add rotation keys via OPENAI_API_KEYS or upgrade your plan.
Re-run openclaw models auth login --provider openai-codex.
Some models require specific access tiers. Check your access at platform.openai.com/limits.