docs(kilo-docs): update xAI documentation to include X Premium subscription

Update the xAI Grok documentation to reflect that X Premium subscriptions can also be used via OAuth, in addition to SuperGrok subscriptions.
This commit is contained in:
kiloconnect[bot]
2026-05-27 14:40:19 -04:00
committed by Ari Messer
parent 3bb55b3768
commit 1efb794762
+16 -16
View File
@@ -1,6 +1,6 @@
---
title: "Using xAI Grok with Kilo Code"
description: "Connect xAI's Grok models to Kilo Code. Use a SuperGrok subscription via OAuth or a paid API key. Guide to setup in VS Code and the CLI."
description: "Connect xAI's Grok models to Kilo Code. Use a SuperGrok or X Premium subscription via OAuth or a paid API key. Guide to setup in VS Code and the CLI."
sidebar_label: xAI (Grok)
---
@@ -12,33 +12,33 @@ xAI is the company behind Grok, a large language model known for its conversatio
Kilo Code supports two ways to connect xAI:
- **SuperGrok subscription (OAuth):** If you subscribe to SuperGrok, you can sign in with OAuth — no separate API key or pay-as-you-go charges required.
- **SuperGrok or X Premium subscription (OAuth):** If you subscribe to SuperGrok or X Premium, you can sign in with OAuth — no separate API key or pay-as-you-go charges required.
- **API key:** For pay-as-you-go access via the xAI API.
---
## Option 1: SuperGrok Subscription (OAuth)
## Option 1: SuperGrok or X Premium Subscription (OAuth)
If you have an active [SuperGrok subscription](https://x.ai/grok), you can authenticate with xAI using OAuth and use Grok models directly without needing a separate API key.
If you have an active [SuperGrok or X Premium subscription](https://x.ai/grok), you can authenticate with xAI using OAuth and use Grok models directly without needing a separate API key.
### Why use SuperGrok?
### Why use SuperGrok or X Premium?
- **No API billing:** Usage counts against your SuperGrok subscription, not a pay-per-token API account.
- **No API billing:** Usage counts against your subscription, not a pay-per-token API account.
- **OAuth login — no API keys:** Sign in through your browser and Kilo Code handles token management automatically.
- **Automatic token refresh:** Kilo Code refreshes your access token in the background so long-running sessions stay authenticated.
{% callout type="note" %}
SuperGrok subscription access works with Kilo Code's core functionality (VS Code extension and CLI). For cloud features such as Cloud Agents or KiloClaw, use the [Kilo Gateway](/docs/gateway) — the Gateway supports xAI via [BYOK](/docs/getting-started/byok) with an API key (OAuth/SuperGrok is not supported through the Gateway).
SuperGrok and X Premium subscription access works with Kilo Code's core functionality (VS Code extension and CLI). For cloud features such as Cloud Agents or KiloClaw, use the [Kilo Gateway](/docs/gateway) — the Gateway supports xAI via [BYOK](/docs/getting-started/byok) with an API key (OAuth/ subscriptions are not supported through the Gateway).
{% /callout %}
### Setup with SuperGrok
### Setup with SuperGrok / X Premium
{% tabs %}
{% tab label="VSCode (Legacy)" %}
1. Open Kilo Code settings (click the gear icon {% codicon name="gear" /%} in the Kilo Code panel).
2. In **API Provider**, select **xAI**.
3. Click **Sign in with xAI (SuperGrok)**.
3. Click **Sign in with xAI (SuperGrok / X Premium)**.
4. Complete the authorization flow in your browser.
5. Back in Kilo Code settings, select your desired Grok model.
6. Save.
@@ -46,22 +46,22 @@ SuperGrok subscription access works with Kilo Code's core functionality (VS Code
{% /tab %}
{% tab label="VSCode" %}
Open **Settings** (gear icon) and go to the **Providers** tab. Click **Show more providers**, then search for or select **xAI**. Choose the **xAI Grok OAuth (SuperGrok Subscription)** sign-in option and complete the OAuth flow in your browser.
Open **Settings** (gear icon) and go to the **Providers** tab. Click **Show more providers**, then search for or select **xAI**. Choose the **xAI Grok OAuth (SuperGrok / X Premium)** sign-in option and complete the OAuth flow in your browser.
For headless or remote environments (VPS, SSH, Docker, WSL) where a browser redirect to `127.0.0.1` is not reachable, choose **xAI Grok OAuth (Headless / Remote / VPS)** instead. You will be shown a short code to enter at a URL you open on any device with a browser.
{% /tab %}
{% tab label="CLI" %}
Run the auth command and follow the xAI SuperGrok sign-in flow:
Run the auth command and follow the xAI sign-in flow:
```bash
kilo auth login --provider xai
```
Kilo Code offers two OAuth methods at the prompt:
Kilo Code offers three methods at the prompt:
- **xAI Grok OAuth (SuperGrok Subscription)** — opens `https://auth.x.ai` in your browser for a standard PKCE OAuth flow. Best for local desktop environments.
- **xAI Grok OAuth (SuperGrok / X Premium)** — opens `https://auth.x.ai` in your browser for a standard PKCE OAuth flow. Best for local desktop environments.
- **xAI Grok OAuth (Headless / Remote / VPS)** — uses the RFC 8628 device-code flow. The CLI displays a short code and a URL; open the URL on any device with a browser, enter the code, and the CLI completes the login. Use this when running on a VPS, behind SSH, inside Docker, WSL, or CI where `127.0.0.1:56121` is not accessible from your browser.
- **Manually enter API Key** — fall back to a standard API key if you prefer.
@@ -76,9 +76,9 @@ Then set your default model:
{% /tab %}
{% /tabs %}
### Tips for SuperGrok
### Tips for SuperGrok and X Premium
- **Subscription required:** You need an active SuperGrok subscription. This option will not work with a free xAI account.
- **Subscription required:** You need an active SuperGrok or X Premium subscription. This option will not work with a free xAI account.
- **Sign out:** To disconnect in VS Code, use the "Disconnect" button in the provider settings. In the CLI, run `kilo auth logout` and choose xAI.
- **Port 56121:** The browser OAuth flow (PKCE) starts a short-lived local server on `127.0.0.1:56121` to receive the OAuth callback. If another application is already using that port, use the headless device-code method instead.
- **Token rotation:** xAI rotates refresh tokens on each use. Kilo Code persists the latest tokens automatically. If you run Kilo Code from multiple processes simultaneously, the first refresh can invalidate the other process's token — re-run `kilo auth login --provider xai` to restore the session.
@@ -87,7 +87,7 @@ Then set your default model:
## Option 2: API Key
If you prefer pay-as-you-go access or do not have a SuperGrok subscription, you can use an xAI API key.
If you prefer pay-as-you-go access or do not have a SuperGrok or X Premium subscription, you can use an xAI API key.
### Getting an API Key