Grok API Pricing 2026: Complete Token Rates & Cost Guide

Written by

in

Grok API pricing spans text tokens, long-context thresholds, server-side tools, voice, image/video generation, and storage—so your actual bill depends on which model you call, how long your prompt is, and which extra tools your app triggers. For current flagship Grok 4.7 (grok-4.7), standard rates for prompts under 200K tokens are $2.00 per 1M input tokens, $0.50 per 1M cached input tokens, and $6.00 per 1M output tokens. (Note: Following SpaceX’s acquisition of xAI in 2026 and the company’s rebrand to SpaceXAI, official documentation pages may appear under SpaceXAI, while the Grok model names and API endpoints remain Grok.)


Text & Reasoning Model Pricing

Most text models use a 200K-token long-context cliff. Once a prompt reaches 200,000 tokens or more, long-context rates apply to the entire request—not just the tokens past the threshold.

Model Context Standard (<200K) Input / Cached / Output Long Context (≥200K) Input / Cached / Output Best Fit
Grok 4.7 (grok-4.7) 500K $2.00 / $0.50 / $6.00 $4.00 / $1.00 / $12.00 Flagship coding, agents, configurable reasoning
Grok 4.6 (grok-4.6) 500K $2.00 / $0.50 / $6.00 $4.00 / $1.00 / $12.00 Pinned legacy/flagship parity workflows
Grok 4.5 (grok-4.5) 500K $2.00 / $0.30 / $6.00 $4.00 / $0.60 / $12.00 Heavy prompt-caching workloads at the $2/$6 tier
Grok 4.3 (grok-4.3) 1M $1.25 / $0.20 / $2.50 $2.50 / $0.40 / $5.00 High-volume general chat, coding, and large context
Grok 4.20 Variants (grok-4.20-0309-*) 1M $1.25 / $0.20 / $2.50 $2.50 / $0.40 / $5.00 Multi-agent, reasoning, and non-reasoning variants
Grok Build 0.1 (grok-build-0.1) 256K $1.00 / $0.20 / $2.00 $2.00 / $0.40 / $4.00 Cost-sensitive build and coding tasks

All token prices above are per 1 million tokens in USD.

Notice two subtle details when comparing models:

  • Grok 4.7 vs. Grok 4.6 vs. Grok 4.5: Base input ($2.00) and output ($6.00) are identical below 200K tokens, while Grok 4.5 has a slightly cheaper cached-input rate ($0.30/M vs. $0.50/M).
  • Grok 4.7 Fast: Runs at 2x standard rates ($4.00/$12.00 under 200K; $6.00/$18.00 above 200K) and is restricted to integrations like Cursor and Grok Build rather than general public API billing.

Beyond Tokens: Tools, Media, Voice, and Storage

A common surprise on API bills is non-token usage. Built-in tools, media generation, voice endpoints, and hosted files meter separately:

  • Server-Side Tools:
    • Web Search (web_search), Code Execution (code_execution), and File Attachments (attachment_search): $5.00 per 1,000 calls each.
    • X Search (x_search): Billed per volume returned—$5.00 per 1,000 posts and $10.00 per 1,000 user profiles.
    • Collections Search (collections_search): $2.50 per 1,000 calls.
    • Image & X Video Understanding (view_image, view_x_video) and Remote MCP Tools: Billed on token usage.
  • Voice API: Speech-to-Speech runs at $0.08/minute ($4.80/hour) plus $0.004 per text input. Speech-to-Text costs $0.10/hour (REST) or $0.20/hour (streaming), and Text-to-Speech costs $15.00 per 1 million characters.
  • Image & Video Generation: Image models (grok-imagine-image / grok-imagine-image-2.0) generally range from $0.02 to $0.08 per output image depending on version, resolution, and quality tier (plus media input charges). Video models (grok-imagine-video series) bill per second of output—roughly $0.02 to $0.25/second depending on model and resolution (480p, 720p, or 1080p).
  • Files, Collections, and Regional Routing: Storing files costs $0.025/GiB/day and collections cost $0.10/GiB/day, with downloads at $0.20/GiB. Routing requests to the US regional endpoint carries a 1.1x (10%) premium over global token rates.

Discounts, Priority Tiers, and How to Keep Costs Down

You do not have to pay list price across every workload:

  1. Batch API (20% Off): Asynchronous jobs that can tolerate delayed completion—such as evaluations, dataset backfills, or nightly pipelines—get a 20% discount on supported models (grok-4.7, grok-4.6, grok-4.5, grok-4.3, and the grok-4.20-0309 variants).
  2. Prompt Caching: Reusing long system prompts, instructions, or static context lets cached tokens bill at $0.20–$0.50/M under 200K instead of full input rates.
  3. Priority Processing (2x Rate): When latency and scheduling priority matter more than cost on Chat Completions or Responses endpoints, opting into priority tiering charges 2x standard rates (confirming service_tier: "priority" in responses).
  4. Right-Size Models & Watch the 200K Line: Defaulting every call to Grok 4.7 when Grok 4.3 or Grok Build 0.1 handles the task cleanly can cut token spend by roughly half to two-thirds. Likewise, trimming or chunking contexts so prompts stay below 200K tokens avoids doubling the entire request’s rate.

Bottom Line

Grok API pricing is competitive on flagship output tokens—especially at $6.00/1M for Grok 4.7—and offers clear step-downs with Grok 4.3 and Grok Build 0.1. The surest way to avoid bill shock is to model tool calls and 200K+ token spikes upfront, test quality against cheaper tiers before locking in Grok 4.7, and move non-urgent workloads onto Batch API.

Comments

Leave a Reply

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