Grok 4 API pricing
As of 7 October 2026, Grok 4 costs $1.25 per 1M input tokens and $2.50 per 1M output tokens.
Prices updated 7 October 2026
At a glance
As of 7 October 2026, Grok 4 costs $1.25 per 1M input tokens and $2.50 per 1M output tokens.
Grok 4 price
USD per 1M tokens.
| Provider | Input / 1M | Output / 1M | Context |
|---|---|---|---|
| xAI | $1.25 | $2.50 | 256K |
Reasoning: 87.0%Math: 84.0%
Coding via Aider polyglot & SWE-bench Verified; reasoning & math via Epoch AI.
Cheaper alternatives to Grok 4
Models with an equal-or-better coding score at a lower output price. StackSpend surfaces swaps like these against your actual usage.
- How much does the Grok 4 API cost?
- As of 7 October 2026, Grok 4 costs $1.25 per 1M input tokens and $2.50 per 1M output tokens.
- Is there a cheaper model as good as Grok 4 for coding?
- Yes — zai-org/GLM-5.2 (DeepInfra) scores 78.7% on coding at $2.40 per 1M output tokens, below Grok 4's $2.50.