---
title: "Grok (xAI)"
description: "Set up Grok as the brain behind your HolaClaw assistant with an xAI API key. Get the key, connect it, and pick a model."
updated: 2026-06-11
canonical: https://holaclaw.ai/docs/ai-providers/grok
---

Grok is xAI's model, and it has a personality you'll notice right away — looser, more opinionated, and happy to weigh in confidently on current events. If the default cloud models feel a little buttoned-up for your taste, an assistant built on Grok is a refreshing change of voice.

```provider-card
name: Grok
company: xAI
tagline: A distinct voice with confident takes on current events.
hue: 270
key-url: https://console.x.ai
key-label: console.x.ai
auth: API key
cost: $$
recommended: Grok 4.3
```

## What you'll need

- An xAI account at [console.x.ai](https://console.x.ai).
- A payment method — you'll add API credits to your xAI console balance.
- HolaClaw installed on your Mac.

Five minutes, start to finish.

## Get your API key

Grok connects to HolaClaw with an **API key** — a long secret code that proves requests are coming from your account. Think of it as a password your assistant uses to talk to xAI on your behalf, so keep it private.

1. Sign in at [console.x.ai](https://console.x.ai).
2. Open the **API Keys** section and create a new key. Name it something you'll recognize, like "HolaClaw".
3. Copy the key as soon as it appears — it's shown in full only once. Lose it and you can just make a new one.
4. Add some credits to your console balance if it's empty, so your first message doesn't bounce back.

> **Heads-up — X Premium is not API access.** Paying for X (Twitter) Premium gets you Grok inside the X app and website, but that's a separate product. It does **not** power HolaClaw. For that you need an xAI console account with its own API credits, billed separately from any X subscription you may already have.

## Connect it to your assistant

You pick the provider while creating an assistant, in **Step 2 · Model provider** — the screen that says "Connect the brain behind your assistant."

1. In HolaClaw, start the **Create Assistant** flow and go to Step 2.
2. Choose **Grok** in the provider sidebar.
3. Paste your key into the **Grok API Key** field. It's masked like a password, which is expected.
4. Pick a model (below) and continue with the rest of the setup.

As the app notes right under the field: "Your credentials stay on your Mac — we never send them anywhere." The key is stored inside the assistant's private virtual machine on your Mac. HolaClaw's servers never see it, and xAI bills you directly — HolaClaw adds nothing on top.

## Choosing a model

HolaClaw offers two Grok models:

| Model | Best for | Notes |
| --- | --- | --- |
| **Grok 4.3** (recommended) | Everyday chat, companionship, current events | The all-round pick |
| **Grok Build 0.1** | Building and coding tasks | Experimental |

**Grok 4.3** is the recommended default and the right choice for almost everyone — it's the model that gives Grok its signature voice, and it's plenty capable for daily conversation.

**Grok Build 0.1** is an experimental model tuned for building and coding work. Try it if your assistant mostly helps you write or reason about code; for general chat, stick with Grok 4.3.

> **Tip — when in doubt, Grok 4.3.** The model choice is per-assistant, made at creation time. If you later want the other model, create a new assistant with it — your existing assistant keeps the brain it was born with.

## What it costs

xAI charges per **token** — roughly a short word or word-fragment of text. Every message you send and every reply your assistant writes uses some, and your console credit balance ticks down accordingly. No monthly fee — you pay only for what you use.

For a chatty daily assistant, that usually lands in the cents-per-day range. We don't quote exact prices here because they change; check current per-token rates in your [xAI console](https://console.x.ai).

## Troubleshooting

When something goes wrong with the connection to xAI, HolaClaw shows a banner in the chat explaining what happened:

- **"Grok is out of credits"** — your balance hit zero. Top up in the [xAI console](https://console.x.ai) and your assistant resumes on the next message.
- **"Grok API key is invalid, expired, or out of credits"** — the key was revoked, mistyped, or the account can't pay. Create a fresh key at console.x.ai and update it in the assistant's settings, or top up your balance.
- **"Grok rate limit or quota reached"** — you're sending requests faster than your account allows. Wait a moment and try again, or raise your limits in the xAI console.
- **"Grok is currently unreachable"** — xAI's servers are having a moment. Nothing to fix on your end; the next attempt goes through once their service recovers.

Still stuck? The [HolaClaw Discord](https://discord.gg/FbxAbS5sGQ) is a friendly place to ask.

## Next steps

Not sure Grok is the right brain for this assistant? Compare every option in [Choosing an AI provider](/docs/ai-providers/choosing-a-provider) — and remember you can always spin up another assistant with a different one, like [Claude](/docs/ai-providers/anthropic-claude), [OpenAI](/docs/ai-providers/openai), or [Google Gemini](/docs/ai-providers/google-gemini). If you'd rather reach Grok through a single key that also covers many other models, see [OpenRouter](/docs/ai-providers/openrouter).

