Grok Build
Install
Run the appropriate command for your current terminal:
irm https://x.ai/cli/install.ps1 | iexmacOS/Linux:
curl -fsSL https://x.ai/cli/install.sh | bashAfter installation, check the version:
grok --version
Recommended: connect with CC Switch
- Open CC Switch, switch to the Grok page, then click + in the upper-right corner.

- Choose Custom Config.

- Enter the API Key you just created and set the request URL to https://api.himodels.ai/v1.

- Click the fetch button next to the default model and select the model you want to use. Keep the upstream format as Responses (native), then click Add.

- After adding the provider, return to the CC Switch home page and click Enable on the HiModels provider.

Verify
grok

Once you get a normal reply, open HiModels → Model Management and check the request time, model and group to confirm the call went through HiModels. For 401, 403 or 429 errors, see the FAQ.