Grok 4 pricing

xAI's flagship, priced to match Claude Sonnet exactly, with a large context window and live access to posts on X as a differentiator.

List prices checked

By xAI · Frontier tier

Token pricing

Per million tokens, from the official price list.

Token typePrice per 1MNotes
Input$3.00Everything you send, including the system prompt
Output$15.00Everything the model generates, reasoning tokens included
Cached input$0.750Repeated prefixes served from cache
Blended (3:1)$6.00One number for ranking, at three input tokens per output token

Source: xAI pricing (May 2026). Published list prices only — committed-use discounts, regional variation, and per-request charges are not included. Not yet independently re-checked against the vendor’s page.

Capabilities

PropertyValue
Context window256K tokens
Max output64K tokens
Inputs acceptedtext, image
Cost to fill the context once$0.77

What it costs per month

Token prices applied to three workload shapes. Input-heavy and output-heavy workloads rank models very differently.

In-app chat assistant

A support or help assistant handling a few thousand conversations a month, with short prompts and short answers.

$135/mo

  • 20M input tokens$60
  • 5M output tokens$75
  • If fully cached$90

RAG over documents

Retrieval-augmented answering where each request stuffs several retrieved passages into the prompt, so input dominates.

$1,125/mo

  • 300M input tokens$900
  • 15M output tokens$225
  • If fully cached$450

Coding agent

An agentic loop that reads files and writes patches, generating heavy output and re-sending large context on every turn.

$2,700/mo

  • 400M input tokens$1,200
  • 100M output tokens$1,500
  • If fully cached$1,800

Grok 4 vs other frontier models

Same capability tier, ranked by blended token price.

ModelInputOutputContextCompare
Claude Sonnet 5$3.00$15.00200KHead to head
Cohere Command A$2.50$10.00256KHead to head
OpenAI o3$2.00$8.00200KHead to head
Mistral Large$2.00$6.00131KHead to head
GPT-5$1.25$10.00400KHead to head
Gemini 2.5 Pro$1.25$10.001MHead to head

Questions about pricing

How much does the Grok 4 API cost in 2026?
$3.00 per million input tokens and $15.00 per million output tokens, from xAI's published pricing. The table above converts that into a monthly figure for three common workloads.
What is the Grok 4 context window?
256K tokens, with up to 64K tokens of output per request. Filling the window costs whatever that many input tokens cost — at $3.00 per million, a single full-context request runs about $0.77.
Does Grok 4 support prompt caching?
Yes. Cached input is billed at $0.750 per million tokens, roughly 4× cheaper than uncached input. For an agent that resends the same system prompt and file context on every turn, that discount usually matters more than the headline rate does.
Is Grok 4 cheaper than the alternatives?
On a blended 3:1 input-to-output basis it works out at $6.00 per million tokens. The comparison table below ranks it against the other frontier models in the dataset, and the head-to-head pages model both against identical workloads.

Keep comparing