Grok API Pricing 2026: Models, Token Costs & Limits

Written by

in

Decoding Grok API Pricing: Models, Hidden Multipliers, and Cost-Control Strategies

Building with xAI’s Grok models is no longer a niche experiment—it is a mainstream architectural choice for developers looking for massive context windows, native real-time X and web search, and aggressive token economics. Over the past year, xAI dramatically slashed its output rates by over 80% while expanding its lineup beyond pure text into voice, image, and video generation.

However, estimating a monthly xAI bill requires looking past the headline per-million-token numbers. Between sudden context-length price cliffs, server-side tool fees, and distinct multimodal meters, unoptimized Grok workloads can surprise even seasoned engineering teams.


Consumer Subscriptions vs. The Developer API

A common point of confusion for newcomers is the relationship between consumer plans and developer access. Your X Premium or SuperGrok subscription does not include API credits.

  • Consumer Tiers: Free ($0), X Premium ($8–$40/month), SuperGrok ($30/month), and SuperGrok Heavy ($300/month) govern usage inside the Grok web/mobile apps and X interface using shared weekly usage pools.
  • Developer API: Operates strictly on a pay-as-you-go basis via the xAI Console. Developers load prepaid credits (or establish monthly invoicing at enterprise scale), and every inference call deducts directly from that balance. Notably, xAI returns a cost_in_usd_ticks field in every API response—where 10 billion ticks equal $1.00—allowing you to track exact per-request spend down to fractions of a cent.

Core Text & Reasoning Model Pricing

xAI structures its text pricing around a 3:1 or 2:1 output-to-input token ratio, keeping generation costs noticeably lower than several competing frontier labs. Standard rates apply to prompts under 200,000 tokens:

Model API Model ID Context Window Standard Input (/ 1M) Cached Input (/ 1M) Standard Output (/ 1M) Primary Use Case
Grok 4.7 grok-4.7 500K $2.00 $0.50 $6.00 Current flagship for complex coding, agents, and deep reasoning
Grok 4.6 / 4.5 grok-4.6 / 4.5 500K $2.00 $0.50 ($0.30 on 4.5) $6.00 Legacy flagships maintained for existing production deployments
Grok 4.3 grok-4.3 1M $1.25 $0.20 $2.50 Cost-efficient general reasoning and large document ingestion
Grok 4.20 Family grok-4.20-* 1M $1.25 $0.20 $2.50 Specialized reasoning, non-reasoning, and multi-agent orchestration
Grok Build 0.1 grok-build-0.1 256K $1.00 $0.20 $2.00 High-throughput, budget-friendly code generation and editing

(Note: Reasoning models generate internal chain-of-thought tokens before producing a final answer; these hidden reasoning tokens are billed at the standard Output token rate.)


Multimodal APIs: Imagine and Voice

Beyond text completions, xAI exposes native endpoints for real-time audio and visual media, each metered by time, character count, or resolution:

Imagine API (Image & Video)

  • Grok Imagine Image 2.0: $0.01 per input image; outputs start at $0.04/image (1K Low) and scale up to $0.08/image (2K Medium). The standard grok-imagine-image model offers a flat $0.02/image output rate.
  • Grok Imagine Video 1.5: Supports text, image, and audio inputs to generate 480p, 720p, or 1080p video. Pricing starts at $0.08/second (480p) and scales to $0.25/second (1080p), while grok-imagine-video-1.5-lite starts at $0.02/second.

Voice API

  • Speech-to-Speech (Realtime): $0.08 per minute ($4.80/hour) for live conversational agents, plus $0.004 for text input.
  • Text-to-Speech (TTS): $15.00 per 1 million characters.
  • Speech-to-Text (STT): $0.10 per hour for asynchronous REST transcription and $0.20 per hour for live streaming.

The Three Pricing Traps That Inflate Bills

When moving from prototype to production, three structural rules in xAI’s billing engine account for the vast majority of unexpected cost spikes:

  1. The 200K Long-Context Cliff: While models like Grok 4.7 and Grok 4.3 advertise 500K and 1M context windows, standard pricing only applies below 200,000 prompt tokens. The moment a prompt hits 200,000 tokens, xAI doubles the input, cached-input, and output rates for the entire request—not just the tokens exceeding the threshold. A 199K-token prompt on Grok 4.7 costs ~$0.40 in input; a 201K-token prompt jumps immediately to ~$0.80.
  2. Server-Side Agentic Tool Fees: Grok’s native ability to search the web, query X, or execute code carries per-call surcharges on top of token usage:
    • Web Search & Code Execution: $5.00 per 1,000 calls.
    • File Attachments Search: $10.00 per 1,000 calls.
    • Collections Search: $2.50 per 1,000 calls.
    • X Search: Metered at $5.00 per 1,000 posts fetched plus $10.00 per 1,000 user profiles fetched.
  3. Priority & Regional Multipliers: Opting into Priority Processing for lower latency doubles your token rates ($2times$), while routing requests specifically through dedicated US regional endpoints (such as on Grok 4.6) adds a $1.1times$ multiplier.

Four Ways to Optimize Your Grok Spend

You can dramatically reduce your effective cost per request without sacrificing output quality by designing around xAI’s billing mechanics:

  • Maximize Prompt Caching: Cached input tokens on Grok 4.7 cost $0.50/M instead of $2.00/M—a 75% discount (and up to 84% off on Grok 4.3). Keep static system instructions, tool schemas, and few-shot examples at the very beginning of your prompt, and pass consistent x-grok-conv-id headers or prompt_cache_key parameters so sequential turns route to the same cache node.
  • Cap Context Below 199K Tokens: Unless a task strictly requires ingesting an entire codebase or massive legal repository in one shot, use retrieval-augmented generation (RAG) or conversation summarization to keep prompt payloads safely under the 200K-token doubling cliff.
  • Route Traffic by Task Complexity: Reserve Grok 4.7 ($2/$6) for multi-step agentic orchestration and complex debugging. Route routine classification, summarization, and large-context extraction to Grok 4.3 ($1.25/$2.50), and offload boilerplate code generation to Grok Build 0.1 ($1/$2).
  • Leverage Batch Processing for Async Workloads: If your pipeline processes overnight evaluations, data enrichment, or bulk document tagging on Grok 4.3 or Grok 4.20 variants, use the Batch API to capture a flat 20% discount across your token spend. (Note: Flagship models like Grok 4.7 and 4.6 do not currently carry a batch discount.)

Comments

Leave a Reply

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