Coding Agents
Grok
Route Grok through the Inference.net gateway with inf grok.
inf grok routes Grok through https://api.inference.net/v1 using the chat completions surface. Grok stores one [model.*] section per registered model, with ids prefixed inference- so they cannot collide with your own entries.
Config file
inf writes fields in ~/.grok/config.toml (TOML). inf owns fields, not the whole file.
inf grok on
inf grok on| Flag | Required | Description | Default |
|---|---|---|---|
--model <alias> | No | Default Grok model selection | kimi-k3-fast |
See Model mapping for supported aliases and limits.
What gets written
inf writes one [model.inference-<alias>] section per registered model with model, base_url = "https://api.inference.net/v1", api_key, api_backend = "chat_completions", context_window, and name. The default selection lives at [models].default = "inference-<selected alias>".
The three registered sections are inference-glm-5.2-fast, inference-kimi-k3-fast, and inference-deepseek-v4-flash-0731.
[model."inference-glm-5.2-fast"]
model = "glm-5.2-fast"
base_url = "https://api.inference.net/v1"
api_key = "<gateway-key>"
api_backend = "chat_completions"
context_window = 262144
name = "Inference.net · glm-5.2-fast"inf grok status
inf grok statusinf grok off
inf grok offoff restores unchanged owned fields. It keeps fields that you edited after on.
Examples
Select DeepSeek:
inf grok on --model deepseek-v4-flash-0731Restart Grok after on or off. See Troubleshooting for drift, recovery, and key revocation.