Table of Contents
- Video walkthrough
- Why use Grok with OpenClaw
- Step 1: Create your xAI API key
- Step 2: Open your Agent 37 instance
- Step 3: Start the OpenClaw configuration flow
- Step 4: Add your xAI API key
- Step 5: Select a Grok model
- Step 6: Verify the model is active
- What this changes in Agent 37
- Common issues
- Which Grok model should you choose
- What to do next
Do not index
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 guide you can follow step by step.
Video walkthrough

Before you begin, you need an active Agent 37 account, a running OpenClaw instance in Agent 37, an xAI account, and a valid xAI API key.
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
- Open the xAI getting started guide.
- Sign in to your xAI account and open the API key section in the xAI Console.
- Create a new API key for the account you want to use with OpenClaw.
- 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
- Go to the Agent 37 dashboard.
- Open the OpenClaw instance you want to configure.
- 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 configureWhen prompted, choose:
- Where will the gateway run? Choose
Local
- Select Section to Configure? Choose
Model
- Model / Auth Provider Choose
XAI
Step 4: Add your xAI API key
After selecting the provider:
- Choose the xAI API key authentication option
- Paste the API key you created in Step 1
- 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.5xAI's current docs describe
grok-4.5 as its flagship model, so it is a sensible starting point if you want a general setup. Older ids like grok-4 were retired in May 2026 and now silently route to grok-4.3, so avoid them unless you specifically want that behavior.Step 6: Verify the model is active
Run:
openclaw models listYou 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
XAIinopenclaw 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 configureWhich Grok model should you choose
Start with
grok-4.5 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 the default model in OpenClaw as your workflow changes.
- Set up OpenClaw with an OpenAI API key to compare provider flows.