#Gemini API rate limit reached. Please try again later.

1 messages · Page 1 of 1 (latest)

high moon
#

My OpenClaw keeps saying this " API rate limit reached. Please try again later."

I am using Free Gemini key and it is totally fresh new one, never used and usage is 0. what am I gonna do with it?

hazy urchinBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

mild lightBOT
#

That message is almost always a real HTTP 429 / quota coming back from Google (Gemini), and the “usage: 0” in the UI can be misleading (it can lag, or you’re hitting a per‑minute limit / free-tier restriction rather than a monthly “usage” counter).

A couple quick checks that usually pinpoint it:

  1. What version are you on?
    Run and paste:
openclaw --version
  1. Confirm OpenClaw is actually using Gemini + which provider is failing
    Paste:
openclaw models status
  1. Grab the exact error from logs (it usually says quota vs rate vs model access)
#

In one terminal:

openclaw logs --follow

Then send one message to the bot and copy the few log lines around the 429.

Common causes / fixes once we see the logs:

  • Free Gemini keys have very low RPM (and OpenClaw may do retries/tool calls), so you can hit the limit fast. Try sending one message, then wait ~60s and try again.
  • Gateway service isn’t using the key you think (e.g. you exported it in a shell, but the gateway runs as a service). Best practice is to put it in ~/.openclaw/.env as GEMINI_API_KEY=... and restart the gateway.
  • Model access restriction on free tier (some “preview”/higher tier models just 429/“resource exhausted” immediately). If that’s the case, switch to a Gemini model that your key/account tier actually allows (if you want model recommendations, ask in #models since that changes frequently).

Drop those 3 outputs and I’ll tell you exactly which one you’re hitting.

high moon
#

honey@ubuntu:~$ openclaw --version
2026.2.26
honey@ubuntu:~$ openclaw models status

🦞 OpenClaw 2026.2.26 (bc50708)
I can run local, remote, or purely on vibes—results may vary with DNS.

Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : google/gemini-3-pro-preview
Fallbacks (1) : google/gemini-2.5-flash
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (1): google/gemini-3.1-pro-preview

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -

  • google effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | google:default=AIzaSyCb...Tn42TpwQ

OAuth/token status

  • none
    honey@ubuntu:~$ openclaw logs --follow

🦞 OpenClaw 2026.2.26 (bc50708) — Because the right answer is usually a script.

Log file: /tmp/openclaw/openclaw-2026-03-01.log

#

01:46:05 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=5 error="FailoverError: No available auth profile for google (all in cooldown or unavailable)."
01:46:05 debug diagnostic {"subsystem":"diagnostic"} lane enqueue: lane=session:agent:main:main queueSize=1
01:46:05 debug diagnostic {"subsystem":"diagnostic"} lane dequeue: lane=session:agent:main:main waitMs=0 queueSize=0
01:46:05 debug diagnostic {"subsystem":"diagnostic"} lane enqueue: lane=main queueSize=1
01:46:05 debug diagnostic {"subsystem":"diagnostic"} lane dequeue: lane=main waitMs=0 queueSize=0
01:46:05 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=1 error="FailoverError: No available auth profile for google (all in cooldown or unavailable)."
01:46:05 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=3 error="FailoverError: No available auth profile for google (all in cooldown or unavailable)."
01:46:05 error Embedded agent failed before reply: All models failed (2): google/gemini-3-pro-preview: No available auth profile for google (all in cooldown or unavailable). (rate_limit) | google/gemini-2.5-flash: No available auth profile for google (all in cooldown or unavailable). (rate_limit)
01:46:40 info 2026.2.26

mild lightBOT
#

Your setup is seeing the key correctly — openclaw models status shows:

  • provider google
  • api_key=1
  • profile google:default=AIza...

So this isn’t “OpenClaw can’t find my Gemini key”. It’s Google replying with something that matches a 429/quota/rate-limit pattern.

Two things to try immediately:

1) Switch off the Pro preview default (free keys often choke on it)

Right now your Default is google/gemini-3-pro-preview and you already have a Flash fallback.

In chat, run:

  • /model → pick the Flash option (or)
  • /model gemini-flash
#

Then send a single short message (“hi”) and see if it replies.

2) Paste the actual Google error from the log

openclaw logs --follow only printed the log file path so far. After you trigger the error once, grab the relevant lines with:

tail -n 120 /tmp/openclaw/openclaw-2026-03-01.log

…and paste the part that contains the 429 / RESOURCE_EXHAUSTED / quota message.

That log text will tell us which bucket you’re in:

  • true RPM limit (wait 60s, reduce spam, or add key rotation), vs
  • model access / tier restriction (preview/pro model not available on your key), vs
  • project/quota misconfig.

Docs reference for switching models: https://docs.openclaw.ai/help/faq#how-do-i-switch-models-on-the-fly-without-restarting

high moon
#

Assistant
5:41 PM
U
hi

You
5:46 PM
A

⚠️ Agent failed before reply: All models failed (2): google/gemini-3-pro-preview: No available auth profile for google (all in cooldown or unavailable). (rate_limit) | google/gemini-2.5-flash: No available auth profile for google (all in cooldown or unavailable). (rate_limit).
Logs: openclaw logs --follow

mild lightBOT
#

Those log lines are the key:

FailoverError: No available auth profile for google (all in cooldown or unavailable).

That means:

  • Google already rate-limited your only Gemini auth profile (google:default).
  • OpenClaw then put that profile into an automatic cooldown (backoff).
  • Since you only have one key/profile, everything on the google/* provider is now blocked until the cooldown expires — so both your primary and fallback fail.

OpenClaw’s cooldown backoff is exponential (1 min → 5 min → 25 min → up to ~1 hour). If you kept retrying, you likely escalated into a longer wait. (Docs: https://docs.openclaw.ai/concepts/model-failover#cooldowns)

What to do now (fast)

  1. Stop retrying for a bit, wait ~5–30 minutes, then try again.
  2. Check when it will recover:
#
openclaw models status --json

Look for auth.unusableProfiles / cooldown info (don’t paste your API key).

How to prevent it (free tier reality)

  • Set your default model to a Flash/cheaper Gemini model (the “pro preview” defaults often hit free-tier limits hard).
  • Or add key rotation (make a 2nd key in Google AI Studio and use GEMINI_API_KEYS so OpenClaw can rotate on 429s). With only 1 free key, once it’s throttled you’re stuck waiting.

If you paste the few lines before the cooldown started (search the log for 429 / RESOURCE_EXHAUSTED / quota), we can tell whether this is normal “too many requests” throttling vs “model not allowed on your tier” being misclassified as rate-limit.

#

Those new logs explain why it keeps failing even on a tiny “hi”:

No available auth profile for google (all in cooldown or unavailable).

OpenClaw put your only Gemini key/profile (google:default) into a cooldown backoff after Google returned a 429/quota-ish error. While it’s in cooldown, every google/* model (primary + fallbacks) gets skipped, so you just see the “API rate limit reached” / “all models failed” message.

What to do right now

  1. Stop retrying for a bit (retries can escalate the cooldown window).
    Wait ~10–30 minutes, then try again.

  2. Find the original Google error that triggered the cooldown (this tells us if it’s true RPM throttling vs “model not allowed on free tier”):

grep -nE "429|RESOURCE_EXHAUSTED|quota|rate limit" /tmp/openclaw/openclaw-2026-03-01.log | tail -n 40

Paste that output (it shouldn’t include your key, but double-check before posting).

After it recovers (to reduce this happening again)

#

Your default is google/gemini-3-pro-preview which is pretty brutal on free-tier limits. Switch to the Flash model you already have as a fallback (either via /model … in chat, or by changing your default model config) once you’re out of cooldown.

Docs on cooldowns/failover behavior: https://docs.openclaw.ai/concepts/model-failover#cooldowns

high moon
#

"unusableProfiles": [],

mild lightBOT
#

"unusableProfiles": [] is good news: it means right now OpenClaw doesn’t think any Google profile is in cooldown/disabled anymore.

So if you try again once and it still immediately fails with:

No available auth profile for google (all in cooldown or unavailable)

…then what’s happening is:

  1. The key is considered “usable” at rest
  2. But the first request to Google is returning a 429/quota-ish error
  3. OpenClaw instantly puts the profile back into cooldown, and then everything fails until that cooldown expires again.

Do this next

  1. Switch off the “pro preview” model (free keys often get throttled hard / or don’t have access):
  • In Discord chat, try: /model gemini-flash
    (or pick the Flash option in /model)
#
  1. Show the actual Google error line (this tells us if it’s “too many requests” vs “model not allowed on your tier”):
grep -nE "429|RESOURCE_EXHAUSTED|quota|rate limit" /tmp/openclaw/openclaw-2026-03-01.log | tail -n 40

Paste that output.

  1. Also run (this catches config mismatch between CLI vs service):
openclaw gateway status

If you paste (2) + (3), we can tell you exactly which limit you’re hitting and whether switching models is enough or if the free tier simply won’t work reliably with that setup.

high moon
#

5:56 PM
U
/model gemini-flash

You
5:56 PM
A

Model "google/gemini-flash" is not allowed. Use /models to list providers, or /models <provider> to list models.

Assistant
5:56 PM

#

Current: google/gemini-3-pro-preview (selected)
Active: google/gemini-2.5-flash (runtime)
Switch: /model <provider/model>
Browse: /models (providers) or /models <provider> (models)
More: /model status

mild lightBOT
#

That “not allowed” error is separate from rate limiting — it means the model name you typed isn’t in your allowed model list.

Also: in your openclaw models status output your Flash fallback is google/gemini-2.5-flash (not google/gemini-flash).

Try this in Discord:

  • /model google/gemini-2.5-flash

If you’re not sure what’s allowed, run:

  • /models (or /models google) and pick from the list

If google/gemini-2.5-flash is still “not allowed”, then your config has a model allowlist (your status showed Configured models (1)), and you need to add Flash to it (or switch the default via CLI):

openclaw models set google/gemini-2.5-flash
#
openclaw gateway restart

Once you’re on Flash, you should hit free-tier limits way less than with gemini-3-pro-preview.

#

That /model status output actually tells the story:

  • Current (selected): google/gemini-3-pro-preview
  • Active (runtime): google/gemini-2.5-flash

So your session is trying Pro Preview first, it fails / rate-limits, and OpenClaw immediately falls back to Flash to keep things running.

If you want it to stop hitting the rate limit wall, make Flash your selected model (so it doesn’t try Pro first every message):

Quick fix (just this Discord session)

Run:

  • /model google/gemini-2.5-flash

(Your earlier /model google/gemini-flash failed because that exact model ID isn’t in your allowed list / isn’t a valid ref in your config.)

Permanent fix (make Flash the default)

On the gateway machine:

#
openclaw models set google/gemini-2.5-flash
openclaw gateway restart

After that, you can optionally keep Pro Preview as a fallback (instead of primary) so it only gets used when it’s not throttled.

Docs:

If you still get cooldowns even on 2.5-flash, paste the first real Google error line (search for 429 / RESOURCE_EXHAUSTED) from your log — that’s what determines whether it’s “too many requests” vs “tier/model not allowed”.

high moon
#

thanks fixed