xAI’s Grok models have access to real-time data from X (Twitter) and provide large context windows with strong reasoning capabilities.
Supported Models
| Model | ID | Context | Tools | Notes |
|---|
| Grok 2 | grok-2 | 131K | Yes | Latest stable |
| Grok 3 | grok-3 | 131K | Yes | Most capable |
| Grok 2 Mini | grok-2-mini | 131K | Yes | Faster/cheaper |
Setup
Get an API key
Apply for API access at x.ai. Set the environment variable
export XAI_API_KEY=xai-...
Verify
profclaw doctor --provider xai
Environment Variables
Your xAI API key. Format: xai-...
Configuration Example
providers:
xai:
api_key: "${XAI_API_KEY}"
Model Aliases
| Alias | Model |
|---|
grok | grok-2 |
grok-3 | grok-3 |
Usage Examples
profclaw chat --model grok "What is trending in AI right now?"
profclaw chat --model grok-3 "Complex reasoning task"
Notes
- API endpoint:
https://api.x.ai/v1 (OpenAI-compatible)
- Status: Beta
- Grok has access to real-time X/Twitter data, making it useful for current events queries.
- xAI access is invitation-based and may have waitlist requirements.