~/.grok/config.toml that point at Chat Completions on POST /v1/chat/completions.
This page covers LLM text only (
https://llm.modellix.ai).Modellix model IDs are provider/name (for example openai/gpt-5.5). Put that full string in each custom model’s model field so Grok Build sends it unchanged in the request body. See Models & Pricing.Set Up Grok Build
1
Install Grok Build
2
Get a Modellix API Key
Create a key in the Modellix console and export it. Grok Build reads the key from the environment variable named in Add the same line to your shell profile (for example
env_key:~/.zshrc), then run source ~/.zshrc.3
Add Custom Models
Edit the user config at Add or remove
~/.grok/config.toml (Windows: %USERPROFILE%\.grok\config.toml). If GROK_HOME is set, the file is $GROK_HOME/config.toml instead.Merge the [model."..."] tables into an existing file. Do not put custom models in a project .grok/config.toml—that file only accepts MCP servers, plugins, and permission rules.[model."..."] tables as needed. Quote the table key when the local ID contains / or ..Setting
models.default to a Modellix ID avoids falling back to a built-in xAI catalog model that requires XAI_API_KEY. Full catalog: Models & Pricing.4
Select a Modellix Model
Confirm Grok Build loaded the user config, then start a session from your project directory:In the TUI, switch models with You can also set
/model <id> (for example /model openai/gpt-5.5). Headless:GROK_DEFAULT_MODEL for the current session (same idea as -m).Troubleshooting
Related
- Grok Build overview — install, custom models, TUI and headless usage
- Grok Build settings —
config.tomlscopes and[model.<id>]fields - Models & Pricing — Model IDs and rates
- LLM API guide — protocols and curl examples
- OpenAI SDK — same
/v1Chat Completions gateway - OpenCode · Codex — other OpenAI-compatible agent setups