xAI Grok API pricing

xAI API prices for all 12 Grok models, per million tokens. The cheapest is grok-build-0.1 at $1 input and $2 output; the most expensive is grok-4.7 at $2 input and $6 output.

Prices updated October 28, 2026

xAI model prices

ModelInput / 1MCached input / 1MOutput / 1MTypical request
grok-build-0.1$1$0.2$2$0.002
grok-code-fast$1$0.2$2$0.002
grok-code-fast-1-0825$1$0.2$2$0.002
grok-4.3$1.25$0.2$2.5$0.0025
grok-4.20$1.25$0.2$2.5$0.0025
grok-4.20-0309-non-reasoning$1.25$0.2$2.5$0.0025
grok-4.20-0309-reasoning$1.25$0.2$2.5$0.0025
grok-4.20-non-reasoning$1.25$0.2$2.5$0.0025
grok-4.20-reasoning$1.25$0.2$2.5$0.0025
grok-4.5$2$0.3$6$0.005
grok-4.6$2$0.5$6$0.005
grok-4.7$2$0.5$6$0.005

Sorted by the cost of a typical request of 1,000 input and 500 output tokens. Open a model for batch prices, context window and example costs.

Calculate the cost of your own prompt →