n8vDocs

Grok

xAI's coding agent with Grok 4.6 and optional Grok 4.7 reasoning levels.

Setup

Grok runs on your own xAI subscription (SuperGrok or X Premium+) or, when enabled for your account, on a Grok compatible provider (your own proxy endpoint). There is no credits fallback for Grok tasks.

To connect your subscription:

  1. Install the Grok CLI locally: npm install -g @xai-official/grok
  2. Sign in with your subscription: grok login
  3. Copy the contents of ~/.grok/auth.json
  4. Paste it under Add Credential → Grok on the settings page

n8v validates the pasted session immediately, stores the tokens encrypted, and keeps them refreshed server-side. The agent environment only ever receives a short-lived access token; never your refresh token.

Compatible providers

If enabled for your account, you can alternatively connect a Grok compatible provider under Add Credential → Grok Compatible Provider: a base URL and an API key for a proxy endpoint you control. Grok traffic is then routed to your endpoint (OpenAI chat-completions wire format, streaming) with your key sent as a Bearer token. Whichever credential is active in the credentials list is the one your tasks use.

Upstream model is optional and defaults to the selected model (grok-4.6 or grok-4.7). Set it when your proxy publishes a different model id; most proxies serve their own catalog, and sending an id they do not know fails the task immediately with unknown provider for model …. Check your endpoint's GET /v1/models and paste the id you want Grok tasks to run on.

Grok 4.7 retries transient upstream failures twice and uses a 90-second inference idle timeout. An unavailable provider still prevents the task from completing.

Available Models

  • Grok 4.6 High
  • Grok 4.7 High, when enabled for your account
  • Grok 4.7 X-High, when enabled for your account

Grok 4.7 has a 500,000-token context window. High is the standard effort; X-High spends more time reasoning on difficult tasks. Grok 4.6 remains the default.

Features

Slash Commands

Grok supports the universal slash commands:

  • /clear - Clear conversation history
  • /compact - Compact conversation

Other custom slash commands are not available with Grok. Learn more in the Slash Commands documentation.

Limitations

  • Requires a connected xAI subscription (or an enabled compatible provider); tasks fail with a clear error if nothing is connected.
  • Plan mode and image attachments are not yet supported.
  • MCP servers configured in your environment are not yet passed to Grok.