Grok API pricing for every model, newest first
By TechCompare · Updated · How we check
Grok 4.7 is the newest Grok, at $0.155 for a 100,000 token prompt with a 5,000 token answer and half the input cached. Grok Build 0.1 runs the same call for $0.07, the lowest of any Grok xAI sells.
Every Grok model and its API price
Newest first. Prices are per 1M tokens. One request is 100K tokens in and 5K out, with 50% of the input cached.
| Model | Input | Output | Cached | Context | One request | Listed |
|---|---|---|---|---|---|---|
| Grok 4.7xAI | $2 | $6 | $0.50 | 500K | $0.155 | Sep 21, 2026 |
| Grok 4.6xAI | $2 | $6 | $0.50 | 500K | $0.155 | Aug 12, 2026 |
| Grok 4.5xAI | $2 | $6 | $0.30 | 500K | $0.145 | Jul 8, 2026 |
| Grok Build 0.1xAI | $1 | $2 | $0.20 | 256K | $0.07 | May 20, 2026 |
| Grok 4.3xAI | $1.25 | $2.50 | $0.20 | 1M | $0.085 | Apr 30, 2026 |
| Grok 4.20xAI | $1.25 | $2.50 | $0.20 | 2M | $0.085 | Mar 31, 2026 |
| Grok 4.20 Multi-AgentxAI | $1.25 | $2.50 | $0.20 | 2M | $0.085 | Mar 31, 2026 |
Listed is the day OpenRouter added the model. Prices checked Nov 14, 2026.
Grok comes from xAI, which took the SpaceXAI name after its merger with SpaceX. OpenRouter lists the maker under the new name, but Grok kept its own, and the API docs still live at docs.x.ai. This page lists all 7 Grok models OpenRouter carries, newest first, at the price xAI charges on its own API.
Grok 4.7 is the newest, at $2 per million input tokens and $6 per million output tokens. Next to it sit Grok Build 0.1, a coding model trained for agent work, and Grok 4.20 Multi-Agent, which runs several agents in parallel on one request.
Calculator
Cost Comparison
Based on 100,000 input tokens (50% cached), 5,000 output tokens, and 100 requests.Prices come live from OpenRouter at each maker's own price where it's listed. Temporary deals are left out.
How to read the Grok prices
Each row shows xAI's own price. Input and output are per million tokens, and cached is what a token read back from the prompt cache costs, which is most of the prompt in a long chat or an agent loop.
The newest model isn't the lowest cost one xAI sells. For the example request Grok 4.7 costs $0.155 and Grok Build 0.1 costs $0.07. Over 10,000 calls that's $1,550 against $700.
Grok Build 0.1 is built for coding agents in an editor or a terminal, at $1 input and $2 output per million with a 256K window. Grok 4.20 Multi-Agent prices its tokens like any other row. But one request fans out to several agents that each read and write, so a single call can use many times the tokens of a normal one. Budget it per task, not per call.
Long prompts have their own rate. On Grok 4.7, a prompt past 200,000 tokens bills $4 input and $12 output per million, so check where your longest prompts land. The largest window belongs to Grok 4.20, at 2M tokens, against 500K on Grok 4.7.
Caching is where most of the savings are. On Grok 4.7 a cached token costs $0.50 per million, 75% off the normal input rate, and an agent that resends the same prefix every turn pays that rate for most of its input.
Verdict
Start with Grok 4.7, the newest Grok, and test Grok Build 0.1 next to it. Run the same prompts through both and compare the cost per accepted answer, since a retry pays for the whole call again. For coding agents, give Grok Build 0.1 a run too, since that's the job it was trained for.
Keep the cached part of your prompt stable, because a prefix that changes every turn can't be read from cache. Reach for Grok 4.20 when your prompts don't fit in 500K tokens. Prices change, so check the table again before you commit to a large budget.
More LLM pricing scenarios
Related guides
Frequently asked questions
How much does the Grok API cost?
Is Grok made by xAI or SpaceXAI?
Which Grok model is best for coding?
Which Grok model has the largest context window?
Does the Grok API have prompt caching?
How much do 10,000 Grok API calls cost?
Where do these prices come from?
Related tools
LLM VRAM Calculator
Calculate the VRAM needed to run or fine-tune any LLM at any quantization.
Use toolPower Cost Estimator
Estimate annual electricity costs for your PC, Server, or TV.
Use toolData Transfer Calculator
Estimate transfer times for files over USB, WiFi, Ethernet, and more.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use tool