Skip to main content
kRouter
All providers

OAuth subscription

xai/

xAI (Grok)

xAI's Grok 4 — OAuth or API key.

x.ai

Quick setup

  1. Open the kRouter dashboard at http://localhost:20128

  2. Go to Providers → click the xAI (Grok) tile

  3. Click Connect and complete the OAuth flow in your browser

  4. Test the connection — kRouter auto-refreshes tokens from here on

Use in your IDE

Point any OpenAI-compatible client at kRouter using your local API key.

ide configbash
# Endpoint
http://localhost:20128/v1

# API key (from Dashboard → API Keys)
sk-krouter-XXXX

# Model
xai/grok-4