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.

Verified 2026-06-21

Pricing data as of June 2026. Sources: xAI pricing and model documentation. Parameters are shareable in this URL.

Grok-3 Mini: estimated monthly cost

$114

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 multiplierInput spendOutput spendTotal
$0.0004$0.0002$114.00
$0.0004$0.0004$156.00
$0.0004$0.0008$240.00

2. Fixed-budget reverse calculator

Monthly budgetModelCost/callMaximum calls
$100Grok-3 Mini$0.0006175,438
$100Grok 4.3$0.003925,806
$100Grok-3$0.006216,129
$100Grok-4.20 Reasoning$0.006914,492
$1000Grok-3 Mini$0.00061,754,385
$1000Grok 4.3$0.0039258,064
$1000Grok-3$0.0062161,290
$1000Grok-4.20 Reasoning$0.0069144,927
$10000Grok-3 Mini$0.000617,543,859
$10000Grok 4.3$0.00392,580,645
$10000Grok-3$0.00621,612,903
$10000Grok-4.20 Reasoning$0.00691,449,275

3. Retry-and-wait-cost frontier

ModelResponse tokensMeasured waitFailure rateTotal formula
Grok-3 Mini200UnavailableUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-3 Mini1000UnavailableUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-3 Mini2000UnavailableUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok 4.32002.36 sUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok 4.3100010.52 sUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok 4.3200020.73 sUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-3200UnavailableUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-31000UnavailableUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-32000UnavailableUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-4.20 Reasoning2004.39 sUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-4.20 Reasoning100019.77 sUser-suppliedAPI cost ÷ success + wait seconds × hourly value (user-supplied)
Grok-4.20 Reasoning200039.00 sUser-suppliedAPI 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 IDExact identity and evidence fieldsResultState
batch59-calc-xai-m1-r1
code 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 1 rule is reproducible but no production observation is claimed
batch59-calc-xai-m1-r2
math 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 1 rule is reproducible but no production observation is claimed
batch59-calc-xai-m1-r3
standard 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 1 rule is reproducible but no production observation is claimed
batch59-calc-xai-m1-r4
agentic 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 1 rule is reproducible but no production observation is claimed
batch59-calc-xai-m1-r5
max 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 1 rule is reproducible but no production observation is claimed
batch59-calc-xai-m1-r6
unsupported 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-07Unavailable — 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 IDExact identity and evidence fieldsResultState
batch59-calc-xai-m2-r1
static 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 2 rule is reproducible but no production observation is claimed
batch59-calc-xai-m2-r2
large 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 2 rule is reproducible but no production observation is claimed
batch59-calc-xai-m2-r3
codebase 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 2 rule is reproducible but no production observation is claimed
batch59-calc-xai-m2-r4
single-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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 2 rule is reproducible but no production observation is claimed
batch59-calc-xai-m2-r5
high-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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 2 rule is reproducible but no production observation is claimed
batch59-calc-xai-m2-r6
unsupported 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-07Unavailable — 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 IDExact identity and evidence fieldsResultState
batch59-calc-xai-m3-r1
customer 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 3 rule is reproducible but no production observation is claimed
batch59-calc-xai-m3-r2
repository 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 3 rule is reproducible but no production observation is claimed
batch59-calc-xai-m3-r3
nightly 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 3 rule is reproducible but no production observation is claimed
batch59-calc-xai-m3-r4
real-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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 3 rule is reproducible but no production observation is claimed
batch59-calc-xai-m3-r5
legacy 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-07Unavailable — frozen calc-xai fixture requires an exact source, identity, and result receiptUNTESTED — module 3 rule is reproducible but no production observation is claimed
batch59-calc-xai-m3-r6
unsupported 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-07Unavailable — 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

ModelProviderList monthlyEffective monthlyVerbosityRank Δ
Grok-3 MinibudgetlegacyxAI$114$114
Grok 4.3midxAI$775$8471.41×
Grok-3midlegacyxAI$1,240$1,240
Grok-4.20 ReasoningmidxAI$1,380$1,380
Grok-4.20midxAI$1,380$1,380
Grok 4.6midxAI$1,380$1,380
Grok 4.5midxAI$1,380$1,380

Levers live on xAI

Model verbosity: up to 95%Context trimming: up to 47%

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.

Related

xAI provider profile →Compare against another provider →Global cost calculator →How to reduce LLM API costs →