Skip to content
DOCS / Grok

Grok

Route Grok through Fast Inference models with fast grok.

fast grok on registers every Fast Inference model as an inference-<id> table in ~/.grok/config.toml, backed by the gateway's chat-completions endpoint, and points [models].default at the model you picked.

Connect Grok

  1. Install

    bash
    npm install -g @inference/fast
  2. Activate

    bash
    fast grok on

    The first run signs you in through the browser and creates an API key for this machine. The command backs up Grok's config before editing it.

  3. Restart Grok

    Restart Grok and send a prompt; the request appears under Usage.

Choose a model

Grok uses kimi-k3-fast unless you pick another ID from the model catalog:

bash
fast grok on --model kimi-k3-fast

Run on again to change models. Restart Grok afterward.

Check status

bash
fast grok status

Shows the connection, model, and config path.

Disconnect

bash
fast grok off

Restores config.toml and user-settings.json from the backup taken by on, so edits made after connecting are lost. If you had your own apiKey in user-settings.json before connecting, it is restored; if the file only ever held the Inference key, it is removed. Restart Grok afterward.

Troubleshooting

  • Inference models are not listed in Grok — restart Grok and check that ~/.grok/config.toml has inference- model tables.
  • The reply still says it is Grok — expected. Grok always prepends You are Grok released by xAI, but that does not mean requests go to xAI. After fast grok on, traffic uses the Fast model in [models].default; confirm the request in Usage.
  • Requests return 401 — run fast status, then fast grok on.
  • Model rejected — pick an ID from the model catalog.