Library

Library

Grok API Pricing: Every Model, Token Cost, and How to Spend Less

Grok API Pricing: Every Model, Token Cost, and How to Spend Less

Grok API Pricing: Every Model, Token Cost, and How to Spend Less

"Grok API pricing 2026: every model and token cost

TL;DR

  • Current flagship: Grok 4.6, released August 12, 2026, costs $2.00 per million input tokens, $0.50 per million cached input tokens, and $6.00 per million output tokens for prompts below 200K tokens. It has a 500K-token context window and is designed for long-running agents, coding, research, and interactive or visual work.

  • Long-context pricing: Once a prompt reaches 200K tokens, xAI bills the entire request at $4.00/M input, $1.00/M cached input, and $12.00/M output.

  • Lowest-priced active general-purpose tier: Grok 4.3 is tied with the three Grok 4.20 variants at $1.25/M input and $2.50/M output. For coding-specific workloads, Grok Build 0.1 is cheaper at $1.00/M input and $2.00/M output.

  • Grok 4.5 remains available: Its standard input and output prices match Grok 4.6, but its cached-input rate is lower at $0.30/M.

  • Check before deploying: Model availability and promotional credits can vary by account and region. Verify both in the xAI Console.

See the live Grok 4.6 API pricing page or use the LLM cost calculator to estimate your own workload.

Grok Model Pricing at a Glance

All prices are in USD per 1 million tokens. Updated August 12, 2026.

Model

Context window

Standard input

Cached input

Standard output

Long-context input

Long-context cached

Long-context output

Best for

grok-4.6

500K

$2.00

$0.50

$6.00

$4.00

$1.00

$12.00

Latest frontier model, long-running agents, coding, research, and interactive work

grok-4.5

500K

$2.00

$0.30

$6.00

$4.00

$0.60

$12.00

Previous flagship, coding and agentic workloads

grok-build-0.1

256K

$1.00

$0.20

$2.00

$2.00

$0.40

$4.00

Cost-efficient coding specialist

grok-4.3

1M

$1.25

$0.20

$2.50

$2.50

$0.40

$5.00

General-purpose, cost-efficient reasoning

grok-4.20-multi-agent-0309

1M

$1.25

$0.20

$2.50

$2.50

$0.40

$5.00

Multi-agent orchestration and long context

grok-4.20-0309-reasoning

1M

$1.25

$0.20

$2.50

$2.50

$0.40

$5.00

Reasoning-heavy tasks

grok-4.20-0309-non-reasoning

1M

$1.25

$0.20

$2.50

$2.50

$0.40

$5.00

Lower-latency standard completions

Important: Long-context rates apply to all tokens in a request once its prompt reaches 200K tokens. A 210K-token prompt is not billed as 200K tokens at the standard rate plus 10K at the higher rate. The full request receives the higher rate.

xAI also offers Priority Processing at 2x standard token prices. This is a service tier for higher scheduling priority, not a separate Grok 4.6 model. You are charged the priority rate only when the response confirms "service_tier": "priority".

Why Grok API Costs Scale Faster Than Expected

The model's list price is only one part of the bill. Multi-turn agents frequently send conversation history, system prompts, retrieved documents, and tool results back to the model on every request.

For example, a 20-turn agent that repeatedly sends 30K tokens of context can process roughly 600K input tokens across the session before counting its generated output. If an individual prompt crosses 200K tokens, Grok 4.6's long-context rate applies to the entire request.

A memory layer helps by storing durable facts and retrieving only what matters for the current request. Instead of repeatedly sending the complete transcript, the application can provide a smaller set of relevant memories.

Reduce repeated context in Grok applications

Mem0 stores and retrieves relevant memory instead of forcing an application to resend its full conversation history on every call. Read the LLM token-cost reduction guide to see where memory, caching, and model routing can reduce unnecessary input tokens.

Grok 4.6

Grok 4.6 is xAI's latest frontier model, released August 12, 2026. According to xAI, it builds on Grok 4.5 with a focus on long-running agents and more ambitious interactive and visual work. The company positions it for multi-step tasks such as research, codebase analysis, application development, and the production of polished work artifacts.

Grok 4.6 accepts text and image inputs and returns text. It supports reasoning, function calling, and structured outputs.

Grok 4.6 pricing

Usage

Below 200K prompt tokens

At or above 200K prompt tokens

Input

$2.00/M

$4.00/M

Cached input

$0.50/M

$1.00/M

Output

$6.00/M

$12.00/M

The model has a 500K-token context window. Grok 4.6 is available through the xAI API and partners including Cursor, Grok Build, OpenRouter, Vercel, and Cloudflare. Partner prices, promotions, and included usage may differ from direct API rates.

Artificial Analysis independently measured Grok 4.6 at 61 on its Intelligence Index, in line with GPT-5.6 Sol. Claude Opus 5 scored 63 and Claude Fable 5 scored 62 in the same analysis. A composite benchmark does not make the models interchangeable for every workload, but it provides a more useful capability reference than price alone. Compare the live token rates and context limits on Grok 4.6 vs GPT-5.6 Sol.

Use Grok 4.6 when your workload benefits from the newest xAI model and sustained multi-step execution. Use Grok 4.3 or Grok Build 0.1 when token cost matters more than having the latest frontier model.

Grok 4.5

Grok 4.5 was released July 8, 2026 and is now the previous-generation flagship. It remains available with a 500K-token context window and the same standard input and output prices as Grok 4.6.

The main pricing difference is prompt caching. Grok 4.5 cached input costs $0.30/M below the long-context threshold, compared with $0.50/M for Grok 4.6. Above the threshold, Grok 4.5 cached input costs $0.60/M.

Existing applications can continue using Grok 4.5. New deployments should test both models on representative tasks before migrating, since a newer model does not automatically produce a lower total cost for every workload.

Grok 4.3

Grok 4.3 sits in xAI's lowest-priced active general-purpose tier, tied with the three Grok 4.20 variants. It costs $1.25/M input, $0.20/M cached input, and $2.50/M output below the long-context threshold.

It also has a larger 1M-token context window. However, requests reaching 200K prompt tokens are billed at $2.50/M input, $0.40/M cached input, and $5.00/M output.

Use Grok 4.3 for general production workloads where cost efficiency and a larger context window matter more than Grok 4.6's newest agentic capabilities.

Grok 4.20

Grok 4.20 is available in three variants with the same published token rates:

  • grok-4.20-multi-agent-0309 for multi-agent orchestration.

  • grok-4.20-0309-reasoning for reasoning-heavy workloads.

  • grok-4.20-0309-non-reasoning for standard completions without the reasoning variant.

Each variant has a 1M-token context window. Standard pricing is $1.25/M input, $0.20/M cached input, and $2.50/M output. At or above 200K prompt tokens, pricing increases to $2.50/M input, $0.40/M cached input, and $5.00/M output.

Grok Server-Side Tools Pricing

Server-side tool usage is billed in addition to the model's token costs. Agentic requests can therefore cost more than text-only calls even when they use the same model.

Tool

Cost

Web Search

$5.00 per 1K calls

X Search

$5.00 per 1K calls

Code Execution

$5.00 per 1K calls

Image Generation

Billed at the applicable Imagine API rates

File Attachments Search

$10.00 per 1K calls

Collections Search

$2.50 per 1K calls

Image Understanding from search results

Token-based

X Video Understanding

Token-based

Remote MCP Tools

Token-based

Tool costs can multiply during autonomous agent runs because the model decides how many searches or executions to perform. Set tool limits, cache reusable results, and monitor invocation counts separately from token usage.

Usage Guidelines Violation Fee

xAI charges $0.05 per request when a usage-guideline violation is detected before generation in the Responses API. When a violation is detected during generation, the request is still charged for the tokens generated. Treat policy failures as both a safety issue and a measurable cost item when monitoring production traffic.

Grok Voice and Imagine API Pricing

Voice API

Model or service

Cost

grok-voice-think-fast-1.0

$0.05/minute or $3.00/hour for audio, plus $0.004 for text input

grok-voice-think-fast-2.0

$0.08/minute or $4.80/hour for audio, plus $0.004 for text input

Speech to Text, REST

$0.10/hour

Speech to Text, streaming

$0.20/hour

Text to Speech

$15.00 per 1M characters

Imagine API

Model

Media input

Output pricing

grok-imagine-image-quality

$0.01/image

$0.05/image at 1K, $0.07/image at 2K

grok-imagine-image

$0.002/image

$0.02/image at 1K or 2K

grok-imagine-image-2.0

$0.01/image

$0.04 at 1K Low, $0.06 at 2K Low, $0.06 at 1K Medium, $0.08 at 2K Medium

grok-imagine-video-1.5

$0.01/image

$0.08/second at 480p, $0.14/second at 720p, $0.25/second at 1080p

grok-imagine-video

$0.01/second for video or $0.002/image

$0.05/second at 480p, $0.07/second at 720p

Files and Collections Pricing

Resource

Rate

File storage

$0.025 per GiB per day

Collection storage

$0.10 per GiB per day

File downloads

$0.20 per GiB downloaded

Collection downloads

$0.20 per GiB downloaded

Collection storage costs four times as much as raw file storage. For large retrieval pipelines, remove obsolete documents and avoid maintaining duplicate indexes.

Batch and Priority Processing

The Batch API processes asynchronous jobs, typically within 24 hours. xAI currently lists a 20% batch discount for Grok 4.3 and the three Grok 4.20 variants. Models that are not listed in xAI's batch-discount table do not currently receive a published batch discount.

Priority Processing provides higher scheduling priority at 2x standard token rates. It applies to input, output, cached, and reasoning tokens, with prompt-caching discounts applied before the 2x multiplier. It is available for Chat Completions and Responses endpoints and is not supported for image generation, video generation, or Batch API requests.

API vs Subscription: Which Should You Use?

Use the API when you are building a product, backend integration, chatbot, coding agent, or automated workflow. API billing is usage-based and does not require a consumer Grok subscription.

Use a consumer subscription when you primarily want the Grok chat interface rather than programmatic model access. Consumer plan names, model access, and usage allowances change more frequently than API token prices, so verify the current offer on Grok before buying.

Use case

Recommended option

Latest xAI model for long-running agents, coding, and research

API with Grok 4.6

Existing coding or agentic deployment that does not yet need 4.6

API with Grok 4.5

Cost-efficient general-purpose reasoning

API with Grok 4.3

Lower-cost coding-specific work

API with Grok Build 0.1

Multi-agent orchestration

API with Grok 4.20 Multi-Agent

Personal chat usage

Current Grok consumer subscription

Enterprise requirements, SLAs, or custom terms

Contact xAI sales

Grok 4.6 Pricing vs Other Frontier Models

The comparison below uses the currently listed catalog rates. Prices can change, and different providers may offer caching, batch, or priority rates that change the effective bill.

Model

Positioning

Input $/M

Output $/M

Context window

Detailed comparison

Grok 4.6

xAI latest frontier model

$2.00

$6.00

500K

Live Grok 4.6 pricing

GPT-5.6 Sol

OpenAI frontier model

$5.00

$30.00

1.05M

Grok 4.6 vs GPT-5.6 Sol

Claude Opus 5

Anthropic frontier model

$5.00

$25.00

1M

Grok 4.6 vs Claude Opus 5

At these listed rates, Grok 4.6 costs 60% less for input and 80% less for output than GPT-5.6 Sol. Compared with Claude Opus 5, its input rate is 60% lower and its output rate is 76% lower. See our full breakdown of Claude pricing for the complete Opus, Sonnet, and Haiku rate card.

These percentages compare token prices, not model quality. Artificial Analysis independently scored Grok 4.6 at 61, behind Claude Opus 5 at 63 and Claude Fable 5 at 62, while placing it in line with GPT-5.6 Sol. Grok 4.6's lower token price therefore should not be described as outright superiority over the higher-scoring Claude models. Reliability, latency, tool support, context requirements, and provider availability should also inform the decision. A speed-focused model such as Gemini Flash should not be presented as a direct frontier equivalent.

How to Calculate Grok 4.6 API Cost

For a request below the 200K-token threshold:

Total cost = (input tokens / 1,000,000 × $2.00)
           + (cached input tokens / 1,000,000 × $0.50)
           + (output tokens / 1,000,000 × $6.00)
           + tool invocation costs
Total cost = (input tokens / 1,000,000 × $2.00)
           + (cached input tokens / 1,000,000 × $0.50)
           + (output tokens / 1,000,000 × $6.00)
           + tool invocation costs
Total cost = (input tokens / 1,000,000 × $2.00)
           + (cached input tokens / 1,000,000 × $0.50)
           + (output tokens / 1,000,000 × $6.00)
           + tool invocation costs

For example, 1 million standard input tokens plus 250,000 output tokens costs:

Input:  1.00 × $2.00 = $2.00
Output: 0.25 × $6.00 = $1.50
Total:                 = $3.50
Input:  1.00 × $2.00 = $2.00
Output: 0.25 × $6.00 = $1.50
Total:                 = $3.50
Input:  1.00 × $2.00 = $2.00
Output: 0.25 × $6.00 = $1.50
Total:                 = $3.50

This aggregate example assumes the individual prompts remain below 200K tokens. If any prompt reaches 200K tokens, apply the long-context rates to that complete request.

How to Reduce Grok API Costs

1. Route requests by difficulty

Do not send every request to Grok 4.6. Use Grok 4.3 for cost-sensitive general work and Grok Build 0.1 for lower-cost coding workloads. Reserve Grok 4.6 for tasks that need its newest agentic capabilities.

2. Keep individual prompts below the long-context threshold

Crossing 200K prompt tokens increases Grok 4.6 rates from $2/$0.50/$6 to $4/$1/$12. Summarize old context, retrieve only relevant documents, and split independent work into smaller requests where appropriate.

3. Take advantage of prompt caching

xAI automatically reports cached token usage in the API response. Keep stable instructions and repeated context in consistent prompt prefixes so the provider can reuse them when eligible.

4. Limit autonomous tool calls

Web Search, X Search, Code Execution, File Attachments, and Collections Search are billed separately. Set clear budgets and stopping conditions for autonomous agents.

5. Replace repeated history with retrieved memory

Long-running agents often resend information that has already been established. Store durable facts once and retrieve a small relevant set for each request. This can reduce both standard input usage and the chance of crossing the 200K long-context threshold.

Frequently Asked Questions

What does Grok 4.6 cost?

For prompts below 200K tokens, Grok 4.6 costs $2 per million input tokens, $0.50 per million cached input tokens, and $6 per million output tokens. Tool calls are billed separately.

Does Grok 4.6 have long-context pricing?

Yes. Once a prompt reaches 200K tokens, the entire request is billed at $4/M input, $1/M cached input, and $12/M output. The model's maximum context window is 500K tokens.

How is Grok 4.6 different from Grok 4.5?

xAI positions Grok 4.6 as an improvement for long-running agents and ambitious interactive and visual work. Both models have the same standard input and output prices and a 500K-token context window. Grok 4.6 cached input is $0.50/M, while Grok 4.5 cached input is $0.30/M.

What is the cheapest active Grok API model?

Grok Build 0.1 has the lowest listed text-token rate for coding-specific work at $1/M input and $2/M output. For general-purpose use, Grok 4.3 is tied with the three Grok 4.20 variants at $1.25/M input and $2.50/M output.

Is Grok 4.6 cheaper than GPT-5.6 Sol and Claude Opus 5?

Its currently listed input and output token prices are lower. However, raw token price does not establish equivalent capability. Test each model on representative workloads and account for context, latency, tool use, caching, and provider reliability.

Does Grok 4.6 support prompt caching?

Yes. Cached input costs $0.50/M below the 200K prompt threshold and $1/M at or above it. Cached token usage is shown in the API response.

Does xAI offer free API credits?

xAI has offered promotional or data-sharing credits, but availability and amounts can change. Check the xAI Console rather than treating a historical credit amount as guaranteed.

Should I use the Grok API or a Grok subscription?

Use the API for applications and automated workflows. Use a subscription when you primarily want access through the consumer chat interface. API access does not require a consumer subscription.

How can I reduce Grok API costs at scale?

Use a cheaper model for routine requests, keep prompts below 200K tokens, reuse cacheable prompt prefixes, limit autonomous tool calls, and retrieve relevant memory instead of repeatedly sending complete conversation history.

Useful Sources

GET TLDR from:

Summarize

Website/Footer

Summarize

Website/Footer

Summarize

Website/Footer

Summarize

Website/Footer