xAI API Cost Calculator
How much does the xAI API cost per month?
For Grok-3 Mini at 200K requests/month, 2,400 input tokens and 350 output tokens per request costs about $114 per month after 30% cache use and 100% batch share. Across xAI's 7 priced models, the cheapest default ranking is Grok-3 Mini at $114 per month.
Pricing data as of June 2026. Sources: xAI pricing and model documentation. Parameters are shareable in this URL.
Grok-3 Mini: estimated monthly cost
Formula: provider-specific cached input multiplier × cache rate, plus uncached input and verbosity-adjusted output; cache writes are amortised over the provider TTL, then batch savings are applied.
| Per request | $0.001 |
|---|---|
| Per day | $3.80 |
| Per month | $114 |
| Per year | $1,368 |
OpenAI scenario sensitivity
The default is a server-rendered estimate. Change the cache and batch shares to see when a cheaper qualified model overtakes the selected model; the URL is shareable and preserves the inputs.
| Default | $114/month |
|---|---|
| No caching or batch | $114/month |
| 50% cache, 50% batch | $114/month |
| 100% cache, 100% batch | $114/month |
Batch 11 xAI workload decision depth
1. Reasoning-output expansion
| Output multiplier | Input spend | Output spend | Total |
|---|---|---|---|
| 1× | $0.0004 | $0.0002 | $114.00 |
| 2× | $0.0004 | $0.0004 | $156.00 |
| 4× | $0.0004 | $0.0008 | $240.00 |
2. Fixed-budget reverse calculator
| Monthly budget | Model | Cost/call | Maximum calls |
|---|---|---|---|
| $100 | Grok-3 Mini | $0.0006 | 175,438 |
| $100 | Grok 4.3 | $0.0039 | 25,806 |
| $100 | Grok-3 | $0.0062 | 16,129 |
| $100 | Grok-4.20 Reasoning | $0.0069 | 14,492 |
| $1000 | Grok-3 Mini | $0.0006 | 1,754,385 |
| $1000 | Grok 4.3 | $0.0039 | 258,064 |
| $1000 | Grok-3 | $0.0062 | 161,290 |
| $1000 | Grok-4.20 Reasoning | $0.0069 | 144,927 |
| $10000 | Grok-3 Mini | $0.0006 | 17,543,859 |
| $10000 | Grok 4.3 | $0.0039 | 2,580,645 |
| $10000 | Grok-3 | $0.0062 | 1,612,903 |
| $10000 | Grok-4.20 Reasoning | $0.0069 | 1,449,275 |
3. Retry-and-wait-cost frontier
| Model | Response tokens | Measured wait | Failure rate | Total formula |
|---|---|---|---|---|
| Grok-3 Mini | 200 | Unavailable | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-3 Mini | 1000 | Unavailable | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-3 Mini | 2000 | Unavailable | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok 4.3 | 200 | 2.36 s | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok 4.3 | 1000 | 10.52 s | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok 4.3 | 2000 | 20.73 s | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-3 | 200 | Unavailable | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-3 | 1000 | Unavailable | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-3 | 2000 | Unavailable | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-4.20 Reasoning | 200 | 4.39 s | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-4.20 Reasoning | 1000 | 19.77 s | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
| Grok-4.20 Reasoning | 2000 | 39.00 s | User-supplied | API cost ÷ success + wait seconds × hourly value (user-supplied) |
Provenance: Batch 11 xAI reasoning/budget/wait-cost module; selected model Grok-3 Mini; inputs are 2,400 input tokens, 350 output tokens, 200,000 calls/month, cache rate 30%, batch share 100%. Verified 2026-06-21. Provider source: https://docs.x.ai/docs/models · Run this scenario →
Batch 59 · server-rendered evidence boards · verified 2026-09-07
Intent answer: xAI Grok API billing reflects reasoning versus non-reasoning token generation, cached input discounts ($0.50/M on Grok 4.6), and context boundaries. Deliberation token multipliers must be factored into total monthly budget forecasts. Verified 2026-09-07.
Demand evidence: Qualitative demand: dedicated Grok cost modeling tools reviewed 2026-09-07; exact US monthly volume is unavailable.
Scope boundary: Model xAI Grok API expenses across Grok 4.6, Grok 4.5, Grok 4.3, and Grok 4.20 with reasoning token overhead, prompt caching, and 200K thresholds. Exact joins required; unresolved joins render Unavailable.
Grok reasoning token budget planner
Deterministic formula / rule: total_cost = (input_tokens * input_rate) + ((visible_output + reasoning_tokens) * output_rate); reasoning multiplier observed 1.5x-4x.
Boundary: Owns Grok reasoning token expansion calculations.
| Frozen scenario / field ID | Exact identity and evidence fields | Result | State |
|---|---|---|---|
batch59-calc-xai-m1-r1code generation with high reasoning | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$code generation with high reasoning; input tokens; visible output; reasoning effort setting; estimated reasoning tokens; total billed output; monthly spend; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 1 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m1-r2math puzzle with medium reasoning | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$math puzzle with medium reasoning; input tokens; visible output; reasoning effort setting; estimated reasoning tokens; total billed output; monthly spend; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 1 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m1-r3standard classification (low reasoning) | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$standard classification (low reasoning); input tokens; visible output; reasoning effort setting; estimated reasoning tokens; total billed output; monthly spend; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 1 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m1-r4agentic tool loop with variable reasoning | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$agentic tool loop with variable reasoning; input tokens; visible output; reasoning effort setting; estimated reasoning tokens; total billed output; monthly spend; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 1 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m1-r5max reasoning token cap reached | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$max reasoning token cap reached; input tokens; visible output; reasoning effort setting; estimated reasoning tokens; total billed output; monthly spend; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 1 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m1-r6unsupported reasoning parameter | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$unsupported reasoning parameter; input tokens; visible output; reasoning effort setting; estimated reasoning tokens; total billed output; monthly spend; verified=2026-09-07 | Unavailable — exact calc-xai evidence join is not closed for "unsupported reasoning parameter" | FAIL CLOSED — manual, probe, or source evidence required |
First-party citation: xAI Grok API official pricing. Verified 2026-09-07; missing or conflicting joins fail closed.
xAI prompt caching break-even receipt
Deterministic formula / rule: caching_savings = cached_tokens * (standard_input_rate - cached_input_rate) - cache_write_premium.
Boundary: Owns Grok input cache economic break-even modeling.
| Frozen scenario / field ID | Exact identity and evidence fields | Result | State |
|---|---|---|---|
batch59-calc-xai-m2-r1static developer system prompt (8K) | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$static developer system prompt (8K); prompt size; reuse frequency; cache write rate; cache read rate ($0.50/M on 4.6); net savings percentage; break-even calls; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 2 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m2-r2large API specification (32K) | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$large API specification (32K); prompt size; reuse frequency; cache write rate; cache read rate ($0.50/M on 4.6); net savings percentage; break-even calls; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 2 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m2-r3codebase index (128K) | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$codebase index (128K); prompt size; reuse frequency; cache write rate; cache read rate ($0.50/M on 4.6); net savings percentage; break-even calls; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 2 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m2-r4single-turn query (no cache) | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$single-turn query (no cache); prompt size; reuse frequency; cache write rate; cache read rate ($0.50/M on 4.6); net savings percentage; break-even calls; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 2 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m2-r5high-turn conversational thread | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$high-turn conversational thread; prompt size; reuse frequency; cache write rate; cache read rate ($0.50/M on 4.6); net savings percentage; break-even calls; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 2 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m2-r6unsupported cache lifetime | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$unsupported cache lifetime; prompt size; reuse frequency; cache write rate; cache read rate ($0.50/M on 4.6); net savings percentage; break-even calls; verified=2026-09-07 | Unavailable — exact calc-xai evidence join is not closed for "unsupported cache lifetime" | FAIL CLOSED — manual, probe, or source evidence required |
First-party citation: xAI Grok API official pricing. Verified 2026-09-07; missing or conflicting joins fail closed.
Grok 4.3 to 4.6 workload migration cost delta
Deterministic formula / rule: delta = (workload_tokens * rate_4_6) - (workload_tokens * rate_4_3); quality offset factored as task completion rate.
Boundary: Owns upgrade cost impact for xAI production workloads.
| Frozen scenario / field ID | Exact identity and evidence fields | Result | State |
|---|---|---|---|
batch59-calc-xai-m3-r1customer support agent migration | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$customer support agent migration; monthly volume; Grok 4.3 cost; Grok 4.6 cost; cost delta ($ and %); speed adjustment factor; recommendation rule; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 3 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m3-r2repository refactoring loop | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$repository refactoring loop; monthly volume; Grok 4.3 cost; Grok 4.6 cost; cost delta ($ and %); speed adjustment factor; recommendation rule; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 3 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m3-r3nightly data extraction pipeline | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$nightly data extraction pipeline; monthly volume; Grok 4.3 cost; Grok 4.6 cost; cost delta ($ and %); speed adjustment factor; recommendation rule; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 3 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m3-r4real-time search grounding | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$real-time search grounding; monthly volume; Grok 4.3 cost; Grok 4.6 cost; cost delta ($ and %); speed adjustment factor; recommendation rule; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 3 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m3-r5legacy Grok 4.20 retirement cutover | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$legacy Grok 4.20 retirement cutover; monthly volume; Grok 4.3 cost; Grok 4.6 cost; cost delta ($ and %); speed adjustment factor; recommendation rule; verified=2026-09-07 | Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receipt | UNTESTED — module 3 rule is reproducible but no production observation is claimed |
batch59-calc-xai-m3-r6unsupported legacy endpoint | route=$/llm-cost-calculator/xai; owner=$calc-xai; scenario=$unsupported legacy endpoint; monthly volume; Grok 4.3 cost; Grok 4.6 cost; cost delta ($ and %); speed adjustment factor; recommendation rule; verified=2026-09-07 | Unavailable — exact calc-xai evidence join is not closed for "unsupported legacy endpoint" | FAIL CLOSED — manual, probe, or source evidence required |
First-party citation: xAI Grok API official pricing. Verified 2026-09-07; missing or conflicting joins fail closed.
Method and limitations: this board exposes deterministic rules, first-party citations, and dated evidence identities. It does not invent volume, coverage, entitlement, retention, residency, quota, capacity, feature support, quality, price, reliability, or legal conclusions. Run the calc-xai evidence flow →
Ranked cost — 200K requests/month
| Model | Provider | List monthly | Effective monthly | Verbosity | Rank Δ |
|---|---|---|---|---|---|
| Grok-3 Minibudgetlegacy | xAI | $114 | $114 | — | — |
| Grok 4.3mid | xAI | $775 | $847 | 1.41× | — |
| Grok-3midlegacy | xAI | $1,240 | $1,240 | — | — |
| Grok-4.20 Reasoningmid | xAI | $1,380 | $1,380 | — | — |
| Grok-4.20mid | xAI | $1,380 | $1,380 | — | — |
| Grok 4.6mid | xAI | $1,380 | $1,380 | — | — |
| Grok 4.5mid | xAI | $1,380 | $1,380 | — | — |
Levers live on xAI
The billing gotcha
Grok's API has no published prompt-caching or batch discount as of this page's verification, so every call bills at the same list rate this calculator uses — there is no toggle here that will find you a hidden saving on xAI's current lineup, only faster or cheaper models within it.
