Stack Spend

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.

ProviderInput / 1MOutput / 1MContext
xAI$1.25$2.50256K
Reasoning: 87.0%Math: 84.0%

Coding via Aider polyglot & SWE-bench Verified; reasoning & math via Epoch AI.

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.

Know what you're really spending on Grok 4.

StackSpend connects read-only to your AI providers, normalises every model into one daily signal, and flags cheaper equal-quality swaps from this same dataset.