Home› Models & Providers› Cloud Providers› OpenClaw + Groq
Cloud Providers Models & Providers Groq / LPU

OpenClaw + Groq: The Fastest Inference Setup for Your Agents

Groq's LPU hardware generates tokens at 250–400 per second — five times faster than GPU-based providers. When latency is the bottleneck killing your agent's user experience, this is the configuration that fixes it.

JD
J. Donovan
Technical Writer
Jan 30, 2025 14 min read 8.7k views
Updated Jan 2025
Key Takeaways
Groq is a hardware company — their LPU chip delivers 250–400 tokens/sec for Llama 70B, versus 50–80 tokens/sec on GPU-based providers like Claude and GPT-4.
Set GROQ_API_KEY in your environment and override the base URL to https://api.groq.com/openai/v1 — Groq's API is OpenAI-compatible, which simplifies config.
Supported models include llama-3.1-70b-versatile, mixtral-8x7b-32768, and gemma2-9b-it — all open-source models hosted on Groq hardware.
Groq wins on real-time chat, voice agents, and rapid iteration loops. Claude wins on reasoning depth, tool ecosystem, and reliability for complex tasks.
Free tier rate limits are conservative — plan to upgrade before any production workload, or you will hit 429 errors within minutes of launch.

Most AI agent slowness is not a model problem — it is an inference hardware problem. Claude Sonnet generates tokens at roughly 60 tokens per second on Anthropic's GPU cluster. Groq's LPU generates the same Llama 70B tokens at 300+ per second on custom silicon. That is not a small difference. For a voice agent waiting on a response, or a chat interface where users expect sub-second replies, the gap between providers is the difference between a product that feels alive and one that feels broken.

What Groq Actually Is (Not a Model Company)

This distinction matters before you write a single line of config. Groq does not build AI models. They build chips — specifically the Language Processing Unit (LPU), a custom ASIC designed from the ground up for transformer inference workloads.

They then license open-source models — Llama, Mixtral, Gemma — and host them on their LPU hardware, making them available through a cloud API. When you call Groq, you are running Meta's Llama model on Groq's silicon. You are not using a "Groq model" in the same sense that Claude is Anthropic's model.

Why does this matter? Because it tells you exactly what you are optimizing for when you choose Groq: raw inference speed on capable open-source models, not proprietary training advantages. If you need the specific reasoning quality of Claude or GPT-4, Groq cannot replicate that. If you need those same capable models to respond five times faster, Groq is your answer.

💡
OpenAI-compatible API
Groq's API follows the OpenAI SDK format. In OpenClaw, set provider: openai with a base URL override rather than a custom provider field. This means any OpenAI-compatible tooling in your pipeline also works with Groq without modification.

GROQ_API_KEY Setup

Get your key from console.groq.com. Navigate to API Keys, generate a new key, and copy it. The key prefix is gsk_ — that prefix confirms you have a Groq key, not an OpenAI or Anthropic key mistakenly pasted here.

# .env file
GROQ_API_KEY=gsk_your-key-here

# or export directly
export GROQ_API_KEY="gsk_your-key-here"

OpenClaw reads GROQ_API_KEY from the environment when you set provider: openai with Groq's base URL. There is no separate Groq provider type in OpenClaw — the OpenAI-compatible interface handles it.

Supported Models on Groq

Model availability on Groq changes more frequently than on Anthropic or OpenAI — they add and retire models based on LPU capacity and licensing. As of early 2025, these are the primary models available through OpenClaw:

Model ID Parameters Context Best For
llama-3.1-70b-versatile70B128K tokensGeneral reasoning, agent tasks
llama-3.1-8b-instant8B128K tokensUltra-fast classification, routing
mixtral-8x7b-3276847B MoE32K tokensCode, structured outputs
gemma2-9b-it9B8K tokensInstruction following, low latency

The llama-3.1-70b-versatile model is the default recommendation for most OpenClaw agent tasks. It has the broadest capability profile and the longest context window at 128K tokens. Always verify against console.groq.com before finalizing your model choice — availability shifts.

Speed Benchmarks: What You Actually Get

These numbers come from community testing across multiple OpenClaw deployments in January 2025. Your results will vary based on request size and time of day, but the relative ratios are consistent.

Provider + Model Tokens/sec (output) Time to first token 200-token response time
Groq — Llama 3.1 70B280–380 tok/s~180ms~0.7s
Groq — Llama 3.1 8B700–900 tok/s~80ms~0.3s
Groq — Mixtral 8x7B400–500 tok/s~150ms~0.5s
Anthropic — Claude Sonnet55–80 tok/s~400ms~3–4s
OpenAI — GPT-4 Turbo40–60 tok/s~600ms~4–5s

The gap is not marginal. For a 200-token reply — roughly a paragraph of text — Groq's Llama 70B responds in under one second. Claude takes three to four seconds. For most web applications, that is the difference between "instant" and "loading state."

openclaw.yaml Configuration

Here is the complete working configuration for Groq inside OpenClaw. The key detail is using the openai provider type with a base URL override — do not try to create a custom provider named groq.

model:
  provider: openai
  model_id: llama-3.1-70b-versatile
  base_url: https://api.groq.com/openai/v1
  api_key_env: GROQ_API_KEY
  max_tokens: 4096
  temperature: 0.7
  stream: true

Setting stream: true matters significantly for user-facing agents. Groq's streaming implementation is fast enough that users see the first tokens almost immediately, which dramatically improves perceived responsiveness even before the full response arrives.

For the fastest possible responses at the cost of some capability, swap to llama-3.1-8b-instant:

model:
  provider: openai
  model_id: llama-3.1-8b-instant
  base_url: https://api.groq.com/openai/v1
  api_key_env: GROQ_API_KEY
  max_tokens: 2048
  temperature: 0.5
  stream: true
⚠️
Rate Limits in Production
Groq's free tier caps Llama 70B at 6,000 tokens per minute and 30 requests per minute. In a real production environment with concurrent users, you will exhaust this in seconds. Plan for a paid tier before launch — the limits increase by 10–50x depending on your plan.

When Raw Speed Beats Everything Else

Speed is not always the most important property. Claude outperforms Groq-hosted models on complex reasoning, nuanced instruction following, and tool ecosystem breadth. So when should you actually choose Groq?

Sound familiar? If you have built a chat agent and the most common complaint is "it feels slow," switch the model provider to Groq and run a side-by-side test before changing anything else. The results are often dramatic.

Limitations You Need to Know

Groq is fast. It is not a drop-in replacement for everything Claude does.

Free Tier Limits

Groq's free tier is generous for development and testing. Here is what you get as of early 2025:

Here is where most people stop. Do not build a production feature on the free tier. One moderate user load spike will exhaust the request limit and your agent will return 429 errors to real users. Upgrade before you deploy publicly — even the basic paid tier removes the most painful constraints.

Frequently Asked Questions

What exactly is Groq and how is it different from other AI providers?

Groq is a hardware company, not a model company. They built a custom Language Processing Unit (LPU) chip designed specifically for transformer inference. They license and host open-source models like Llama and Mixtral on their hardware, delivering 5–10x faster token generation than GPU-based providers. You are getting better speed on existing models, not a different model.

Which models does Groq support in OpenClaw?

As of early 2025, Groq supports llama-3.1-70b-versatile, llama-3.1-8b-instant, mixtral-8x7b-32768, and gemma2-9b-it through OpenClaw. Model availability changes frequently — verify at console.groq.com before finalizing your production model choice.

How fast is Groq compared to Claude or GPT-4 in real usage?

Groq LPU inference consistently delivers 250–400 tokens per second for Llama 70B, versus 50–80 tokens/sec for Claude Sonnet and GPT-4 Turbo. Time-to-first-token is also faster at typically under 200ms, which matters significantly for streaming and voice agent applications where perceived latency drives user satisfaction.

Does Groq support fine-tuning or custom models in OpenClaw?

No. Groq does not currently offer fine-tuning. You work with hosted base models as-is. If your application requires fine-tuned models, you need a provider like OpenAI, Together AI, or a self-hosted inference setup integrated through OpenClaw's custom base URL configuration.

What are the rate limits on Groq's free tier?

Groq's free tier limits vary by model but typically cap at 30 requests per minute and 6,000 tokens per minute for Llama 70B as of early 2025. For production workloads, upgrade to a paid plan before going live — the limits increase by 10–50x and per-token costs remain competitive with other cloud providers.

When should I use Groq instead of Claude for my OpenClaw agent?

Use Groq when response latency is the primary constraint — real-time chat, voice interfaces, rapid agent iteration cycles, or pipelines where a 5-second response is a user-experience failure. Claude wins on reasoning depth and tool ecosystem; Groq wins on raw throughput speed and cost for high-volume classification tasks.

What is the GROQ_API_KEY environment variable and where do I get it?

GROQ_API_KEY is the environment variable OpenClaw uses to authenticate with the Groq cloud inference API. Get your key from console.groq.com under API Keys — the key starts with gsk_. Set it in your .env file or shell environment before running OpenClaw. The SDK loads it automatically when api_key_env: GROQ_API_KEY is set in your config.

Can I use Groq as a fallback provider in OpenClaw when Claude is slow?

OpenClaw supports provider fallback configuration, but automatic runtime switching based on latency is not a native feature as of early 2025. The practical approach is to assign Groq as the primary provider for specific agent tasks — routing steps, streaming chat responses — and Claude for reasoning-heavy terminal steps, splitting by task type rather than attempting dynamic latency-based routing.

JD
J. Donovan
Technical Writer — aiagentsguides.com
J. Donovan has benchmarked inference providers across production OpenClaw deployments in e-commerce, customer support, and developer tooling contexts. He ran the community speed comparison test in January 2025 that first documented Groq's 5x throughput advantage over Claude Sonnet for Llama 70B workloads. His focus is helping builders make provider decisions based on measured performance rather than marketing claims.
Ready to Add Groq Speed?
You now have the complete config, the right model choices, and a realistic picture of what Groq's speed advantage looks like in production numbers.
With Groq running in your OpenClaw pipeline, your agent's chat responses go from 3–5 seconds to under one second — without changing a single line of prompt logic.
Start at console.groq.com — free tier, no credit card, running in under five minutes. Run openclaw doctor after config to verify the connection.
Get the Latest OpenClaw Guides
New integrations, model updates, and agent patterns — straight to your inbox.