Using xAI (Grok) With BIGGI
xAI is the company behind Grok, a large language model known for its conversational abilities and large context window. Grok models are designed to provide helpful, informative, and contextually relevant responses.
Website: https://x.ai/
BIGGI supports two ways to connect xAI:
- 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 or X Premium Subscription (OAuth)
If you have an active SuperGrok or X Premium subscription, you can authenticate with xAI using OAuth and use Grok models directly without needing a separate API key.
Why use SuperGrok or X Premium?
- 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 BIGGI handles token management automatically.
- Automatic token refresh: BIGGI refreshes your access token in the background so long-running sessions stay authenticated.
SuperGrok and X Premium subscription access works directly in the VS Code extension. BIGGI stores the connection in the local runtime.
Setup with SuperGrok / X Premium
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.
Tips for SuperGrok and X Premium
- Subscription required: You need an active SuperGrok or X Premium subscription. This option will not work with a free xAI account.
- Sign out: Use the Disconnect button in the provider settings.
- Port 56121: The browser OAuth flow (PKCE) starts a short-lived local server on
127.0.0.1:56121to 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. BIGGI persists the latest tokens automatically. If another process invalidates the connection, open Settings → Providers and reconnect xAI.
Option 2: 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
- Sign Up/Sign In: Go to the xAI Console. Create an account or sign in.
- Navigate to API Keys: Go to the API keys section in your dashboard.
- Create a Key: Click to create a new API key. Give your key a descriptive name (e.g., "BIGGI").
- Copy the Key: Important: Copy the API key immediately. You will not be able to see it again. Store it securely.
Configuration with API Key
Open Settings (gear icon) and go to the Providers tab. Click Show more providers, then search for or select xAI and enter your API key.
The extension stores this in your biggi.json config file. You can also edit the file directly.
Reasoning Capabilities
Some models feature specialized reasoning capabilities, allowing them to "think before responding" - particularly useful for complex problem-solving tasks.
Controlling Reasoning Effort
When using reasoning-enabled models, you can control how hard the model thinks with the reasoning_effort parameter:
low: Minimal thinking time, using fewer tokens for quick responseshigh: Maximum thinking time, leveraging more tokens for complex problems
Choose low for simple queries that should complete quickly, and high for harder problems where response latency is less important.
Key Features
- Step-by-Step Problem Solving: The model thinks through problems methodically before delivering an answer
- Math & Quantitative Strength: Excels at numerical challenges and logic puzzles
- Reasoning Trace Access: The model's thinking process is available via the
reasoning_contentfield in the response completion object
Tips and Notes
- Context Window: Most Grok models feature large context windows (up to 131K tokens), allowing you to include substantial amounts of code and context in your prompts.
- Vision Capabilities: Select vision-enabled models (
grok-2-vision-latest,grok-2-vision, etc.) when you need to process or analyze images. - Pricing: API key pricing varies by model, with input costs ranging from $0.3 to $5.0 per million tokens and output costs from $0.5 to $25.0 per million tokens. Refer to the xAI documentation for the most current pricing information.
- Performance Tradeoffs: "Fast" variants typically offer quicker response times but may have higher costs, while "mini" variants are more economical but may have reduced capabilities.