Model providers

Using Groq with OpenClaw

3 min read

Browse more in Model providers.

All model providers guides →

This guide shows you how to configure Groq as a model provider in OpenClaw using Groq’s OpenAI-compatible API. 3-70b-versatile as the default, and optionally enable Groq-powered audio transcription.

By the end, your OpenClaw agents and media tools will run through Groq’s ultra-fast LPU-backed models.

Prerequisites

  • A Groq account with access to the API and an API key from https://console.groq.com/keys
  • An existing OpenClaw setup where you can edit the main config file and environment (for example, ~/.openclaw/.env or env.shellEnv)
  • Network access from your OpenClaw environment to Groq’s OpenAI-compatible endpoints, including https://api.groq.com/openai/v1

Steps

  1. 1

    Create a Groq API key

    You need a Groq API key before OpenClaw can talk to Groq’s OpenAI-compatible API. Generate it in the Groq console so you can export it locally or inject it into your OpenClaw gateway environment.

    text
    Get an API key from https://console.groq.com/keys.
  2. 2

    Export GROQ_API_KEY in your shell

    Set GROQ_API_KEY in your shell while you are experimenting or running OpenClaw in the foreground. This keeps the key out of your code and lets OpenClaw authenticate every Groq request.

    bash
    export GROQ_API_KEY="gsk_..."
  3. 3

    Set a Groq default model for your agents

    Configure a Groq model as the primary default so all agents use Groq unless you override them. 3-70b-versatile for general-purpose chat and reasoning.

    json
    {
      agents: {
        defaults: {
          model: { primary: "groq/llama-3.3-70b-versatile" },
        },
      },
    }
  4. 4

    Move GROQ_API_KEY into your OpenClaw config file

    For long-running gateways or background services, put GROQ_API_KEY into the OpenClaw config so the daemon always sees it. This pattern keeps your environment consistent across restarts and system users.

    json
    {
      env: { GROQ_API_KEY: "gsk_..." },
      agents: {
        defaults: {
          model: { primary: "groq/llama-3.3-70b-versatile" },
        },
      },
    }
  5. 5

    Enable Groq for audio transcription

    If you want OpenClaw to use Groq’s Whisper-based transcription, configure Groq as the media-understanding provider. audio surface.

    json
    {
      tools: {
        media: {
          audio: {
            models: [{ provider: "groq" }],
          },
        },
      },
    }
  6. 6

    List available Groq models in OpenClaw

    Groq’s catalog changes frequently, so you should query it from OpenClaw instead of hardcoding model names. Use the models CLI and filter for groq to see what is currently available before you update your config.

    bash
    openclaw models list | grep groq

Configuration

OptionDescriptionExample
GROQ_API_KEYAPI key OpenClaw uses to authenticate against Groq’s OpenAI-compatible API.gsk_...
agents.defaults.model.primarySets the primary default model for all agents, here pointing to a specific Groq model.groq/llama-3.3-70b-versatile
tools.media.audio.models[].providerSelects Groq as the provider for audio transcription via the shared tools.media.audio surface.groq
tools.media.audioShared configuration path for media audio handling, including Groq-based transcription.{ tools: { media: { audio: { models: [{ provider: "groq" }], }, }, }, }

Troubleshooting

Groq calls fail when the OpenClaw Gateway runs as a daemon (launchd/systemd), but work in your interactive shell.

The daemon process does not see GROQ_API_KEY from your shell. shellEnv in your OpenClaw config.

bash
{
  env: { GROQ_API_KEY: "gsk_..." },
  agents: {
    defaults: {
      model: { primary: "groq/llama-3.3-70b-versatile" },
    },
  },
}

Your agent does not use Groq even though you configured a Groq model.

OpenClaw only routes to Groq when the primary model is set to a Groq-prefixed name. 3-70b-versatile" and that the model exists in the output of `openclaw models list | grep groq`.

bash
openclaw models list | grep groq

Frequently asked questions

Powered by Mem0

Add persistent memory to OpenClaw

Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.

More in Model providers