ready. Connect supports automatic setup.
Literal mode is the default. Only the selected model stores your API key. Other models need
RUNINFRA_API_KEY in the environment before you select them.Connect Grok Build
Have Grok Build installed, a workspace API key, and available RunInfra credits.on. In an interactive terminal, Connect starts login if needed. Review and approve the proposed changes. Connect saves a snapshot, writes the model settings, and makes a real Chat Completions request that uses credits.
To choose a model during setup:
What Connect writes
When
GROK_HOME is set, Connect writes config.toml inside that directory. Check which configuration Grok Build loads before use.
Connect adds a [model.runinfra-<model-id>] table for each catalog model. It writes the exact API model id, base_url = "https://api.runinfra.ai/v1", the catalog name and context_window, and api_backend = "chat_completions".
Connect sets [models] default to runinfra-<model-id> for the selected model. Unrelated model settings are preserved. A table name alone does not establish ownership of its credentials or destination.
Key placement
Literal mode writesapi_key only in the selected model’s table and removes its env_key. That selected model does not need RUNINFRA_API_KEY in the environment. Other RunInfra model tables use env_key = "RUNINFRA_API_KEY".
For helper mode:
env_key = "RUNINFRA_API_KEY" instead of a literal api_key. Set the variable securely in the environment that launches Grok Build.
Pass the helper key to the app
Pass the helper key to the app
Export
RUNINFRA_API_KEY with your RunInfra API key in the environment that launches the app. Restart GUI apps and background services with that environment.On Windows, set RUNINFRA_API_KEY in your user environment, then fully restart the app. GUI and Start menu launches do not receive a terminal-only $env:RUNINFRA_API_KEY value. Connect does not change your external environment.Verify
Grok Build 1.0.13 on Windows completed verified round trips on September 8, 2026, with both literalapi_key and helper env_key settings. Both returned RUNINFRA_OK and were confirmed in RunInfra usage. The literal-key run succeeded with RUNINFRA_API_KEY absent from the environment.
Inspect the loaded configuration:
deepseek-v4-flash. Connect prints it but does not execute it:
plain, not text. Other supported choices are json, streaming-json, and streaming-messages-json.
Restart
Restart Grok Build. Rungrok inspect to check which configuration is loaded. Confirm the selected RunInfra model and request destination separately. Connect’s API probe does not verify Grok Build.
Known behaviours
Still checkGROK_HOME edge cases, precedence when both credential forms are present, parser edge cases, and restoration after Grok saves changes.
Connect replaces owned literal credentials on other RunInfra model tables with environment references. Before selecting another model, ensure that the actual Grok Build process has RUNINFRA_API_KEY.
Troubleshooting
Revert
off restored the original config.toml byte for byte. With intact state and snapshots, off restores the original bytes from before the first on in the active connection. If the file did not exist then, Connect removes it. Later on calls and key rotations keep that restore point.
If Grok Build or another editor changed the file, Connect refuses to overwrite it. Back up and review the edits before choosing to discard them:
config.toml does not restore your external environment.
Related
Connect
Set up, inspect, and restore your coding agent.
Chat completions
Read the request contract.
Models
Find model ids and context windows.