TokenSave logo TokenSave

Grok API Pricing 2026: Grok 4.7, 4.3, Tools and Imagine Costs

Jonhisking · October 12, 2026

Grok API Pricing 2026: Grok 4.7, 4.3, Tools and Imagine Costs

Grok API pricing is easy to find and easy to misread. xAI now lists eight text model IDs across four price levels, with three different cached-input prices, and every one of them switches to a higher rate once a prompt reaches 200,000 tokens. Tool calls such as web search are billed on top, and image and video generation have their own price lists. This guide covers xAI's official prices as of October 12, 2026, including Grok 4.7, released on September 21: what each model costs, what the extras add, how to get an API key, and what common workloads cost compared with GPT-6, Claude and DeepSeek.

Grok API pricing (official, October 2026)

Grok API pricing (official, October 2026): Model, Context, Input, Cached input, Output

xAI's pricing page lists these text models. Prices are per 1 million tokens:

Model Context Input Cached input Output
grok-4.7 (newest) 500K $2.00 $0.50 $6.00
grok-4.6 500K $2.00 $0.50 $6.00
grok-4.5 500K $2.00 $0.30 $6.00
grok-4.3 1M $1.25 $0.20 $2.50
grok-4.20 (reasoning, non-reasoning, multi-agent) 1M $1.25 $0.20 $2.50
grok-build-0.1 256K $1.00 $0.20 $2.00

Long-context pricing above 200K tokens

Every text model has a second price tier. Once a single prompt reaches 200,000 tokens, the higher rate applies to every token in that request, not just the part above 200K:

Model Input Cached input Output
grok-4.7, 4.6 $4.00 $1.00 $12.00
grok-4.5 $4.00 $0.60 $12.00
grok-4.3, 4.20 $2.50 $0.40 $5.00
grok-build-0.1 $2.00 $0.40 $4.00

Price modifiers

Tools, images, video and voice

Tool calls

When Grok uses a server-side tool, you pay per call on top of the tokens:

Tool Price
Web search, image search $5 per 1,000 calls
X search $5 per 1,000 posts, $10 per 1,000 profiles
Code execution $5 per 1,000 calls
File attachment search $5 per 1,000 calls
Collections search $2.50 per 1,000 calls
Viewing images, X videos, remote MCP tools Billed as tokens

Grok Imagine: images and video

Model Price
grok-imagine-image $0.02 per image
grok-imagine-image-2.0 $0.04–$0.06 per image (low quality), $0.06–$0.08 (medium), by resolution
grok-imagine-image-quality $0.05–$0.07 per image (retiring November 2, 2026)
grok-imagine-video-1.5 $0.08 / $0.14 / $0.25 per second at 480p / 720p / 1080p
grok-imagine-video-1.5-lite $0.02 / $0.03 / $0.14 per second at 480p / 720p / 1080p

Input images for editing cost $0.002 to $0.01 each. A 10-second 1080p clip on grok-imagine-video-1.5 costs $2.50; the same clip at 720p on the lite model costs $0.30. To compare with other image and video models, use the AI image cost calculator and the AI video cost calculator.

Voice

Speech-to-speech costs $0.08 per minute, text-to-speech $15 per million characters, and speech-to-text $0.10 per hour (or $0.20 per hour streaming).

What Grok costs for real workloads

Here are three common jobs priced at list rates. All prices are per million tokens from each provider's official page.

1. A chatbot: 1,000 conversations

Each conversation sends 2,000 input tokens and returns 500 output tokens, with no caching: 2 million input and 0.5 million output tokens in total.

Model Price (input / output) Cost
GPT-6 Luna $0.10 / $0.50 $0.45
DeepSeek V4.1 Flash (off-peak) $0.15 / $0.60 $0.60
grok-build-0.1 $1.00 / $2.00 $3.00
Grok 4.3 $1.25 / $2.50 $3.75
Grok 4.7 $2.00 / $6.00 $7.00
GPT-6.1 Sol $2.00 / $10.00 $9.00
Claude Sonnet 5.5 $2.00 / $10.00 $9.00

2. A coding agent task

A medium agent task: 1.6 million input tokens, 90% of them cache hits, and 40,000 output tokens. The prompt stays under 200K tokens per request.

Model Cost per task
GPT-6 Luna $0.05
grok-build-0.1 $0.53
Grok 4.3 $0.59
GPT-6.1 Sol $0.86
Claude Sonnet 5.5 $0.86
Grok 4.5 $0.99
Grok 4.7 $1.28

3. The same agent with web search

Add 10 web searches per task at $5 per 1,000 calls, and each task above costs $0.05 more. That is small next to Grok 4.7's token cost, but it is the whole budget of a Luna-based task.

These are our calculations from list prices. To estimate a month of agent work, use the AI coding agent cost calculator.

Grok 4.7 vs GPT-6.1 Sol vs Claude Sonnet 5.5: per-token prices

Coding agent task cost on Grok, GPT and Claude models: from GPT-6 Luna at $0.05 to Grok 4.7 at $1.28

Price per 1M tokens Grok 4.7 GPT-6.1 Sol Claude Sonnet 5.5
Input $2.00 $2.00 $2.00
Cached input $0.50 $0.10 $0.10
Output $6.00 $10.00 $10.00

The three mid-size flagships charge the same for fresh input, so the difference comes down to two numbers. Grok 4.7's output is 40% cheaper, which favors work that writes a lot: long answers, drafts, translations and code generation from short prompts. Its cached input is 400% more expensive, which penalizes work that re-reads the same context many times: agents, long chats and question-answering over a large document. If you know roughly what share of your tokens are cached and what share are output, you can tell in advance which model will cost less.

Grok in Cursor: what we saw

Cursor lists Grok 4.7 at the same per-token prices as xAI's API: $2 input, $0.50 cache read and $6 output, and Grok 4.7 Fast at $4, $1 and $12. One difference: Cursor applies its long-context rate above 256K tokens, while xAI's own threshold is 200K.

On October 11, 2026, we gave Cursor's free plan a simple prompt to build a browser brick-breaker game. With the model left on Auto, Cursor sent this request to Grok 4.6. It finished in 1 minute 31 seconds, wrote 398 lines and produced a working game, and it used 15% of the free plan's monthly allowance. The full test is in Cursor pricing, and the same prompt in Claude Code and Codex is compared in Claude Code vs Codex vs Cursor.

How to get a Grok API key

xAI's quick-start guide describes these steps:

  1. Create an account at console.x.ai.
  2. Add credits. The API is prepaid: you load credits before making requests. xAI doesn't state a minimum purchase; the minimum for automatic top-up is $5.
  3. Create a key on the API Keys page and copy it somewhere safe.
  4. Store it as the environment variable XAI_API_KEY.
  5. Call the API. It is OpenAI-compatible: use the OpenAI SDK with base URL https://api.x.ai/v1 and a model such as grok-4.7.
from openai import OpenAI
import os

client = OpenAI(api_key=os.environ["XAI_API_KEY"], base_url="https://api.x.ai/v1")
reply = client.chat.completions.create(
    model="grok-4.3",
    messages=[{"role": "user", "content": "Explain prompt caching in two sentences."}],
)
print(reply.choices[0].message.content, reply.usage)

Rate limit tiers

xAI raises your rate limits as your total spend grows. Spend is counted from January 1, 2026, and tiers never go down:

Tier Total spend
Tier 0 $0
Tier 1 $50
Tier 2 $250
Tier 3 $1,000
Tier 4 $5,000
Enterprise On request

The limits per tier differ by model; check xAI's rate limits page for your model.

Grok API vs SuperGrok subscription

The API is separate from xAI's consumer plans. On x.ai's pricing page, Grok is free with limits, SuperGrok costs $30 a month and SuperGrok Plus costs $100 a month. The pricing page doesn't list API credits as part of either subscription, and the API is billed separately in the xAI console. If you only want to chat with Grok, a subscription is simpler; if you are building an app or running an agent, you need the API.

Which Grok model should you use?

How to keep your Grok bill down

  1. Stay under 200K tokens per request. Trim old conversation turns or summarize them before a long session crosses the threshold, since crossing it raises the price of the whole request.
  2. Reuse a stable prompt prefix. Cached input costs 75% less than fresh input on Grok 4.7 and 85% less on Grok 4.5, so keep fixed instructions and documents at the start of the prompt.
  3. Send bulk jobs to the Batch API. It takes 20% off Grok 4.3 and the 4.20 models.
  4. Use the global endpoint unless you need US data residency. The US regional endpoint costs 10% more.
  5. Limit tool calls. Web search costs $5 per 1,000 calls and X search $5 per 1,000 posts, on top of tokens, so ask for search only when the answer depends on fresh information.
  6. Pick the model per task. Route simple requests to Grok 4.3 or grok-build-0.1 and keep Grok 4.7 for the hard ones.

Grok API changes in 2026

Verdict

FAQ

How much does the Grok API cost? Grok 4.7 costs $2 per million input tokens, $0.50 per million cached input tokens and $6 per million output tokens. Grok 4.3 costs $1.25, $0.20 and $2.50, and grok-build-0.1 costs $1, $0.20 and $2. Prompts of 200K tokens or more are billed at rates 100% higher.

Is the Grok API free? No. It is prepaid with credits. The free $25 monthly credit from the 2024 beta has ended, and no current free-credit program is listed on xAI's site.

What is the cheapest Grok model? grok-build-0.1, at $1 input and $2 output per million tokens. Among general models, Grok 4.3 and Grok 4.20 at $1.25 and $2.50.

Does SuperGrok include API access? No. SuperGrok ($30 a month) and SuperGrok Plus ($100 a month) are consumer subscriptions. The API is billed separately through console.x.ai.

How much does Grok web search cost in the API? $5 per 1,000 calls, on top of the tokens the model uses.

What is Grok 4.7's context window? 500,000 tokens. Grok 4.3 and the Grok 4.20 models offer 1 million tokens, and grok-build-0.1 offers 256,000. On every model, prompts of 200K tokens or more are billed at the higher long-context rate.

Does the Grok API have a batch discount? Yes, 20% off, but only for Grok 4.3 and the three Grok 4.20 models. Grok 4.7 doesn't support batch requests.

Is Grok cheaper than GPT and Claude? For chat with little caching, Grok 4.7 costs about 22% less than GPT-6.1 Sol or Claude Sonnet 5.5. For agent work with heavy caching, it costs more, because its cached-input price is higher.

Run the numbers

Paste a prompt into the token counter to see its cost on Grok, GPT, Claude and Gemini models. For agent workloads, the AI coding agent cost calculator estimates a month of use.

Prices checked on xAI's documentation on October 12, 2026. Workload costs are our calculations from each provider's list prices. The Cursor test was one run on October 11, 2026.

Sources

More articles

Paste a prompt to see its token count and cost on Grok, GPT, Claude and Gemini models.

Open the token counter →