All insights

Pricing and plans

Grok Model Pricing: API Rates and Production Cost Examples

Compare reported Grok API token rates and estimate production costs with clear assumptions about caching, long prompts, and additional charges.

Illustration for Grok model pricing

Grok API text-model prices are charged per million tokens, with separate rates for input, cached input, and output. xAI’s documentation gives rates for several model IDs, but the available official excerpts do not confirm every row or every long-context price below. Treat rates identified as third-party reports as reported—not as independently confirmed current prices. (xAI model pages)

Grok API prices at a glance

The table shows base/standard rates in USD per 1 million tokens, in input / cached input / output order. The cited xAI model pages support the rates marked “Official model page”; Grok 4.6 is a third-party report. Base rates do not necessarily apply to requests that qualify for a model’s long-context pricing. Check the current rate card and model availability before budgeting.

API model ID Input Cached input Output Price support
grok-4.7 $2.00 $0.50 $6.00 Official model documentation
grok-4.6 $2.00 $0.50 $6.00 Third-party report
grok-4.5 $2.00 $0.30 $6.00 Official model documentation
grok-4.3 $1.25 $0.20 $2.50 Official model documentation
grok-4.20-0309-reasoning $1.25 $0.20 $2.50 Official model documentation
grok-4.20-multi-agent-0309 $1.25 $0.20 $2.50 Official model documentation
grok-build-0.1 $1.00 $0.20 $2.00 Official model documentation

The xAI model pages cited here list the rates for Grok 4.5, 4.3, Grok 4.20 reasoning, Grok 4.20 multi-agent, and Grok Build 0.1. The Grok models index lists Grok 4.7’s input and output rates; its model documentation lists the cached-token rate. (Grok 4.5, Grok 4.3, Grok 4.20 reasoning, Grok 4.20 multi-agent, Grok Build 0.1, Grok models index, Grok 4.7)

Grok 4.5’s cached-input rate is $0.30/M in the xAI model documentation. This differs from the $0.50/M reported by CometAPI. (xAI Grok 4.5 model page, CometAPI report)

A third-party comparison also lists grok-4.20-0309-non-reasoning at $1.25/$0.20/$2.50 per million tokens, but that exact identifier and rate were not confirmed in the official model-page results cited here, so the row is not presented as confirmed. (Whizi pricing report)

How prompt length, caching, and reasoning affect the bill

Long-context pricing is based on prompt length, not the model’s context-window capacity. xAI’s pricing documentation states the general rule: for models with long-context pricing, the higher rate applies to all tokens in a request once its prompt reaches that model’s long-context threshold. The cited official material does not establish Grok 4.7’s exact threshold, counting details, or elevated rates. (xAI pricing documentation)

As a specifically attributed third-party report, Whizi says Grok 4.7’s higher tier starts when the prompt reaches 200,000 tokens, and reports rates of $4/M input, $1/M cached input, and $12/M output at that tier, versus the base rates above. The official model-specific applicability of that threshold and those elevated rates is unconfirmed here; the cited official excerpt does not say whether cached prompt tokens count toward the threshold. (Whizi pricing report)

Illustrative calculation, using Whizi’s reported rates: for a request with 200,000 uncached input tokens and 2,000 output tokens, the base-rate calculation is (200,000 × $2 + 2,000 × $6) / 1,000,000 = $0.412. If the reported higher tier applies to the entire request, it becomes (200,000 × $4 + 2,000 × $12) / 1,000,000 = $0.824. This example assumes no cached input and demonstrates the reported whole-request repricing; confirm the model-specific threshold and billing treatment before using it as a production forecast.

Cache savings depend on actual cache hits. Apply the cached-input rate only to tokens actually billed as cached; don’t assume every repeated prompt will qualify. For Grok 4.7, the cited model information lists cached tokens at $0.50 per million. (Grok 4.7 model documentation)

Include reasoning in completion-token estimates. xAI’s prompt-caching documentation says reasoning tokens are billed at the full completion-token price. The visible answer alone may not represent all completion-side tokens billed. (xAI prompt-caching usage and pricing)

Batch and Priority can change the trade-off. xAI describes Batch as asynchronous, with completion typically within 24 hours but not guaranteed. Availability and discounts depend on the model and current terms. Check the applicable model-specific rate before including Batch or Priority in an estimate. (xAI Batch API documentation, xAI Priority Processing documentation)

Example: estimate a monthly production bill

Suppose a support bot handles 50,000 requests per month on grok-4.7. Assume each request has 2,000 cached input tokens, 1,000 uncached input tokens, and 400 completion-side tokens total. That completion figure should include any billable reasoning tokens. This example assumes prompts remain below any applicable long-context threshold and excludes tools and other surcharges.

  • Cached input: 2,000 × $0.50 / 1,000,000 = $0.001 per request
  • Uncached input: 1,000 × $2.00 / 1,000,000 = $0.002 per request
  • Completion-side tokens: 400 × $6.00 / 1,000,000 = $0.0024 per request
  • Total: $0.0054 per request × 50,000 = $270 per month

With no cache hits on those 2,000 input tokens, the same assumptions produce $0.0084 per request, or $420 per month. These are calculations from the listed base rates, not a guaranteed bill. Actual token counts, cache hits, reasoning usage, tools, and service options can change the total. (Grok 4.7 model documentation, Whizi pricing report)

Other production API charges to consider

  • X Search: xAI documents charges of $5 per 1,000 fetched posts and $10 per 1,000 fetched user profiles, in addition to token costs. The charge is based on fetched items, not simply the number of search requests. (xAI X Search documentation)
  • US regional endpoint: xAI documents a 10% higher token-usage cost than the global endpoint and says the US endpoint serves grok-4.7 and grok-4.6. (xAI regional endpoints documentation)
  • Other tools and services: Check the current official rate card for each tool’s price, billing unit, and applicability. Tool calls or retrieved content can add costs beyond model tokens; don’t assume the text-token estimate covers them. (xAI API pricing)

Which Grok model should you price first?

xAI’s models index recommends Grok 4.7 for general use, including coding. A lower token rate on another model does not establish equivalent quality, latency, or suitability. Evaluate models against your own application requirements before switching on price alone. (xAI Grok models index)

Does a Grok subscription pay for API calls?

Keep consumer subscriptions separate from developer API budgeting unless your account’s current terms explicitly show an applicable API entitlement. xAI’s account FAQ describes Grok and xAI API billing as separate. (xAI API accounts FAQ)

Budgeting takeaway

Start with the rate for the exact model ID and billing path. Count cached input only when it is actually billed at the cached rate; include reasoning and tool usage; and check whether long-context or regional pricing applies. For a production forecast, replace the example assumptions with measured traffic and recheck the current xAI API price list.

Sources

API Pricing | xAI Developer Documentation

Grok Models & Pricing | xAI Developer Documentation

Grok 4.7 | xAI Developer Documentation

Grok 4.5 | xAI Developer Documentation

Grok 4.3 | xAI Developer Documentation

Grok 4.20 0309 Reasoning | xAI Developer Documentation

Grok 4.20 Multi Agent Beta 0309 | xAI Developer Documentation

Grok Build 0.1 | xAI Developer Documentation

Regional Endpoints | xAI Developer Documentation

Prompt Caching Usage & Pricing | xAI Developer Documentation

Batch API | xAI Developer Documentation

Priority Processing | xAI Developer Documentation

X Search | xAI Developer Documentation

FAQ - API Accounts | xAI Developer Documentation

Grok API Pricing: Grok 4.7 at $2 In, $6 Out per 1M Tokens

Grok API Pricing 2026: Grok 4.5, Token Costs, and Tool Fees

Contact us