Skip to main content

xAI API pricing: Grok model costs per million tokens

The xAI API bills Grok models per 1 million tokens. Grok 4.7 costs $2.00 input and $6.00 output; Grok 4.3 costs $1.25 and $2.50 (prompts under 200K tokens).

Grok 4.7 input$2.00 / 1Mprompt < 200K; $4.00 above
Grok 4.7 output$6.00 / 1Mprompt < 200K; $12.00 above
Grok 4.3 input$1.25 / 1Mprompt < 200K; $2.50 above
Grok 4.3 output$2.50 / 1Mprompt < 200K; $5.00 above

All xAI API plans

Per-seat prices in USD from the official pricing pages. “Annual billing” is the per-month price when billed annually, as the vendor states it; the yearly total is shown where published.

Swipe sideways to see all columns

xAI API plans and prices (USD, excl. tax)
PlanMonthly billingAnnual billingSeatsUsage (as published)

Source

docs.x.ai models documentation, checked 2026-11-05 (Asia/Colombo) and diffed against our model data with no change. USD, excluding tax (xAI doesn’t state tax treatment). The console.x.ai billing page wasn’t fetched.

Sources: xAI models and pricing

Compare with other APIs: LLM API pricing per 1M tokens.

Sources: .

xAI API rates (USD per 1M tokens, prompt < 200K / ≥ 200K)

xAI API rates (USD per 1M tokens, prompt < 200K / ≥ 200K)
FeatureGrok 4.7Grok 4.3
Input$2.00 / $4.00$1.25 / $2.50
Cached input$0.50 / $1.00$0.20 / $0.40
Output$6.00 / $12.00$2.50 / $5.00
  • Rates double for prompts of 200K tokens or more.
  • Newer models listed by xAI (Grok 4.5, 4.6, Grok Imagine) are not priced here yet: price not verified.

Tax isn’t stated, so prices are shown excluding tax.

How xAI API pricing works

Long-context pricing

xAI splits pricing at 200k prompt tokens. Under that, you pay the standard rate. At 200k or more, all tokens in that request, not just the extra ones, are billed at the long-context rate. Keeping prompts under 200k, for example by trimming history or retrieving fewer documents, halves the cost.

Cached input

Repeated prompt prefixes billed as cached input cost a quarter of the normal input rate on Grok 4.7 ($0.50 vs $2.00) and about 16% on Grok 4.3 ($0.20 vs $1.25). xAI doesn’t list a separate cache-write price.

Other charges

Our model data also records these, last checked 2026-10-19: priority processing is billed at 2x, the US regional endpoint at 1.1x, and the web search tool at $5 per 1,000 calls. Grok 4.7 isn’t in xAI’s batch-discount list.

Which model?

Grok 4.3 is the cheaper choice for high-volume work: output is less than half Grok 4.7’s price. Grok 4.7 is the flagship with a 500k context window.

Related

xAI API pricing FAQ

How much does the xAI API cost?
Grok 4.7: $2.00 in / $6.00 out per 1M tokens; Grok 4.3: $1.25 / $2.50 (prompts under 200k).
Why did my bill double on a long prompt?
Prompts of 200k+ tokens are billed entirely at the long-context rate.
Is cached input cheaper?
Yes: $0.50 (4.7) and $0.20 (4.3) per 1M under 200k.
What about Grok Imagine or Grok 4.6?
xAI lists them, but we haven’t captured their rates, so: price not verified.
Is this the same as a SuperGrok or X Premium subscription?
No. This page covers the developer API only.