#Api rate limit
1 messages · Page 1 of 1 (latest)
That message almost always means your model provider (Anthropic/OpenAI/OpenRouter/etc) is returning HTTP 429 / quota exceeded. Starting a new OpenClaw session won’t fix it, because the limit is tied to your API key / setup-token, not the chat session.
To diagnose quickly, can you paste:
openclaw --version- The exact error text you see (if it mentions
HTTP 429,rate_limit_error,insufficient_quota, etc) openclaw models status(safe to share)- If you can:
openclaw status --all(it redacts secrets)
Common fixes depending on provider:
- Anthropic (Claude) 429: you’ve exhausted your rate/quota window → wait for the window to reset or upgrade/raise limits. If you’re using a Claude subscription setup-token, it’s especially easy to hit limits. Docs: https://docs.openclaw.ai/help/faq#why-am-i-seeing-http-429-ratelimiterror-from-anthropic
- OpenAI: usually billing/quota (or RPM/TPM) → check OpenAI usage/limits for that key.
- If it’s happening “instantly” every time: you may have a background loop (cron/heartbeat/agent stuck retrying) burning requests—
openclaw logs --followwill usually show that.
Also: set up a fallback model so OpenClaw can keep replying when the primary provider is rate-limited (docs mention this in the same FAQ + troubleshooting): https://docs.openclaw.ai/gateway/troubleshooting
Drop the outputs above and I’ll tell you exactly which case you’re in.
I use openai, but codex
Got it — if you’re on Codex (OpenAI subscription OAuth), that “API rate limit reached” is almost certainly OpenAI’s Codex-side rate limit, and a new OpenClaw session won’t reset it.
A few fast checks to pinpoint the fix:
- What does this show?
openclaw models status
I’m looking for whether your default is openai-codex:... (OAuth/subscription) vs openai:... (API key).
- Grab the real underlying 429 from logs (OpenClaw often shows a generic message in chat):
openclaw logs --follow
Then send one message, and paste the few log lines around the error (it’ll usually say 429 + a reason like rate_limit_exceeded / insufficient_quota / etc).
Most common outcomes
- If you’re on
openai-codex(OAuth): limits can be tight. Fix is usually: wait for the window to reset (often 1–10 min), and make sure you don’t have a background loop (cron/heartbeat) hammering requests. - If you want it to stop happening: switch your default to the regular
openaiprovider with an API key (Codex OAuth is convenient, but not always the most reliable for sustained chat throughput). Also set a fallback provider so you still get replies when Codex is throttled.
Post openclaw --version + openclaw models status + the log snippet and I’ll tell you exactly which one you’re hitting and what to change.
OAuth/token status
- openai-codex usage: 5h 81% left ⏱2h 37m · Week 0% left ⏱1d 19h
- openai-codex:default ok expires in 7d
this is what I see on my temrinal
- openai-codex:default ok expires in 7d
How do I increase it
That output explains it:
openai-codex usage … Week 0% left ⏱1d 19h= your Codex OAuth weekly allowance is fully exhausted.- So OpenClaw will keep hitting rate limit / quota no matter how many new sessions you start, until that weekly timer resets (in ~1 day 19 hours).
Your options
-
Wait for the weekly window to reset → then Codex will work again automatically.
-
Switch to the normal OpenAI API-key provider (usage-based billing) so you can keep chatting now:
- Run the wizard just for OpenAI API key auth:
openclaw onboard --auth-choice openai-api-key # or non-interactive: openclaw onboard --openai-api-key "$OPENAI_API_KEY" - Then set your agent’s default model/provider to the
openai/*(API key) path (instead ofopenai-codex/*).
Docs for that flow: https://docs.openclaw.ai/providers/openai (see “Option A: OpenAI API key”)
If you paste openclaw models status (the full output), I can tell you exactly what to change so OpenClaw prefers the API-key path until Codex weekly resets.
You can’t “turn up” that Codex OAuth weekly quota from inside OpenClaw — that Week 0% limit is coming from your OpenAI Codex/ChatGPT OAuth account, and OpenClaw is just reporting/enforcing what the provider allows.
To get more capacity, your real options are:
-
Upgrade whatever Codex/ChatGPT plan you’re on (if OpenAI offers a higher Codex allowance for your account), then re-check
openclaw models status. -
Switch to an OpenAI API key (usage-based billing) instead of
openai-codexOAuth. That’s the path where you can usually get higher limits by:- adding billing / increasing spend cap, and
- requesting/receiving higher rate limits on the OpenAI Platform.
OpenClaw setup docs: https://docs.openclaw.ai/providers/openai (Option A: OpenAI API key)
-
Reduce usage so the weekly bucket lasts longer (shorter prompts, fewer long-context chats, avoid huge pasted logs, etc.) — but it won’t help once the weekly bucket is already at 0%.
If you tell me whether you prefer (A) “stay on Codex OAuth” or (B) “move to API key”, I can give you the exact OpenClaw steps for that path.
Alright so I pay for chatgpt monthly and what I used within that week is fully used so I need custom api key for billing to talk more
Yep — that’s exactly it.
A ChatGPT monthly subscription (Codex OAuth) has its own weekly allowance, and once that “Week” bucket hits 0%, OpenClaw can’t use Codex again until it resets.
If you want to keep chatting beyond that, you need to switch OpenClaw to the OpenAI Platform API (custom API key + pay‑as‑you‑go billing).
What to do
-
Create an OpenAI API key on the OpenAI Platform (separate from ChatGPT)
- Make sure billing is enabled there (otherwise you’ll hit quota errors fast).
-
On your OpenClaw machine, run the wizard for OpenAI API key auth:
openclaw onboard --auth-choice openai-api-key
(or non-interactive)