Provider pricing hub
Grok API Pricing (July 2026)
The Grok API costs $2/$6 per million input/output tokens for Grok 4.5, with cached input at $0.50 and a 500K context window. Grok 4.3 lists at $1.25/$2.50 with a 1M window, and Grok 4.1 Fast is the volume tier at $0.20/$0.50 with 2M-token context. Higher-context surcharges apply above 200K tokens on the flagship tiers.
xAI prices the Grok API aggressively for its output tokens: the flagship Grok 4.5 keeps a 3x output-to-input ratio ($2/$6) where most rivals charge 5–6x, and Grok 4.1 Fastpairs a 2M-token context window with near-DeepSeek pricing. The table below lists every xAI model in BenchLM's pricing registry, synced from xAI's official docs and pricing pages.
Price is only half the decision: see the Grok model rankings and the price-vs-performance view for how each tier scores per dollar spent.
Every Grok API price per 1M tokens
| Model | Input $/M | Cached input $/M | Output $/M | Context |
|---|---|---|---|---|
| Grok 4.20 | $2 | $0.2 | $6 | 2M |
| Grok 4.5 | $2 | $0.5 | $6 | 500K |
| Grok 4.3 | $1.25 | $0.125 | $2.5 | 1M |
| Grok Build 0.1 | $1 | $0.1 | $2 | 256K |
| Grok 3 Mini | $0.3 | $0.03 | $0.5 | 128K |
| Grok Code Fast 1 | $0.2 | $0.02 | $1.5 | 256K |
| Grok 4.1 Fast | $0.2 | $0.02 | $0.5 | 2M |
Grok 4.5's $0.50/M cached-input rate and Grok Code Fast 1's $0.02/M are xAI's official published prices; other cached rates are a 10% cache-read estimate. Higher-context surcharges above 200K tokens (documented on Grok 4.5 and Grok 4.3) are not included. xAI does not publish a Batch API discount tier, so batch columns are omitted.
Estimate your monthly Grok API bill
| Model | Est. monthly cost |
|---|---|
| Grok 4.20 | $32 |
| Grok 4.5 | $32 |
| Grok 4.3 | $17.5 |
| Grok Build 0.1 | $14 |
| Grok 3 Mini | $4 |
| Grok Code Fast 1 | $5 |
| Grok 4.1 Fast | $3 |
Estimates use Grok's standard per-token rates from the table above. For task-level presets and cross-provider comparison, use the full AI cost calculator.
Cached input and the 200K higher-context surcharge
Two line items decide what Grok actually costs you. First, cached input: Grok 4.5's docs list cached input at $0.50 per million tokens — a 75% discount off the $2 standard rate — and Grok Code Fast 1 reads cache at $0.02/M. For agents and chat apps that resend the same system prompt or repository context, the cached share of input often dominates the bill, so the effective input rate lands well under list price.
Second, the higher-context surcharge. xAI notes that higher-context pricing applies above 200K tokens on Grok 4.5 — BenchLM stores the headline standard rate — and OpenRouter's Grok 4.3listing shows the >200K tier at $2.50/$5.00 per million (double the standard $1.25/$2.50), with cache reads rising from $0.20/M to $0.40/M. If your workload actually uses the big windows these models advertise, budget for the doubled tier; the estimator above uses standard rates.
Grok vs OpenAI and DeepSeek pricing
Against OpenAI, Grok wins on output economics: Grok 4.5 at $2/$6 charges 5x less for output than GPT-5.6 Sol ($5/$30) and undercuts even the mid-tier GPT-5.6 Terra ($2.50/$15) on both sides of the meter. At the floor, Grok 4.1 Fast ($0.20/$0.50) is 5–12x cheaper than GPT-5.6 Luna ($1/$6) while carrying a 2M-token window.
Against DeepSeek, the ordering flips tier by tier: DeepSeek V4 Pro ($1.74/$3.48) beats Grok 4.5 on both rates, but Grok 4.1 Fast squeezes under V4 Flash($0.14/$0.28) on nothing except context size — DeepSeek stays the absolute price floor. Since list prices alone don't settle it, compare the full tables at OpenAI API pricing and DeepSeek API pricing, or run head-to-heads on the compare hub.
Which Grok model should you use?
Grok 4.5($2/$6, 500K context) is the current flagship and xAI's own designated successor to Grok 4.3 ($1.25/$2.50, 1M context) — reach for 4.5 on hard reasoning and agentic work, and keep 4.3 where its lower rates and bigger standard-tier window fit the job. Grok 4.1 Fast ($0.20/$0.50) is the volume tier, and it scores a surprisingly strong 77 on BenchLM's leaderboard — the best quality-per-dollar in the lineup for classification, extraction, and long-document work.
The odd one out is Grok 4.20($2/$6): its 2M-token context window is still the family's largest outside 4.1 Fast, but the model has been superseded by the 4.3/4.5 generation, so only pick it when you specifically need 2M tokens at flagship quality. For coding pipelines, Grok Code Fast 1 ($0.20/$1.50, $0.02 cached input) remains the cheap specialist. Model your own mix with the cost calculator.
Grok API pricing FAQ
How much does the Grok API cost?
Grok 4.5 costs $2 input / $6 output per million tokens with cached input at $0.50, Grok 4.3 costs $1.25/$2.50, and Grok 4.1 Fast costs $0.20/$0.50. Higher-context pricing applies above 200K tokens on the flagship tiers — Grok 4.3's documented >200K rate is $2.50/$5.00. The full table above lists every priced xAI model.
Is there a free Grok API?
No — the hosted Grok API is pay-per-token. The cheapest sustained path is Grok 4.1 Fast at $0.20/$0.50 per million tokens, which prices light usage at cents per day. Grok access inside the X app is a separate consumer product and does not include API credits.
What is xAI's Grok API pricing per million tokens?
xAI bills per million tokens with separate input and output rates: Grok 4.5 at $2/$6 (cached input $0.50), Grok 4.20 at $2/$6, Grok 4.3 at $1.25/$2.50, Grok Code Fast 1 at $0.20/$1.50, and Grok 4.1 Fast at $0.20/$0.50. Standard rates apply up to 200K tokens on the flagship tiers, with documented higher-context pricing beyond that.
How does Grok API pricing compare to OpenAI?
Grok 4.5's output tokens cost 5x less than GPT-5.6 Sol's ($6 vs $30 per million), and Grok 4.1 Fast undercuts GPT-5.6 Luna by 5x on input and 12x on output. xAI's 3x output-to-input ratio is the structural difference — OpenAI's flagships charge 6x. See the OpenAI pricing hub for the full rival table.