grok-2

On this page
  1. Standard price history

xAI model grok-2. Prices are in US dollars per million tokens. Current price, since 2025-09-09: input $2.00, output $10.00, cached input $2.00. xAI's pricing page does not list this model under this id. Price a request with this model.

Standard price history#

FromInputCached inputCache writeOutputLonger promptsDated bySource
2025-09-09$2.00$2.00$10.00models.dev commitlink
2025-06-17$2.00$2.00$10.00$10.00models.dev commitlink
2025-06-10, first record$2.00$10.00models.dev commitlink

A blank cache price is charged at the input price. Longer prompts list the prices for requests whose whole prompt exceeds the size given.

import model_prices

model_prices.rates("grok-2", provider="xai")