xAI (Grok)
Configure xAI Grok models in BraceKit.
xAI (Grok)
xAIโs Grok models offer frontier-level reasoning with exceptional cost efficiency. BraceKit supports both chat and image generation.
Setup
1. Get an API Key
- Go to console.x.ai
- Sign in or create an account
- Navigate to API Keys
- Create a new key
2. Configure in BraceKit
- Open Settings โ AI Provider
- Select xAI from the provider dropdown
- Paste your API key
- Select a model
Settings are saved automatically as you type.
Available Models
Current Flagship
| Model | Best For | Context | Notes |
|---|---|---|---|
| grok-4.6 | Coding, agentic tasks | 500K | Current flagship, configurable reasoning |
| grok-4.5 | Coding, agentic tasks | 500K | Previous flagship, configurable reasoning |
| grok-4.3 | Balanced workloads | 1M | Strong reasoning + tool use |
Grok 4.20 Series
| Model | Best For | Context | Notes |
|---|---|---|---|
| grok-4.20-0309-reasoning | Complex reasoning | 1M | Extended thinking (alias grok-4.20) |
| grok-4.20-0309-non-reasoning | Fast responses | 1M | Quick, no reasoning (alias grok-4.20-non-reasoning) |
| grok-4.20-multi-agent-0309 | Multi-agent workflows | 1M | Coordinated agent runs |
Coding & Media
| Model | Best For | Notes |
|---|---|---|
| grok-build-0.1 | Agentic coding | Code-first model |
| grok-imagine-image | Image generation | Standard quality |
| grok-imagine-image-pro | Image generation | Higher quality |
| grok-imagine-image-quality | Image generation | Quality-tuned |
Features
Reasoning Mode
Grok 4.x models are reasoning models that show their thinking process:
- Click the brain icon (๐ง ) in the toolbar
- Send your message
- View the reasoning in a collapsible section
Note: Reasoning can be toggled per request. Use the
-non-reasoningvariants (e.g.grok-4.20-0309-non-reasoning) for quick responses without extended thinking.
Image Generation
Generate images with Grok:
- Select an image model (e.g.,
grok-imagine-image) - Choose an aspect ratio in the toolbar
- Describe the image
- Image appears in the response
You: Generate a futuristic city skyline at sunset
BraceKit: [Generated image appears here]
See Image Generation for details.
Function Calling
Grok models support tool calling for:
- MCP server tools
- Built-in tools (Google Search)
Vision
Grok Vision models can analyze images:
- Attach images to messages
- Ask questions about them
Model Parameters
Configure in Settings โ AI Provider under the Advanced section:
| Parameter | Range | Effect |
|---|---|---|
| Temperature | 0-2 | Higher = more creative |
| Max Tokens | 1-131K | Maximum response length |
Note: Reasoning models (Grok 4.x) donโt support
presencePenalty,frequencyPenalty, orstopparameters.
Image Generation Settings
| Aspect Ratio | Best For |
|---|---|
| auto | Model selects best (xAI only) |
| 1:1 | Profile pictures, icons |
| 16:9 | Banners, headers |
| 9:16 | Stories, mobile |
| 3:2 | Photography |
| 2:3 | Portrait photography |
Pricing
xAI pricing (per 1M tokens):
| Model | Input | Output | Context |
|---|---|---|---|
| grok-4.6 | $2.00 | $6.00 | 500K |
| grok-4.5 | $2.00 | $6.00 | 500K |
| grok-4.3 | $1.25 | $2.50 | 1M |
| grok-4.20-0309-reasoning | $1.25 | $2.50 | 1M |
| grok-4.20-0309-non-reasoning | $1.25 | $2.50 | 1M |
Note: Check xAI pricing for current rates. Image generation priced separately.
Troubleshooting
โAPI key invalidโ
- Verify your key is correct
- Check the key hasnโt been revoked
- Ensure you have credits in your account
โParameter not supportedโ
- Reasoning models donโt support
presencePenalty,frequencyPenalty,stop - Remove these parameters from your request
Image generation slow
- Image generation takes 10-30 seconds
- Complex prompts take longer
- Try simpler prompts for faster results
Model not available
- Some models require API tier upgrade
- Check xAI Console for your access
Related
- Gemini โ Alternative image generation
- Image Generation โ Full guide
- Configuration โ All settings