Grok API Pricing: Full Cost Breakdown & Rate Limits (2026)

Written by

in

Decoding Grok API Pricing: What Developers Actually Pay in Late 2026

Pricing an AI feature used to be as simple as multiplying request volume by a flat per-token rate. Today, billing on xAI’s Grok API depends on model tier, context length, prompt caching, media modality, and even routing choices. Getting the math right upfront separates predictable unit economics from a surprise spike on your monthly invoice.

Core Text Model Rates

For standard text and reasoning workloads (prompts under 200,000 tokens), xAI prices its lineup per million tokens with distinct input, cached input, and output rates:

Model Context Window Standard Input / 1M Cached Input / 1M Standard Output / 1M
Grok 4.7 (grok-4.7) 500K $2.00 $0.50 $6.00
Grok 4.6 (grok-4.6) 500K $2.00 $0.50 $6.00
Grok 4.5 (grok-4.5) 500K $2.00 $0.30 $6.00
Grok 4.3 (grok-4.3) 1M $1.25 $0.20 $2.50
Grok 4.20 (grok-4.20-0309) 1M $1.25 $0.20 $2.50
Grok Build 0.1 (grok-build-0.1) 256K $1.00 $0.20 $2.00

Two structural patterns stand out immediately:

  • Output costs 2x to 3x more than input. Across current tiers, generated tokens carry a heavier price tag than prompt tokens—especially in reasoning or agentic coding loops where the model writes long plans, tool calls, or multi-file diffs.
  • Prompt caching is a major lever. Reusing static system prompts, schemas, or large reference blocks via cached input cuts input token costs by 75% to 85% depending on the model. For chat assistants or multi-turn agents with a heavy prefix, cache hit rates often matter more than shaving a few cents off base rates.

The 200K Token Long-Context Cliff

Large context windows look generous on a spec sheet, but xAI doubles standard token rates once a prompt reaches 200,000 tokens:

  • Grok 4.7 / 4.6 jumps from $2.00 / $6.00 (input / output per 1M) to $4.00 / $12.00, with cached input moving from $0.50 to $1.00.
  • Grok 4.3 / 4.20 moves from $1.25 / $2.50 to $2.50 / $5.00 (cached input rising from $0.20 to $0.40).
  • Grok Build 0.1 doubles from $1.00 / $2.00 to $2.00 / $4.00.

If your application occasionally stuffs an entire repository or long document into context and crosses 200K tokens on even a fraction of requests, average cost per call climbs faster than linear token growth suggests. Chunking, retrieval, or summarizing before assembly is essential when keeping margins tight.

Voice, Image, Video, and Search Add-Ons

Grok’s API isn’t limited to text tokens—multimodal and tool endpoints bill on their own units:

  • Voice API: Speech-to-speech runs at $0.08 per minute ($4.80/hour) plus text input charges where applicable; speech-to-text costs $0.10/hour (REST/batch) or $0.20/hour (streaming); text-to-speech is $15.00 per 1 million characters.
  • Image & Video (Imagine): Image generation and editing scale by model version, quality, and resolution—starting around $0.02 per image on standard grok-imagine-image and ranging from $0.04 to $0.08 per output image (plus input media charges) on grok-imagine-image-2.0. Video generation bills per generated second across resolutions (starting at $0.02/sec on grok-imagine-video-1.5-lite at 480p and reaching $0.25/sec at 1080p on grok-imagine-video-1.5).
  • Search & Routing Extras: Built-in web search and X search tools carry per-call/per-post fees (such as $5.00 per 1,000 web searches or X posts), batch processing offers discounts on eligible models, and regional routing options like US endpoints can add a surcharge multiplier.

How to Budget Smartly

  1. Match the model to the task’s ceiling. Reserve grok-4.7 for complex coding, multi-step agentic workflows, and high-stakes reasoning. Route routine classification, extraction, or lighter generation to grok-4.3 or grok-build-0.1.
  2. Design prompts for cache hits. Keep static instructions and shared context at the front of the prompt so they stay stable across turns and requests.
  3. Watch token distribution, not just request count. Track both p95 input length (to catch accidental 200K+ long-context crossings) and average output length (since verbose completions multiply costs quickly).
  4. Load credits with guardrails. Because self-serve API usage runs on pre-funded credits rather than a free tier, set spend alerts and max-token caps per request during development and load testing.

When evaluating Grok API pricing, the sticker price per million tokens is only half the story—your prompt structure, context discipline, and output verbosity determine whether your bill feels like a bargain or an ambush.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *