AI

Grok API Pricing: Full 2026 Cost Breakdown

The Grok API costs $2 per 1M input and $6 per 1M output tokens for grok-4.7 - but long-context tiers, live-search tool fees, and a US surcharge move the real bill. Here is the full cost breakdown, a cross-vendor comparison, and a clear price-vs-performance verdict.

Illustration of a lone illuminated tollgate on a vast empty highway at twilight, representing Grok API pricing
Illustration: Edgewisely

The Grok API costs $2.00 per 1M input tokens and $6.00 per 1M output tokens for the flagship grok-4.7 model, with a 500,000-token context window (xAI's pricing documentation, updated October 10, 2026). That is frontier-model pricing for mid-pack intelligence — which makes grok api pricing more interesting than the sticker suggests.

TL;DR

  • Flagship rate: grok-4.7 is $2 in / $6 out per 1M tokens, 500k context, as of November 2026.
  • The long-context trap: cross 200k tokens in a single prompt and the rate doubles to $4 in / $12 out — on every token in that request, not just the overflow.
  • Tools cost extra: live web search, X search, and code execution each add $5 per 1,000 calls on top of tokens.
  • Price vs. performance: Grok 4.7 scores 35 on the Artificial Analysis Intelligence Index v5 — below GPT, Claude, and Gemini flagships, roughly tied with DeepSeek V4.1 Flash, which costs a fraction as much.
  • Verdict: Pay for Grok when you need live X/real-time data or its integrated agentic tools. For raw reasoning per dollar, cheaper and smarter options bracket it.

How much does the Grok API cost?

For most builders, one model matters: grok-4.7, the flagship. You pay:

  • $2.00 per 1M input tokens
  • $0.50 per 1M cached input tokens
  • $6.00 per 1M output tokens

Those are the global, standard-tier rates as of the October 10, 2026 pricing update. Output costs 3x input, which is the normal shape for reasoning models — your bill tracks how much the model generates, not just what you send it.

To make it concrete: a request with a 4,000-token prompt and a 1,000-token answer costs about $0.008 + $0.006 = $0.014. Run that a million times a month and you are looking at roughly $14,000 before any tools or long-context surcharges.

xAI also ships older and cheaper siblings on the same API. Here is the full public text-model lineup.

Grok API price table (per 1M tokens, USD, as of October 10, 2026)

Model Context Input Cached input Output Long-ctx input (≥200k) Long-ctx cached Long-ctx output
grok-4.7 (flagship) 500k $2.00 $0.50 $6.00 $4.00 $1.00 $12.00
grok-4.6 500k $2.00 $0.50 $6.00 $4.00 $1.00 $12.00
grok-4.5 500k $2.00 $0.30 $6.00 $4.00 $0.60 $12.00
grok-4.3 1M $1.25 $0.20 $2.50 $2.50 $0.40 $5.00
grok-4.20 (multi-agent / reasoning / non-reasoning) 1M $1.25 $0.20 $2.50 $2.50 $0.40 $5.00
grok-build-0.1 256k $1.00 $0.20 $2.00 $2.00 $0.40 $4.00

Source: xAI developer pricing, October 10, 2026.

The quiet takeaway: grok-4.3 and grok-4.20 are half the input price and 60% less output price than the flagship, and they carry a 1M-token context window — double grok-4.7's 500k. If you do not specifically need 4.7's capabilities, the older models are the better per-token value.

How is Grok's pricing structured?

Three concepts drive your real bill.

Input vs. output. You pay a low rate for tokens you send and a high rate for tokens the model writes. Reasoning models "think" in output tokens you never see in the final answer but still pay for, so verbose reasoning quietly inflates cost.

Cached input. Repeat the same prompt prefix — a long system prompt, a fixed document — and xAI bills those tokens at $0.50 per 1M instead of $2.00, a 75% discount on grok-4.7. For agents and chat apps with stable instructions, caching is the single biggest lever you control.

Context tiers. Grok prices by how big a single request gets, not just by model. That is where the first hidden cost lives.

What are the hidden costs (long context, tools, priority)?

Per-token stickers hide most of what you actually pay. Four mechanics matter.

1. The long-context tier. Once a single request's prompt reaches 200k tokens, long-context rates apply to all tokens in that request. For grok-4.7 that means $4 in / $12 out — a flat doubling the moment you cross the line. Stuff a 250k-token document into one call and you are billed the premium rate on the whole thing, including the small answer. This is the gotcha most third-party pricing pages omit.

2. Tools and live search. Grok's selling point is real-time data, and it is metered separately from tokens:

Tool Cost
Web Search $5 / 1,000 calls
X (Twitter) Search $5 / 1,000 posts; $10 / 1,000 profiles
Code Execution $5 / 1,000 calls
File Attachments $5 / 1,000 calls
Collections Search (RAG) $2.50 / 1,000 calls

Source: xAI developer pricing. A single agent turn can fire several searches, so a "cheap" $0.01 token request can carry $0.02–$0.05 of tool fees on top. For a search-heavy agent, tools can rival or exceed your token spend.

3. The US regional surcharge. Route through the US endpoint (us.api.x.ai) and you pay 1.1x global rates — a 10% premium — on grok-4.7 and grok-4.6. Flagship US rates land at $2.20 in / $6.60 out (and $4.40 / $13.20 above 200k). If data residency does not force your hand, the global endpoint is cheaper.

4. Priority processing. Opt into priority and you pay 2x standard rates for faster service. Conversely, the Batch API gives a 20% discount on non-realtime jobs — the mirror-image lever for cost-insensitive, latency-tolerant workloads.

Is Grok cheaper than GPT, Claude, and Gemini?

On the sticker, Grok is cheap for a flagship. On intelligence-per-dollar, it is middling. Here is how it stacks up against rivals, with each price traced to its vendor's primary page and each quality score from the same benchmark.

Cross-vendor cost and intelligence (per 1M tokens, AA Intelligence Index v5)

Model Maker Input Output AA v5 Index Context
grok-4.7 xAI $2.00 $6.00 35 500k
GPT-6.1 Sol OpenAI $2.00 $10.00 55 large
GPT-6 Astra OpenAI $10.00 $50.00 57 large
Claude Sonnet 5.5 Anthropic $2.00 $10.00 55 1M
Claude Opus 5.5 Anthropic $4.00 $20.00 59 1M
Gemini 4 Argon Google $2.00 $10.00 50 1M
DeepSeek V4.1 Flash DeepSeek $0.15 $0.60 33 large
DeepSeek V4 Pro DeepSeek $0.66 $1.98 23 large

Prices as of November 2026 from xAI, Anthropic's Claude pricing, OpenAI's API pricing, Google's Gemini API pricing (Argon $2/$10 through Nov 30, 2026, then $4/$20), and DeepSeek's API pricing (DeepSeek cache-miss input / standard output; off-peak rates shown). Intelligence scores from the Artificial Analysis Intelligence Index v5. Note: AA v5 re-baselined all scores far lower than earlier index versions, so do not compare these to pre-v5 numbers. Google's top-tier Gemini 4 Carbon scores ~60 on the same index but is not priced on the public AI Studio tier.

Read the table carefully:

  • On output price, Grok is the cheapest flagship by a wide margin — $6 vs. $10 for GPT-6.1 Sol, Gemini 4 Argon, and Claude Sonnet 5.5, and $20 for Claude Opus 5.5.
  • On intelligence, Grok trails all of them — 35 vs. 50–59.
  • DeepSeek V4.1 Flash matches Grok's intelligence (33) at roughly a tenth of the price.

So "cheaper than GPT, Claude, and Gemini" is true on the output rate and false on the thing you are actually buying, which is capability per dollar. For a full cross-provider breakdown, see our guide to the cheapest AI API, and for head-to-heads we have pitted Grok against Gemini and Grok against Claude.

Scatter chart of AI model intelligence vs blended API price showing Grok 4.7 priced like a flagship but mid-pack on intelligence
Chart: Edgewisely, data from Artificial Analysis (as of November 2026)

How do you cut Grok API costs?

Five levers, in rough order of impact:

  • Cache your prompt prefix. Stable system prompts billed at $0.50 instead of $2.00 per 1M is a 75% cut on repeated input. Structure prompts so the fixed part comes first.
  • Stay under 200k tokens per request. Chunk or retrieve instead of dumping a giant document into one call, or you trigger the doubled long-context rate on everything.
  • Right-size the model. If you do not need grok-4.7, grok-4.3 at $1.25 / $2.50 is 38–58% cheaper and gives you a 1M context window.
  • Batch non-urgent work for the 20% discount, and avoid priority processing (2x) unless latency is revenue-critical.
  • Budget tool calls explicitly. At $5 per 1,000 searches, an agent that searches on every turn can spend more on tools than tokens. Cache search results and gate when live data is actually needed.

Who should use the Grok API?

Reach for Grok when your workload leans on real-time and X/Twitter data — social listening, trend detection, breaking-news agents — because its native X Search and live web tools are a genuine differentiator no competitor matches as cleanly. It also fits agentic and tool-heavy pipelines where the integrated code execution and search reduce glue code.

Look elsewhere when you are buying raw reasoning. For hard problems, Claude Opus 5.5, GPT-6 Astra, and Gemini 4 Carbon are measurably smarter. For high-volume, cost-sensitive throughput, DeepSeek undercuts Grok dramatically at similar benchmark quality.

Our take

Grok 4.7's pricing is a bet that access beats intelligence — and whether that bet pays off depends entirely on what you are building.

Start with the uncomfortable number. On the Artificial Analysis Intelligence Index v5, Grok 4.7 scores 35 (as of November 2026), below the peer-set median. Gemini 4 Carbon sits near 60, Claude Opus 5.5 at 59, GPT-6 Astra at 57, and even GPT-6.1 Sol and Claude Sonnet 5.5 — both priced close to Grok — land at 55. Meanwhile DeepSeek V4.1 Flash matches Grok's intelligence at 33 while charging roughly $0.15 / $0.60 against Grok's $2 / $6. So Grok is priced like a frontier model, performs like a mid-tier one, and is undercut on cost by a model of equal measured intelligence. On a pure reasoning-per-dollar basis, that is a hard sell.

Here is the case for paying anyway, and it is a real one. The AA Intelligence Index measures reasoning and knowledge in a vacuum. It does not measure access to a live, proprietary firehose of human conversation. Grok's privileged, first-party connection to X is something OpenAI, Anthropic, and Google structurally cannot replicate, and xAI has wired it directly into the API as metered tools. If your product's value is "what is the world saying right now," Grok is not competing on the benchmark — it is competing on a data moat, and there the comparison looks very different.

This is also why the sticker price misleads in both directions. The headline $2 / $6 looks like a bargain next to Claude Opus at $4 / $20. But your real workload cost is rarely the sticker. Add the $5-per-1,000-calls live-search fees that a social-monitoring agent will rack up, the long-context doubling to $4 / $12 the instant a prompt crosses 200k tokens, the 10% US-region surcharge, and a 2x priority multiplier if you need speed, and a "cheap" model can land well above its headline. Conversely, aggressive prompt caching at $0.50 and batch discounts at 20% can pull the effective rate down hard. The spread between naive and optimized cost on Grok is larger than on most competitors precisely because so much of its pricing is modal. Model your actual request shape before you trust any per-token comparison, including this article's table.

My verdict: Grok 4.7 is a specialist priced like a generalist, and you should buy it as a specialist. Best for real-time and X-native use cases — social intelligence, live-event agents, anything where fresh public conversation is the product — and for teams already standardized on xAI tooling who value the integrated search-and-code stack over squeezing out the last cent. Avoid if your workload is offline reasoning, long-document analysis, or code generation judged purely on quality, where the benchmark gap to Claude, GPT, and Gemini is real and the price saving over GPT-6.1 Sol or Gemini 4 Argon is only on the output rate. Cheaper alternative for comparable measured intelligence at high volume: DeepSeek V4.1 Flash, at a fraction of the cost — accepting the data-residency and latency trade-offs that come with it. Grok's pricing is not a rip-off and it is not a steal. It is a toll on a road only xAI owns, and it is worth paying exactly to the extent you need to be on that road.

Frequently Asked Questions

How much does the Grok API cost per 1 million tokens?

The flagship grok-4.7 costs $2.00 per 1M input tokens and $6.00 per 1M output tokens, with cached input at $0.50, as of the October 10, 2026 pricing update. Cheaper models like grok-4.3 run $1.25 input and $2.50 output per 1M tokens.

Is the Grok API cheaper than GPT, Claude, or Gemini?

On output price, yes — grok-4.7 at $6 per 1M undercuts GPT-6.1 Sol, Gemini 4 Argon, and Claude Sonnet 5.5 (all $10) as of November 2026. But Grok scores lower on the Artificial Analysis Intelligence Index, so you pay less for less capability.

What is Grok's context window, and does the price change for long prompts?

Grok-4.7 has a 500,000-token context window; grok-4.3 and grok-4.20 reach 1M. Yes, the price changes: once a single request's prompt hits 200,000 tokens, long-context rates apply to every token in that request, doubling grok-4.7 to $4 input and $12 output per 1M.

Does xAI charge extra for live search and tools?

Yes. Tools are billed on top of token usage: web search, X post search, code execution, and file attachments each cost $5 per 1,000 calls, X profile search costs $10 per 1,000, and collections (RAG) search costs $2.50 per 1,000, as of November 2026.

How can you reduce Grok API costs?

Cache stable prompt prefixes for a 75% input discount ($0.50 vs $2.00), keep each request under 200k tokens to avoid the long-context doubling, use cheaper models like grok-4.3 when possible, batch non-urgent jobs for 20% off, and limit live-search tool calls.


Editor’s note — sources: All Grok per-token prices, the long-context tier, tool/live-search fees, US-region surcharge, batch and priority multipliers are from xAI’s developer pricing (page last updated October 10, 2026). Intelligence scores are from the Artificial Analysis Intelligence Index v5. Competitor prices are from each vendor’s own pricing page (Anthropic, OpenAI, Google, DeepSeek). All figures as of November 2026; prices change, so verify against the source before relying on them.

Get Edgewisely in your inbox

Business stories that matter, free. Enter your email — no password, no account to set up.
jamie@example.com
Subscribe