Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agent37.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

If you want to run OpenClaw with Grok, this guide walks you through the full setup inside Agent 37. You will create an xAI API key, open your hosted OpenClaw terminal, and configure Grok as the active model provider for your instance. This page is based on the video walkthrough below and turns it into a written blog-style guide you can follow step by step.

Video walkthrough

Before you begin:

Why use Grok with OpenClaw

Grok is a good option when you want to run OpenClaw on xAI models while keeping the same hosted Agent 37 workflow. Once your API key is ready, the setup is mostly a configuration change in the OpenClaw terminal.

Step 1: Create your xAI API key

  1. Open the xAI getting started guide.
  2. Sign in to your xAI account and open the API key section in the xAI Console.
  3. Create a new API key for the account you want to use with OpenClaw.
  4. Copy the key and store it somewhere safe.
Keep this key private. Anyone with the key can consume usage on your xAI account.

Step 2: Open your Agent 37 instance

  1. Go to the Agent 37 dashboard.
  2. Open the OpenClaw instance you want to configure.
  3. Click Terminal.
You will complete the full Grok setup from the hosted Agent 37 terminal. You do not need to configure this on your local machine.

Step 3: Start the OpenClaw configuration flow

In Terminal, run:
openclaw configure
When prompted, choose:
  1. Where will the gateway run?Local
  2. Select Section to Configure?Model
  3. Model / Auth ProviderXAI

Step 4: Add your xAI API key

After selecting the provider:
  1. Choose the xAI API key authentication option
  2. Paste the API key you created in Step 1
  3. Continue to the model picker
OpenClaw will save the credential to your instance configuration.

Step 5: Select a Grok model

Choose the Grok model you want OpenClaw to use as the active model for this instance. A common default choice is:
grok-4
xAI’s current docs describe grok-4 as the stable alias for its flagship Grok model, so it is a sensible starting point if you want a general setup.

Step 6: Verify the model is active

Run:
openclaw models list
You should see the selected Grok model in the output. If you want to switch models later, rerun openclaw configure or use the exact model identifier shown by OpenClaw in the model management commands.

What this changes in Agent 37

Once setup is complete:
  • your OpenClaw instance uses xAI as the configured provider
  • your agent can use the selected Grok model for prompts and workflows
  • you can keep using the same Agent 37 channels, tools, and hosted environment

Common issues

If the setup does not work on the first try, check these first:
  • the API key was copied correctly from xAI
  • you selected XAI in openclaw configure
  • the model name you picked is available on your xAI account
  • the configuration flow finished without interruption
  • your xAI account has available billing or credits if requests are rejected
If needed, rerun:
openclaw configure

Which Grok model should you choose

Start with grok-4 if you want a stable default and you are not optimizing for a special edge case yet. If your xAI account exposes newer aliases or dated variants, you can pick those later after you confirm the base setup works.

What to do next

Change default model

Switch between configured model providers as your workflow changes.

OpenAI API

Compare the Grok setup flow with the OpenAI provider flow.