> ## Documentation Index
> Fetch the complete documentation index at: https://floodgate.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Build

> Install Grok Build and register Floodgate custom models.

Grok Build supports custom model IDs and OpenAI-compatible base URLs. Connect it to Floodgate using **`grok-4.7`**, **`gpt-6-sol`**, or **`claude-opus-5-5`**.

## 1. Install Grok Build

```bash theme={null}
curl -fsSL https://x.ai/cli/install.sh | bash
```

## 2. Set your Floodgate key

```bash theme={null}
export FLOODGATE_API_KEY="YOUR_API_KEY"
```

PowerShell:

```powershell theme={null}
$env:FLOODGATE_API_KEY = "YOUR_API_KEY"
```

## 3. Register the models

Create `~/.grok/config.toml`. On Windows, use `%USERPROFILE%\.grok\config.toml`.

```toml theme={null}
[model.grok-4-7]
model = "grok-4.7"
base_url = "https://api.floodgate.dev/v1"
name = "Grok 4.7 (Floodgate)"
env_key = "FLOODGATE_API_KEY"

[model.gpt-6-sol]
model = "gpt-6-sol"
base_url = "https://api.floodgate.dev/v1"
name = "GPT-6 Sol (Floodgate)"
env_key = "FLOODGATE_API_KEY"

[model.claude-opus-5-5]
model = "claude-opus-5-5"
base_url = "https://api.floodgate.dev/v1"
name = "Claude Opus 5.5 (Floodgate)"
env_key = "FLOODGATE_API_KEY"

[model.deepseek-v4-1-flash]
model = "deepseek-v4.1-flash"
base_url = "https://api.floodgate.dev/v1"
name = "DeepSeek V4.1 Flash (Floodgate)"
env_key = "FLOODGATE_API_KEY"

[models]
default = "grok-4-7"
```

## 4. Verify and run

```bash theme={null}
grok inspect
cd /path/to/your/project
grok -m grok-4-7
```

Switch models inside the TUI with `/model <alias>`, for example `/model gpt-6-sol`.

Run headlessly:

```bash theme={null}
grok -p "Review this repository and identify security issues" -m grok-4-7
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.