NConnect
DocsKimi K3 + Grok Build

TUTORIAL

How to run Kimi K3 with Grok Build

Use xAI's Grok Build terminal harness with Moonshot AI's Kimi K3 on Nebius Token Factory. No xAI API key needed, and your Nebius key never reaches api.x.ai.

Kimi K3Grok Build 5 minUpdated

Grok Build is xAI's terminal coding harness. Nebius does not serve Grok models, so NConnect runs the harness on Nebius models instead: you get Grok Build's interface driving Kimi K3, Moonshot AI's frontier open-weights model with a 1,048,576-token context window.

Prerequisites

Steps

  1. Install NConnect

    This installs the CLI and the ngrok alias, plus Bun if needed.

    curl -fsSL https://nconnect.sh/install.sh | bash
  2. Add your Nebius API key

    nconnect configure
  3. Install Grok Build

    Skip this if grok is already on your PATH. In an interactive terminal, NConnect also offers to run this for you the first time you launch Grok Build.

    curl -fsSL https://x.ai/cli/install.sh | bash
  4. Launch Grok Build on Kimi K3

    nconnect --model moonshotai/Kimi-K3 grok
    You should see
    NConnect ▸ Launching Grok Build with Nebius Token Factory (Kimi K3). Not xAI.

What NConnect does on launch

  • Serves the Nebius model catalog to Grok Build from a temporary localhost endpoint, so every Nebius model appears in Grok's model picker as Nebius · Kimi K3 and so on.
  • Uses an isolated, empty auth file. Your normal Grok login is ignored for the session and left untouched.
  • Points every xAI-native endpoint at the localhost server and turns off image generation, image editing and voice, which call api.x.ai directly. Your Nebius key can never be sent to xAI.
  • Adds a system rule so the model identifies itself as Kimi K3 on Nebius rather than claiming to be Grok.

Add your own rules

--rules and --append-system-prompt still work. NConnect merges them with its identity rule:

nconnect --model moonshotai/Kimi-K3 grok --rules "Prefer small, reviewable diffs."

Track cost and add fallback

Grok Build is a spawned harness, so by default it calls Nebius directly and NConnect reports $0.00. Route it through the daemon to meter every turn and get automatic fallback if Kimi K3 is busy:

NCONNECT_METER=1 nconnect --model moonshotai/Kimi-K3 grok

Then check spend with nconnect usage --last 7d. See Cost metering.

More tutorials