Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%), S…
Model details →Anthropic: Claude Sonnet 4 vs xAI: Grok 4
xAI: Grok 4 wins on 1 of 6 axes — pricing and capability skew in its favour for most workloads.
Grok 4 is xAI's latest reasoning model with a 256k context window. It supports parallel tool calling, structured outputs, and both image and text inputs. Note that reasoning is not exposed, reasoning cannot be disabled, and the reasoning ef…
Model details →Side-by-side comparison
| Capability | Anthropic: Claude Sonnet 4 | xAI: Grok 4 | Winner |
|---|---|---|---|
| Context window Maximum number of input tokens the model can attend to in a single request. | 200K | 256K | 🏆 xAI: Grok 4 |
| Input price (per 1M) Cost per million input tokens billed by the provider. | $3.00 | $3.00 | Tie |
| Output price (per 1M) Cost per million output tokens billed by the provider. | $15.00 | $15.00 | Tie |
| Tool / function calling First-class support for emitting structured tool calls. | Yes | Yes | Tie |
| Vision input Accepts image inputs alongside text. | Yes | Yes | Tie |
| Reasoning mode Internal chain-of-thought / extended-thinking support. | Yes | Yes | Tie |
Frequently asked questions
Is Anthropic: Claude Sonnet 4 better than xAI: Grok 4?
xAI: Grok 4 wins on 1 of 6 axes — pricing and capability skew in its favour for most workloads.
What's the price difference between Anthropic: Claude Sonnet 4 and xAI: Grok 4?
Input: $3.00 vs $3.00 per 1M tokens. Output: $15.00 vs $15.00 per 1M tokens.
What context windows do Anthropic: Claude Sonnet 4 and xAI: Grok 4 support?
Anthropic: Claude Sonnet 4 supports up to 200K tokens. xAI: Grok 4 supports up to 256K tokens.
Do both Anthropic: Claude Sonnet 4 and xAI: Grok 4 support tool calling?
Anthropic: Claude Sonnet 4: yes. xAI: Grok 4: yes.