# Grok API cost calculator

[Calculate my cost →](https://apicostcheck.com/calculator/?model=grok-build-0.1)[Compare xAI models side by side](https://apicostcheck.com/compare/?m=grok-build-0.1,grok-4.3,grok-4.20-reasoning,grok-4.7)

xAI prices Grok per token with input, output and cached-input rates. In our data a cache hit is billed at 16%–25% of the input price and no cache-write fee is listed, so a repeated prompt prefix only gets cheaper. Long prompts cost more: rates step up above 200K for Grok 4.7, Grok 4.6, Grok 4.3, Grok Build 0.1, Grok 4.20 Reasoning and 3 more (input 2×, output 2×).

The Batch API takes 20% off input and 20% off output for the models xAI lists on its pricing page, and cached tokens inside a batch cost 80% of the normal cached rate. Grok Build 0.1 is not on that list, so its Batch column repeats the standard price. 

The table prices one workload on each model: 10,000 requests a day with 6,000 input and 500 output tokens per request. Columns: no caching; 70% of input read from the cache and 5% written to it; every request sent through the Batch API. For the same traffic [Grok 4.6](https://apicostcheck.com/models/grok-4.6/) costs 2× as much as [Grok Build 0.1](https://apicostcheck.com/models/grok-build-0.1/).

| Model | Standard 10,000 req/day · 6,000 in · 500 out [Calculate with your numbers →](https://apicostcheck.com/calculator/?daily=10000&input=6000&output=500&cache=0&write=0&batch=0) | With prompt caching 10,000 req/day · 6,000 in · 500 out · cache 70% [Calculate with your numbers →](https://apicostcheck.com/calculator/?daily=10000&input=6000&output=500&cache=70&write=5&batch=0) | Batch API 10,000 req/day · 6,000 in · 500 out · batch [Calculate with your numbers →](https://apicostcheck.com/calculator/?daily=10000&input=6000&output=500&cache=0&write=0&batch=100) |
| --- | --- | --- | --- |
| [Grok Build 0.1](https://apicostcheck.com/models/grok-build-0.1/) | $2,100/mo | $1,092/mo | $2,100/mo no batch price in data |
| [Grok 4.3](https://apicostcheck.com/models/grok-4.3/) | $2,625/mo | $1,302/mo | $2,100/mo |
| [Grok 4.20 Reasoning](https://apicostcheck.com/models/grok-4.20-reasoning/) | $2,625/mo | $1,302/mo | $2,100/mo |
| [Grok 4.7](https://apicostcheck.com/models/grok-4.7/) | $4,500/mo | $2,610/mo | $3,600/mo |
| [Grok 4.6](https://apicostcheck.com/models/grok-4.6/) | $4,500/mo | $2,610/mo | $3,600/mo |

Estimates from published per-token rates; check official pricing before budgeting. Data synced from the LiteLLM price list 2026-11-20 05:00 UTC. 

[All xAI API prices →](https://apicostcheck.com/providers/xai/) 

## Cost per 1,000 requests

For 1,000 requests of 6,000 input and 500 output tokens, [Grok Build 0.1](https://apicostcheck.com/models/grok-build-0.1/) costs $7.00 at standard rates, $3.64 with caching and $7.00 through the Batch API; [Grok 4.6](https://apicostcheck.com/models/grok-4.6/) costs $15.00, $8.70 and $12.00. Multiply by your own request count, or put your traffic into the calculator. 

## How to cut the bill, in order
- Keep the shared prefix at the start of every prompt so cached-input pricing applies; only the user turn should change.
- Keep prompts below the long-context threshold with retrieval instead of whole documents.
- Send jobs that can wait through the Batch API.
- Cap output length; reasoning tokens are billed at the output rate.
- Count prompts with the [token counter](https://apicostcheck.com/token-counter/), check your hit rate in the [caching calculator](https://apicostcheck.com/prompt-caching-calculator/), then budget in the [calculator](https://apicostcheck.com/calculator/). 

[When does caching pay off for your traffic? Use the prompt caching calculator →](https://apicostcheck.com/prompt-caching-calculator/)

## FAQ

### Does xAI charge for cache writes?

Not in our data: there is no cache-write price for Grok, so a miss is billed as normal input and a hit at the cached-input price. Check the hit rate you actually get in the caching calculator.

### What happens when a Grok prompt is very long?

Above the long-context threshold, input, output and cached-input rates are higher for that request (see the rates above). Retrieval with a few chunks keeps prompts below it; see the RAG cost guide.

### Does Grok charge for reasoning tokens?

Our data lists no separate thinking price for Grok, so reasoning tokens are priced at the output rate. Measure the output token count of real responses and use that, not the visible answer length, in the calculator.

### Is the Batch API worth it for Grok?

For work that does not need an answer right away, such as evaluations, backfills and bulk summaries. The discount applies only to the models with a Batch price in the table; compare the first and last columns for your model.

---
Source: https://apicostcheck.com/grok-api-cost-calculator/ · prices in USD per 1M tokens, synced 2026-11-20 05:00 UTC · Free to reuse with a link to https://apicostcheck.com (CC BY 4.0). Prices derived from LiteLLM's model price list, MIT License, (c) 2023 Berri AI.
