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.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.
Video walkthrough
Before you begin:
- An active Agent 37 account
- A running OpenClaw instance in Agent 37
- An xAI account
- 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.
Step 2: Open your Agent 37 instance
- Go to the Agent 37 dashboard.
- Open the OpenClaw instance you want to configure.
- Click Terminal.
Step 3: Start the OpenClaw configuration flow
In Terminal, run:- Where will the gateway run? →
Local - Select Section to Configure? →
Model - Model / Auth Provider →
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
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 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 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
Which Grok model should you choose
Start withgrok-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.