Skip to content

Grok Build Setup Guide: Connect to the NextHub API ​

Grok Build is a terminal coding assistant from xAI. According to the official documentation, its main configuration file is ~/.grok/config.toml, and you can point model requests at NextHub's Grok group (0.55x, official channel).

Connection Steps ​

1. Install Grok Build ​

powershell
irm https://x.ai/cli/install.ps1 | iex
bash
curl -fsSL https://x.ai/cli/install.sh | bash

After the installation finishes, reopen a terminal and run the following command to confirm it is available:

bash
grok --version

2. Open the Configuration Directory ​

bat
start "" "%USERPROFILE%\.grok"
bash
mkdir -p ~/.grok

If there is no config.toml in the directory, create a file with that name manually.

3. Write the Configuration ​

Write the following into config.toml:

toml
[models]
default = "grok-4.6"
web_search = "grok-4.6"

[endpoints]
models_base_url = "https://api.nexthub.cc/v1"

[model."grok-4.6"]
model = "grok-4.6"
name = "Grok 4.6"
description = "Grok 4.6 via NextHub"
api_key = "your NextHub ApiKey"
api_backend = "responses"
context_window = 500000
supports_backend_search = false

The Two Compatibility Switches

supports_backend_search = false turns off Grok backend search (the gateway does not provide this capability; leaving it enabled may cause an error because backend search parameters get appended to the request). If you want to adjust the thinking level with the /effort command and the --effort parameter, add a line supports_reasoning_effort = true to the same configuration block. After editing the configuration, restart Grok Build so that it is reloaded.

Remember to include /v1 in the Base URL

Fill in NextHub's OpenAI-compatible endpoint https://api.nexthub.cc/v1 for models_base_url. Use a key from the Grok group as your API Key; the Grok group currently provides the grok-4.5, grok-4.6, grok-4.3, and grok-4.20 series plus models such as grok-build-0.1 — for the full list, refer to the real-time data in the Model Plaza.

If you would rather not write the key directly into the configuration file, replace the api_key = "..." line with env_key = "NEXTHUB_API_KEY", then set NEXTHUB_API_KEY in your system environment variables. Note that env_key takes the name of an environment variable, not the key itself.

4. Verify the Configuration ​

bash
grok inspect
grok -p "reply with ok only" -m grok-4.6

If grok inspect can read the configuration and the test command receives an ok reply, you are connected.

Troubleshooting ​

The /effort command does not adjust the thinking level

The model does not declare supports_reasoning_effort = true (see "The Two Compatibility Switches" above), so the /effort command and the --effort parameter will not take effect for that model.

"Model does not exist" or "no permission" prompts

Check in turn: whether the ApiKey belongs to the Grok group, whether models_base_url is https://api.nexthub.cc/v1, whether the model matches the ID in the model list, and whether the key was copied in full (with no extra spaces before or after).

NextHub · Direct connections to OpenAI / Anthropic via official account pools — reliable, secure, and worry-free.