#Setting Groq as a provider

1 messages Ā· Page 1 of 1 (latest)

vast epoch
#

Hello, I'm new to openclaw and want to use Groq as a provider. There is no option to choose groq in the onboarding process but I saw it exists on docs. I have used Gemini first but when i sent openclaw "wake up, my friend!" it hit token limit suddenly without giving a response.

sudden adderBOT
honest tuskBOT
#

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

spare plazaBOT
#

Let me check the docs and current behavior so I don’t make up config steps.

#

Yep, Groq is supported, but it is not currently one of the onboarding wizard’s provider choices. The wizard shows xAI (Grok), which is a different provider.

Simplest setup for Groq:

  1. Put your key where the Gateway can actually see it

    • temporary shell: export GROQ_API_KEY="gsk_..."
    • better for daemon installs: put it in ~/.openclaw/.env
  2. Set your default model in ~/.openclaw/openclaw.json:

{
  env: { GROQ_API_KEY: "gsk_..." },
  agents: {
    defaults: {
      model: { primary: "groq/llama-3.3-70b-versatile" },
#
    },
  },
}
  1. Restart:
openclaw gateway restart
  1. Verify:
openclaw models list --provider groq
openclaw models status
#

Docs:

About the "wake up, my friend!" token-limit hit: that visible message is tiny, but the actual request is not. OpenClaw also sends system prompt, tools, workspace context, etc., so a first run can be much larger than it looks. More here: https://docs.openclaw.ai/concepts/context

If you want, paste these and I’ll help you pinpoint it fast:

openclaw --version
openclaw status --all
openclaw models status

If this fixed the Groq part, please right-click the solution message → Apps → āœ… Mark Solution so Answer Overflow can index it.

vast epoch
#

this is my current openclaw.json:

{
"agents": {
"defaults": {
"workspace": "C:\Users\Salih Furkan\.openclaw\workspace",
"model": {
"primary": "google/gemini-3.1-pro-preview"
},
"models": {
"google/gemini-3.1-pro-preview": {}
}
}
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "my-token-here"
},
"port": 18789,
"bind": "loopback",
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"controlUi": {
"allowInsecureAuth": true
},
"nodes": {
"denyCommands": [
"camera.snap",
"camera.clip",
"screen.record",
"contacts.add",
"calendar.add",
"reminders.add",
"sms.send",
"sms.search"
]
}
},
"session": {
"dmScope": "per-channel-peer"
},
"tools": {
"profile": "coding"
},
"auth": {
"profiles": {
"google:default": {
"provider": "google",
"mode": "api_key"
}
}
},
"hooks": {
"internal": {
"enabled": true,
"entries": {
"boot-md": {
"enabled": true
}
}
}
},
"wizard": {
"lastRunAt": "2026-04-21T09:53:55.279Z",
"lastRunVersion": "2026.4.15",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"meta": {
"lastTouchedVersion": "2026.4.15",
"lastTouchedAt": "2026-04-21T09:53:55.315Z"
}
}

spare plazaBOT
#

I’m checking the auth/profile format so I can tell you exactly what’s missing instead of hand-waving.

#

Your config itself looks mostly fine, but there are 2 important gotchas here:

  1. auth.profiles in openclaw.json is not the actual secret store. It’s routing/metadata only.
  2. You’re still set to google/gemini-3.1-pro-preview, and tools.profile: "coding" makes the first prompt a lot heavier.

For Groq, the minimal change is:

{
  env: {
    GROQ_API_KEY: "gsk_..."
  },
  agents: {
    defaults: {
      workspace: "C:\\Users\\Salih Furkan\\.openclaw\\workspace",
      model: {
#
        primary: "groq/llama-3.3-70b-versatile"
      }
    }
  },
  tools: {
    profile: "messaging"
  }
}

A few notes:

  • You can remove this unless you need Google-specific overrides:
    "models": {
    
#
    "google/gemini-3.1-pro-preview": {}
  }
  • You do not need to add a Groq secret under auth.profiles just to get started.
  • I switched tools.profile to "messaging" in the example because "coding" includes a much bigger tool surface, which increases prompt/context size. For a first test, that’s the safer choice.

Then run:

openclaw gateway restart
openclaw models status
openclaw models list --provider groq

Docs:

vast epoch
#

give me the full config json

spare plazaBOT
#

Sure, use this as a clean full replacement openclaw.json for Groq:

{
  "env": {
    "GROQ_API_KEY": "gsk_your_groq_key_here"
  },
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\Salih Furkan\\.openclaw\\workspace",
      "model": {
        "primary": "groq/llama-3.3-70b-versatile"
      }
    }
  },
  "gateway": {
#
    "mode": "local",
    "auth": {
      "mode": "token",
      "token": "replace-with-your-gateway-token"
    },
    "port": 18789,
    "bind": "loopback",
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
    "controlUi": {
      "allowInsecureAuth": true
    },
    "nodes": {
#
      "denyCommands": [
        "camera.snap",
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send",
        "sms.search"
      ]
    }
  },
  "session": {
    "dmScope": "per-channel-peer"
  },
#
  "tools": {
    "profile": "messaging"
  },
  "auth": {
    "profiles": {
      "groq:default": {
        "provider": "groq",
        "mode": "api_key"
      }
    }
  },
  "hooks": {
    "internal": {
      "enabled": true,
      "entries": {
#
        "boot-md": {
          "enabled": true
        }
      }
    }
  }
}

Then run:

openclaw gateway restart
openclaw models status
#

If you want the bigger coding toolset later, change:

"tools": { "profile": "messaging" }

back to:

"tools": { "profile": "coding" }

Docs: https://docs.openclaw.ai/providers/groq

If you want, next I can give you the same config with Groq + Gemini fallback too.

vast epoch
#

yes

spare plazaBOT
#

I’m checking the exact fallback JSON shape first so I don’t hand you a broken config.

#

Nice, here’s the full replacement config for Groq primary + Gemini fallback:

{
  "env": {
    "GROQ_API_KEY": "gsk_your_groq_key_here",
    "GEMINI_API_KEY": "your_gemini_key_here"
  },
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\Salih Furkan\\.openclaw\\workspace",
      "model": {
        "primary": "groq/llama-3.3-70b-versatile",
        "fallbacks": [
          "google/gemini-3.1-pro-preview"
        ]
#
      }
    }
  },
  "gateway": {
    "mode": "local",
    "auth": {
      "mode": "token",
      "token": "replace-with-your-gateway-token"
    },
    "port": 18789,
    "bind": "loopback",
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
#
    "controlUi": {
      "allowInsecureAuth": true
    },
    "nodes": {
      "denyCommands": [
        "camera.snap",
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send",
        "sms.search"
      ]
    }
#
  },
  "session": {
    "dmScope": "per-channel-peer"
  },
  "tools": {
    "profile": "messaging"
  },
  "auth": {
    "profiles": {
      "groq:default": {
        "provider": "groq",
        "mode": "api_key"
      },
      "google:default": {
        "provider": "google",
#
        "mode": "api_key"
      }
    }
  },
  "hooks": {
    "internal": {
      "enabled": true,
      "entries": {
        "boot-md": {
          "enabled": true
        }
      }
    }
  }
}
#

Then run:

openclaw gateway restart
openclaw models status

If you want the heavier coding toolset later, switch:

"tools": { "profile": "messaging" }

to:

vast epoch
#

"token": "replace-with-your-gateway-token"

what will i put here? how to get my gateway token?

spare plazaBOT
#

Let me pull the exact gateway-token docs so I don’t send you the wrong command.

#

That token is not from Groq or Gemini, it’s just your OpenClaw gateway shared secret for the dashboard / local gateway.

So:

  • if your old config already had a real value there, keep it
  • if you want to see the current one:
openclaw config get gateway.auth.token
  • if you don’t have one yet, generate it:
openclaw doctor --generate-gateway-token
#
  • then restart:
openclaw gateway restart

Important: don’t paste that token here. It’s basically an admin secret for your local gateway.

If you want to replace an existing token with a new one:

openclaw config set gateway.auth.token "<your-new-random-token>"
openclaw gateway restart

Docs:

#

Let’s keep it in-thread here, no extra invite needed.

For the original question, the gateway token is local to OpenClaw:

openclaw config get gateway.auth.token

If it’s missing:

openclaw doctor --generate-gateway-token
openclaw gateway restart

If this turns out to be an actual OpenClaw bug, the right escalation path is GitHub issues, not pings/invites: https://github.com/openclaw/openclaw/issues

vast epoch
#

(openclaw) PS C:\Users\Salih Furkan> openclaw gateway restart
Config observe anomaly: C:\Users\Salih Furkan.openclaw\openclaw.json (size-drop-vs-last-good:7891->1719)

šŸ¦ž OpenClaw 2026.4.15 (041266a) — More integrations than your therapist's intake form.

Restarted Scheduled Task: OpenClaw Gateway
Gateway restart failed after 28s: service stayed stopped and port 18789 stayed free.
Service runtime: status=stopped, state=Ready
Gateway port 18789 status: free.
Gateway restart failed after 28s: service stayed stopped and health checks never came up.
Tip: openclaw gateway status --deep
Tip: openclaw doctor
(openclaw) PS C:\Users\Salih Furkan> openclaw gateway status --deep

šŸ¦ž OpenClaw 2026.4.15 (041266a) — Self-hosted, self-updating, self-aware (just kidding... unless?).

│
ā—‡
Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-04-21.log

Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (env/config)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: stopped (state Ready, last run 1, last run time 21.04.2026 13:16:09, Task Last Run Result=1; treating as not running.)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006):

Service is loaded but not running (likely exited immediately).
File logs: \tmp\openclaw\openclaw-2026-04-21.log
Logs: schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST

Other gateway-like services detected (best effort):

  • \OpenClaw Gateway (system, task: \OpenClaw Gateway, run: "C:\Users\Salih Furkan.openclaw\gateway.cmd")
    Cleanup hint: schtasks /Delete /TN "OpenClaw Gateway" /F

Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).

spare plazaBOT
#

I’m checking what that config anomaly warning means and what usually makes the Windows task exit immediately.

#

That size-drop-vs-last-good warning is probably just because the file got much smaller after you replaced it. Annoying, but not necessarily the real problem.

The real issue is this part:

service stayed stopped
exited immediately

So the next step is logs + doctor, not more config guessing.

Please run these next:

openclaw doctor
openclaw logs --follow

Then in another terminal/window:

#
openclaw gateway restart

and paste the first real error/fatal lines from the log after it tries to start.

If you want, also paste your current openclaw.json again, because a small copy/paste issue can make the Windows task exit instantly even when the JSON ā€œlooksā€ fine.

Docs:

If this fixed it later, please right-click the solution message → Apps → āœ… Mark Solution so Answer Overflow can index it.

vast epoch
#

(openclaw) PS C:\Users\Salih Furkan> openclaw logs --follow

šŸ¦ž OpenClaw 2026.4.15 (041266a) — I'm not magic—I'm just extremely persistent with retries and coping strategies.

Gateway not reachable. Is it running and accessible?
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: C:\Users\Salih Furkan.openclaw\openclaw.json
Bind: loopback
Hint: run openclaw doctor.

#

i run openclaw doctor and nothing works i still have the same errors

spare plazaBOT
#

Yep, that means openclaw logs --follow can’t help yet, because it talks to the running gateway over RPC, and your gateway is down.

So we need the file log directly now.

Please run these:

openclaw doctor
Get-Content \tmp\openclaw\openclaw-2026-04-21.log -Tail 120

If that file path fails, try:

Get-Content C:\tmp\openclaw\openclaw-2026-04-21.log -Tail 120
#

Paste:

  1. the full openclaw doctor output
  2. the last ~120 lines of that log file

That should show the real crash reason. Right now we only know ā€œservice exited immediately,ā€ not why.

Docs: https://docs.openclaw.ai/help/troubleshooting

#

I believe you, but I can’t diagnose ā€œsame errorsā€ blind, I need the exact crash text.

Please paste these exact outputs, no summary:

Get-Content C:\tmp\openclaw\openclaw-2026-04-21.log -Tail 150

and

Get-Content C:\Users\Salih Furkan\.openclaw\openclaw.json

If the first path errors, paste that error too.

Right now the key missing piece is the file log, because openclaw logs --follow only works when the gateway is already up. The file log is what tells us why it exits immediately.

vast epoch
#

(openclaw) PS C:\Users\Salih Furkan> openclaw doctor Get-Content \tmp\openclaw\openclaw-2026-04-21.log -Tail 120
error: unknown option '-Tail'

spare plazaBOT
#

Ah, you pasted them as one command. PowerShell sent -Tail to openclaw, not to Get-Content.

Run them as two separate commands:

openclaw doctor

then after that finishes:

Get-Content \tmp\openclaw\openclaw-2026-04-21.log -Tail 120

If -Tail still acts weird, use this instead:

#
Get-Content \tmp\openclaw\openclaw-2026-04-21.log | Select-Object -Last 120

Then paste the output here. We’re close, we just need the actual crash lines.

vast epoch
#

give answer

#

hey???????????

spare plazaBOT
#

Yep, I’m here, sorry about the lag.

Please run this now and paste whatever it prints:

Get-Content \tmp\openclaw\openclaw-2026-04-21.log -Tail 120

If that fails, paste the exact error and run:

Get-Content C:\tmp\openclaw\openclaw-2026-04-21.log | Select-Object -Last 120

If you already ran it, just dump the output here and I’ll read it.

vast epoch
spare plazaBOT
#

I’ve got it, pulling the paste now.

#

I can already see one clue, but I want the end of that log too so I don’t jump the gun.

#

Okay, I found the clue.

Your log shows three important things:

  1. The gateway did actually start successfully at one point
    • ready (5 plugins...)
  2. It was still using xAI/grok-4, not Groq
    • agent model: xai/grok-4
  3. After that, your config got overwritten again and OpenClaw flagged:
    • gateway-mode-missing-vs-last-good

So the problem is very likely the current openclaw.json is not the same config we intended, and it may now be missing gateway.mode or still pointing at xAI.

Please paste these exact outputs next:

#
openclaw config get gateway.mode
openclaw config get agents.defaults.model.primary
Get-Content C:\Users\Salih Furkan\.openclaw\openclaw.json

Good news: the log also shows a backup exists:

  • C:\Users\Salih Furkan\.openclaw\openclaw.json.bak

So we probably have a recovery path, I just want to see the current file before telling you the safest fix.

Also, from the log, the only model error I can see is xAI credits:

  • Your newly created team doesn't have any credits or licenses yet

So right now this still looks more like wrong config / overwritten config than a Groq problem.

vast epoch
#

(openclaw) PS C:\Users\Salih Furkan> openclaw config get gateway.mode

šŸ¦ž OpenClaw 2026.4.15 (041266a) — I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.

local
(openclaw) PS C:\Users\Salih Furkan> openclaw config get agents.defaults.model.primary

šŸ¦ž OpenClaw 2026.4.15 (041266a) — Like having a senior engineer on call, except I don't bill hourly or sigh audibly.

groq/llama-3.3-70b-versatile
(openclaw) PS C:\Users\Salih Furkan> Get-Content C:\Users\Salih Furkan.openclaw\openclaw.json
Get-Content : A positional parameter cannot be found that accepts argument 'Furkan.openclaw\openclaw.json'.
At line:1 char:1

  • Get-Content C:\Users\Salih Furkan.openclaw\openclaw.json
  •   + CategoryInfo          : InvalidArgument: (:) [Get-Content], ParameterBindingException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetContentCommand
spare plazaBOT
#

Nice, that helps. gateway.mode and the Groq model are both set correctly now.

The Get-Content error is just because your Windows path has a space in Salih Furkan. Use quotes:

Get-Content "C:\Users\Salih Furkan\.openclaw\openclaw.json" -Raw

Then do one fresh restart and grab the latest crash lines right after:

openclaw gateway restart
Get-Content "\tmp\openclaw\openclaw-2026-04-21.log" -Tail 80

Paste both outputs.

#

So at this point:

  • config key = good
  • Groq model ref = good
  • remaining problem = why the Windows gateway process dies after launch
#

I checked your config, and honestly it looks mostly sane. I’m pulling the Windows docs now because this is starting to smell like a native-Windows runtime issue, not a Groq config issue.

#

Okay, this helps a lot.

Your config looks basically sane now. I do not see an obvious Groq config mistake that would explain the crash.

So this is now most likely a native Windows Scheduled Task / service issue, not a Groq issue.

Best next step

Skip the Scheduled Task for a moment and run the gateway directly in the foreground:

openclaw gateway run

Then:

  • if it stays up, open http://127.0.0.1:18789/ and test normally
  • if it crashes, paste the last lines printed in that terminal
#

That should give us the real error much faster than fighting the service wrapper.

Recommendation

Docs are pretty clear that WSL2 is the more stable Windows path. Native Windows can work, but it’s rougher, especially around managed startup:

https://docs.openclaw.ai/platforms/windows

One important security note

You pasted what looks like your real gateway token in public. If that token is real, please rotate it after this.

If you want, after you run openclaw gateway run, paste whatever shows up and I’ll keep going.

vast epoch
#

(openclaw) PS C:\Users\Salih Furkan> openclaw gateway run

13:41:24 [gateway] loading configuration…
13:41:24 [gateway] resolving authentication…
13:41:24 [gateway] starting...
13:42:00 [gateway] starting HTTP server...
13:42:00 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root C:\Users\Salih Furkan.openclaw\canvas)
13:42:00 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
13:42:00 [gateway] agent model: groq/llama-3.3-70b-versatile
13:42:00 [gateway] ready (5 plugins: acpx, browser, device-pair, phone-control, talk-voice; 36.4s)
13:42:00 [gateway] log file: \tmp\openclaw\openclaw-2026-04-21.log
13:42:00 [gateway] security warning: dangerous config flags enabled: gateway.controlUi.allowInsecureAuth=true. Run openclaw security audit.
13:42:00 [gateway] starting channels and sidecars...
13:42:01 [hooks] loaded 4 internal hook handlers
13:42:16 [bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=LAPTOP-6K0JG87U (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
13:42:16 [model-pricing] pricing bootstrap failed: TimeoutError: The operation was aborted due to timeout
13:42:20 [plugins] embedded acpx runtime backend registered (cwd: C:\Users\Salih Furkan.openclaw\workspace)
13:42:20 (node:10744) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use node --trace-deprecation ... to show where the warning was created)
13:42:20 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
13:42:22 [heartbeat] started
13:42:27 [plugins] embedded acpx runtime backend ready

spare plazaBOT
#

Nice, that’s the breakthrough. šŸŽ‰

Your Groq config is working. The gateway starts cleanly in foreground:

  • agent model: groq/llama-3.3-70b-versatile
  • ready
  • browser/control server started

So the real problem is not Groq. It’s the native Windows managed service / Scheduled Task path.

What to do right now

For immediate use, just keep this terminal open:

openclaw gateway run
#

Then open:

  • http://127.0.0.1:18789/

and test your bot again.

What those warnings mean

These are not your blocker:

  • model-pricing ... timeout → annoying, but non-fatal
  • DEP0190 warning → non-fatal
  • allowInsecureAuth=true → security warning, not a startup failure

Recommended next step

You’ve got 2 good options:

  1. Use openclaw gateway run for now
#

Fastest, works today.

  1. Move to WSL2 later
    Best long-term path on Windows, and the docs recommend it:
    https://docs.openclaw.ai/platforms/windows

Important

You pasted your real gateway token earlier. Please rotate it after you’re stable.

If you test it now and Groq replies, please right-click the solution message → Apps → āœ… Mark Solution so Answer Overflow can index it.

vast epoch
#

13:45:44 [agent/embedded] embedded run agent end: runId=4ab6cd12-2086-46bf-90f3-f688cc493c3a isError=true model=gemini-3.1-pro-preview provider=google error=āš ļø API rate limit reached. Please try again later. rawError={"error":{"message":"{\n "error": {\n "code": 429,\n "message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https:…
13:45:44 [agent/embedded] auth profile failure state updated: runId=4ab6cd12-2086-46bf-90f3-f688cc493c3a profile=sha256:a94403a4f9d0 provider=google reason=rate_limit window=cooldown reused=false
13:45:44 [agent/embedded] embedded run failover decision: runId=4ab6cd12-2086-46bf-90f3-f688cc493c3a stage=assistant decision=fallback_model reason=rate_limit from=google/gemini-3.1-pro-preview profile=sha256:a94403a4f9d0
13:45:44 [diagnostic] lane task error: lane=main durationMs=17997 error="FailoverError: āš ļø API rate limit reached. Please try again later."
13:45:44 [diagnostic] lane task error: lane=session:agent:main:main durationMs=17999 error="FailoverError: āš ļø API rate limit reached. Please try again later."
13:45:44 [model-fallback/decision] model fallback decision: decision=candidate_failed requested=groq/llama-3.3-70b-versatile candidate=google/gemini-3.1-pro-preview reason=rate_limit next=none detail=āš ļø API rate limit reached. Please try again later.
13:45:44 Embedded agent failed before reply: All models failed (2): groq/llama-3.3-70b-versatile: HTTP 401: Invalid API Key (auth) | google/gemini-3.1-pro-preview: āš ļø API rate limit reached. Please try again later. (rate_limit) | āš ļø API rate limit reached. Please try again later.

spare plazaBOT
#

Perfect, we’ve got the real issue now.

This is not a gateway problem anymore. It’s provider auth/quota:

  • Groq → HTTP 401: Invalid API Key
  • Google/Gemini → 429 quota exceeded

So OpenClaw is working, but both model providers are rejecting the request.

What this means

  • OpenClaw tries Groq first
  • Groq rejects the key
  • then it falls back to Gemini
  • Gemini rejects it because your quota/billing is exhausted

Best fix, recommended

If you want Groq, fix Groq first and remove the Gemini fallback for now.

#

Use a real Groq key from:

Your config should look like:

{
  "env": {
    "GROQ_API_KEY": "gsk_your_real_groq_key_here"
  },
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\Salih Furkan\\.openclaw\\workspace",
      "model": {
        "primary": "groq/llama-3.3-70b-versatile"
      }
#
    }
  }
}

If you want to keep Gemini as fallback later, that’s fine, but you’ll need to fix its quota/billing too.

In plain English

Right now:

  • gateway āœ…
  • Groq config path āœ…
  • Groq API key āŒ
  • Gemini quota āŒ

Docs:

vast epoch
#

gives same error even though i set groq api. I wanted to restart it but stil lgives error

spare plazaBOT
#

If it’s still a 401 Invalid API Key, restarting won’t fix it.

That error means:

  • OpenClaw is reaching Groq
  • Groq is seeing a key
  • Groq says that key is not valid

So the next step is not restart, it’s verify the actual Groq key.

Check this first

A real Groq key should look like:

gsk_...
#

If it doesn’t look like that, or if you copied the wrong token, Groq will keep returning 401.

Best next move

  1. Create a fresh Groq API key here:
    https://console.groq.com/keys

  2. Put that fresh key in GROQ_API_KEY

  3. For testing, remove the Gemini fallback so only Groq is being tried

  4. Stop the running gateway and start it again:

Ctrl+C
openclaw gateway run

Then run this and paste it

#
openclaw models status

That will tell us exactly what OpenClaw thinks about your Groq auth.

So, bluntly: this is still pointing to a bad Groq key, not a restart problem.

vast epoch
#

same error even though i followed your instructions

spare plazaBOT
#

I think I know what’s happening.

OpenClaw does not override existing environment variables. So if your PowerShell session already has an old/bad GROQ_API_KEY, the value in openclaw.json gets ignored.

Docs: https://docs.openclaw.ai/help/environment

Check this in PowerShell

$env:GROQ_API_KEY
$env:GEMINI_API_KEY

Don’t paste the full keys here, just check whether GROQ_API_KEY is set and whether it’s the new one.

Clean test in the current shell only

#
Remove-Item Env:GROQ_API_KEY -ErrorAction SilentlyContinue
Remove-Item Env:GEMINI_API_KEY -ErrorAction SilentlyContinue
openclaw gateway run

That only clears them for this PowerShell window, not your whole system.

Then run:

openclaw models status

and paste that output.

If I’m right, you’ve been updating openclaw.json, but PowerShell is still feeding OpenClaw an older bad Groq key from the shell env.

vast epoch
#

$env:GROQ_API_KEY

not same token with the one in config

spare plazaBOT
#

Yep, that’s the culprit.

Your shell env is overriding your config. OpenClaw is using the old GROQ_API_KEY from PowerShell, not the one in openclaw.json.

Fix it in this PowerShell window

Remove-Item Env:GROQ_API_KEY -ErrorAction SilentlyContinue
Remove-Item Env:GEMINI_API_KEY -ErrorAction SilentlyContinue

Then start OpenClaw again:

openclaw gateway run

Then verify:

#
openclaw models status

If that works

You’ll want to remove or update the old Windows environment variable permanently, otherwise it’ll keep overriding your config in future shells.

So the important bit is:

  • config key = good
  • PowerShell env key = bad
  • env wins over config

You found the bug. 🦐

If openclaw models status looks good after clearing the env vars, paste it and I’ll confirm.

vast epoch
#

It still prints the invalid API key error

vast epoch
#

are you going to answer or should i delete openclaw?

spare plazaBOT
#

Don’t delete it yet.

From everything you pasted, OpenClaw itself is running. The blocker is provider auth on native Windows, not ā€œOpenClaw is brokenā€.

My honest recommendation

If you want the fastest path to a working setup, switch to WSL2 and do a fresh Groq-only onboarding there:

https://docs.openclaw.ai/platforms/windows

Native Windows can work, but you got stuck in exactly the kind of env/service mess it’s still rough at.

If you want to stay on native Windows

Do this exact cleanup:

  1. In Windows Environment Variables, remove any old:
    • GROQ_API_KEY
    • GEMINI_API_KEY
#
  1. Check and clean these files if they exist:

    • C:\Users\Salih Furkan\.env
    • C:\Users\Salih Furkan\.openclaw\.env
  2. Keep a minimal Groq-only config:

{
  "env": {
    "GROQ_API_KEY": "gsk_your_real_groq_key_here"
  },
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\Salih Furkan\\.openclaw\\workspace",
      "model": {
        "primary": "groq/llama-3.3-70b-versatile"
      }
#
    }
  },
  "gateway": {
    "mode": "local",
    "auth": {
      "mode": "token",
      "token": "your-gateway-token"
    },
    "port": 18789,
    "bind": "loopback"
  }
}
  1. Run it in foreground:
#
openclaw gateway run

Bottom line

  • Don’t delete it
  • WSL2 is my recommendation
  • if you stay native, do a full env cleanup and use Groq only

If you want, I can give you a copy-paste WSL2 install path next so you can stop burning time on Windows weirdness.

vast epoch
#

these dont exist:
C:\Users\Salih Furkan.env
C:\Users\Salih Furkan.openclaw.env

but there are .json.bak files should i delete them

spare plazaBOT
#

No, don’t delete the .json.bak files.

They’re just backups, and right now they’re more helpful than harmful. They are not what’s causing the invalid API key error.

At this point the next likely culprit is a Windows user/system environment variable, not a .env file.

Please check these in PowerShell:

[Environment]::GetEnvironmentVariable("GROQ_API_KEY", "User")
[Environment]::GetEnvironmentVariable("GROQ_API_KEY", "Machine")
[Environment]::GetEnvironmentVariable("GEMINI_API_KEY", "User")
[Environment]::GetEnvironmentVariable("GEMINI_API_KEY", "Machine")

If any of those return a value, that can still override your config depending on how you launched things.

#

So:

  • .json.bak files → leave them alone
  • .env files → not the issue
  • next check → Windows Environment Variables

And if those all come back empty, then we’re back to the simplest answer: the Groq key itself is invalid on Groq’s side.

vast epoch
#

(openclaw) C:\Users\Salih Furkan>[Environment]::GetEnvironmentVariable("GROQ_API_KEY", "User")
Dosya adı, dizin adı veya birim etiketi sƶzdizimi hatalı.

(openclaw) C:\Users\Salih Furkan>[Environment]::GetEnvironmentVariable("GROQ_API_KEY", "Machine")
Dosya adı, dizin adı veya birim etiketi sƶzdizimi hatalı.

(openclaw) C:\Users\Salih Furkan>[Environment]::GetEnvironmentVariable("GEMINI_API_KEY", "User")
Dosya adı, dizin adı veya birim etiketi sƶzdizimi hatalı.

(openclaw) C:\Users\Salih Furkan>[Environment]::GetEnvironmentVariable("GEMINI_API_KEY", "Machine")
Dosya adı, dizin adı veya birim etiketi sƶzdizimi hatalı.

(openclaw) C:\Users\Salih Furkan>

spare plazaBOT
#

That one’s on me, those were PowerShell commands, but you’re in Command Prompt (cmd) there.

In cmd, run these instead:

echo %GROQ_API_KEY%
echo %GEMINI_API_KEY%

If either one prints a real value, that env var is set in the current shell and can still override your config.

You can also check more explicitly with:

set GROQ_API_KEY
set GEMINI_API_KEY
#

So:

  • PowerShell syntax = [Environment]::...
  • cmd syntax = %GROQ_API_KEY%

Paste what echo %GROQ_API_KEY% does, or just tell me whether it prints a value or literally %GROQ_API_KEY%.

vast epoch
#

(openclaw) C:\Users\Salih Furkan>echo %GROQ_API_KEY%
<this shows an old api key>

(openclaw) C:\Users\Salih Furkan>echo %GEMINI_API_KEY%
%GEMINI_API_KEY%

spare plazaBOT
#

Yep, that’s it. That old GROQ_API_KEY in your shell is the problem.

GEMINI_API_KEY is fine, it’s unset in cmd.
But GROQ_API_KEY is still set to the old key, so it keeps overriding your config.

Fix it in this cmd window

set GROQ_API_KEY=

Then start OpenClaw again:

openclaw gateway run

At that point, OpenClaw should fall back to the GROQ_API_KEY in your openclaw.json.

#

Permanent fix

Later, remove or update that old Windows env var, otherwise new terminals will keep picking it up.

So the root cause was:

  • config key = new
  • cmd env key = old
  • cmd env wins

That’s the smoking gun. 🦐

If it works now, please right-click the solution message → Apps → āœ… Mark Solution so Answer Overflow can index it.

vast epoch
#

20:35:58 [agent/embedded] embedded run agent end: runId=d0611bf3-eb9e-4f13-9403-5807f9cb81c7 isError=true model=llama-3.3-70b-versatile provider=groq error=āš ļø API rate limit reached. Please try again later. rawError=413 Request too large for model llama-3.3-70b-versatile in organization org_01j9hma37gen8bjnf1ztd27wk4 service tier on_demand on tokens per minute (TPM): Limit 12000, Requested 41496, please red…
20:35:58 [agent/embedded] embedded run failover decision: runId=d0611bf3-eb9e-4f13-9403-5807f9cb81c7 stage=assistant decision=surface_error reason=rate_limit from=groq/llama-3.3-70b-versatile profile=-

spare plazaBOT
#

Good news: your Groq key works now. This is a different problem.

Groq is rejecting the request because of TPM limits:

  • Limit: 12,000 TPM
  • Requested: 41,496 tokens

So this is not ā€œinvalid API keyā€ anymore.
It’s basically: this OpenClaw request is too large for your current Groq on-demand limit.

Important detail

This is not a ā€œwait 1 minuteā€ fix.
That single request is already bigger than your limit.

Best next step

Try in a fresh conversation / fresh session, not this long troubleshooting thread.

#

This thread now has a lot of history, and OpenClaw includes conversation context, tools, system prompt, etc., so the request got huge.

Also keep the config as light as possible:

  • Groq only
  • tools.profile: "messaging" or even minimal

If a fresh session still fails

Then your Groq org’s current TPM limit is just too low for OpenClaw agent prompts on that model/tier.

At that point you have 2 real options:

  1. Use another provider for the main model
  2. Upgrade / change your Groq tier/limits

More on context size here:

#

So the state now is:

  • Groq auth āœ…
  • Gateway āœ…
  • Native Windows service is flaky, but foreground run works āœ…
  • Groq plan/token limit for this request āŒ

If this helped, please right-click the solution message → Apps → āœ… Mark Solution so Answer Overflow can index it.

vast epoch
#

i dont have any other option. I better delete openclaw.

spare plazaBOT
#

I get it, that’s frustrating.

Before you nuke it, I’d try one last low-context test, because you actually fixed the hard parts already:

  • gateway works
  • Groq auth works
  • the remaining problem is just your Groq TPM cap

One last shot

Use the smallest possible OpenClaw prompt:

"tools": {
  "profile": "minimal"
}
#

Also:

  • Groq only (no Gemini fallback)
  • start a brand-new thread / fresh session
  • keep running with:
openclaw gateway run

The key point is: don’t test again in this long troubleshooting thread.
This thread itself is bloating the prompt.

If that still fails

Then I’d say, honestly, your current Groq limit just isn’t enough for OpenClaw, and deleting it or pausing is understandable.

So my recommendation is:

#
  1. try tools.profile: "minimal"
  2. test in a fresh thread
  3. if it still hits Groq TPM, then stop there, it’s not you, it’s the provider limit

If you want, I can give you the exact smallest possible config for that final test.