Grok 4 API pricing

As of 11 July 2026, Grok 4 costs $3.00 per 1M input tokens and $15.00 per 1M output tokens.

Prices updated 11 July 2026

Grok 4 price

USD per 1M tokens.

ProviderInput / 1MOutput / 1MContext
xAI$3.00$15.00256K

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 11 July 2026, Grok 4 costs $3.00 per 1M input tokens and $15.00 per 1M output tokens.
Is there a cheaper model as good as Grok 4 for coding?
Yes — google/gemini-2.5-pro (DeepInfra) scores 83.1% on coding at $10.00 per 1M output tokens, below Grok 4's $15.00.

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.