Skip to content

Configure Grok Build

Define a model profile, choose credentials and an API backend, then switch Grok Build onto a new connection.

Updated View as Markdown
For humans

Grok Build operates with one current model profile: its live configuration points to one active connection. Its default directory is ~/.grok, and OcHub can also manage its MCP servers. Start from the official xAI preset, fill the form manually, or choose a configured model provider.

  1. Define the profile. It is the client configuration name used by [models].default.

  2. Enter the upstream model. This is the model ID sent to the provider; the display name is only for readability.

  3. Enter the Base URL. Use the base address for the selected protocol.

  4. Choose credentials. API Key writes the secret to configuration. Environment variable stores only a name such as XAI_API_KEY, which must exist in Grok Build’s runtime environment.

  5. Choose an API backend. Select OpenAI Responses, OpenAI Chat Completions, or Anthropic Messages to match the upstream.

  6. Set the context window. Use the actual token limit supported by the upstream model.

  7. Review config.toml and switch. Restart Grok Build and make a real request.

Illustrated walkthroughClick a screen to enlarge it, then use ← → to walk the steps. The blue outline marks the control or result.
1
STEP 01Define the profile
2
STEP 02Enter the upstream model
3
STEP 03Enter the Base URL
4
STEP 04Choose API-key or environment authentication
5
STEP 05Select the matching API backend
6
STEP 06Set the context window
7
STEP 07Review config.toml and switch

If environment-variable mode works in an OcHub check but not in Grok Build, the two processes probably inherited different environments. Launch from the same terminal or define the variable in the environment Grok Build actually reads.

One-click model provider

At the top of the connection editor, change the source from Direct connection to Model provider. After you pick a configured model provider, OcHub fills in the local gateway address, issues a key, and pins the API backend to OpenAI Responses. You only set the profile name, upstream model, and display name. Dialect conversion happens in the gateway, so a Chat Completions-only upstream does not need to be written as a Grok Build direct connection.

You can also apply the same model provider to Grok Build from the Model providers page after saving it.

After saving, follow the verification checklist to confirm the switch. For effective configuration, custom backends, permissions, sandboxing, and compatibility imports, see Advanced Grok Build pitfalls.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close