The Grok API from xAI is billed per token. Prices start at $1.00 per 1 million input tokens on grok-build-0.1 and rise to $12.00 per 1 million output tokens on Grok 4.6 once a single prompt passes 200,000 tokens. Under that threshold, Grok 4.6 costs $2.00 per 1 million input tokens and $6.00 per 1 million output tokens.

Our team at Cabina.AI tracks pricing for xAI directly, since we give developers access to Grok alongside 55+ other models through one subscription – when a rate changes, we see it firsthand. By our observation, xAI moves its pricing faster than most other providers, so we track these updates in Cabina.AI in real time.

Grok API Pricing Table – All Models

If you searched for grok api pricing expecting one flat number, here is the short version: xAI prices every model on two axes, not one. Each model has a standard rate for prompts under 200,000 tokens, and a higher long-context rate once a single request crosses that line. The table below covers standard pricing, in US dollars per 1 million tokens.

ModelContext windowInputCached inputOutput
Grok 4.6500K$2.00$0.50$6.00
Grok 4.5500K$2.00$0.30$6.00
Grok 4.31M$1.25$0.20$2.50
grok-4.20-0309-reasoning1M$1.25$0.20$2.50
grok-4.20-0309-non-reasoning1M$1.25$0.20$2.50
grok-4.20-multi-agent-03091M$1.25$0.20$2.50
grok-build-0.1 (coding)256K$1.00$0.20$2.00

Once a single prompt reaches 200,000 tokens, xAI bills the entire request, input and output together, at the long-context rate shown below. There is no partial surcharge – the whole request moves to the higher tier.

ModelInput (200K+)Cached input (200K+)Output (200K+)
Grok 4.6$4.00$1.00$12.00
Grok 4.5$4.00$0.60$12.00
Grok 4.3$2.50$0.40$5.00
grok-4.20-0309-reasoning$2.50$0.40$5.00
grok-4.20-0309-non-reasoning$2.50$0.40$5.00
grok-4.20-multi-agent-0309$2.50$0.40$5.00
grok-build-0.1 (coding)$2.00$0.40$4.00

Grok 4.6 is the current flagship and the model xAI recommends by default for coding, agentic tasks, and general knowledge work. It reads both text and images, so a prompt built from a screenshot and a question bills the same way as a text-only prompt, at the same per-token rate.

xAI also prices image, video, and voice generation separately from text tokens, since those are billed per unit of output rather than per token.

ModelTypePrice
grok-imagine-imageImage generation$0.02 per image
grok-imagine-image-2.0Image generation$0.04 per image
grok-imagine-image-qualityImage generation$0.05 per image
grok-imagine-videoVideo generation$0.050 per second
grok-imagine-video-1.5Video generation$0.080 per second
grok-voice-think-fast-2.0Speech to speech$0.08 per minute of audio
Speech to text (REST)Transcription$0.10 per hour of audio
Speech to text (streaming)Transcription$0.20 per hour of audio
Text to speechVoice generation$15.00 per 1 million characters

Grok API Cost Calculator

Pick a model and enter your expected monthly token volume below to estimate a monthly bill, with or without the Batch API discount.

Batch API only applies to Grok 4.3 and the grok-4.20 models below – it has no effect on Grok 4.6, Grok 4.5, or grok-build-0.1.

$76.00 / month
Grok 4.6 – $2.00 input / $6.00 output per 1M tokens

Estimate only. Standard (under 200,000 tokens per prompt) first-party Grok API rates. Excludes the long-context surcharge above 200,000 tokens per prompt, prompt caching, and image, video, and voice generation pricing.

Grok API Request Example

The example below sends one authenticated request to Grok 4.6 through the Responses API, the request format xAI documentation uses in its own quickstart. Swap the model field for any model ID from the tables above to price a different model.

curl https://api.x.ai/v1/responses \
  -H "Authorization: Bearer your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.6",
    "input": "Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}"
  }'

The same request in Python, using the OpenAI SDK pointed at the xAI base URL (the Grok API is OpenAI-compatible, so no separate SDK is required):

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key-here",
    base_url="https://api.x.ai/v1",
)

response = client.responses.create(
    model="grok-4.6",
    input="Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}",
)

print(response.output_text)

Model IDs to use in place of grok-4.6: grok-4.5, grok-4.3, grok-4.20-0309-reasoning, grok-4.20-0309-non-reasoning, grok-4.20-multi-agent-0309, and grok-build-0.1. Grok api pricing per million tokens is set at the account level by which of these model IDs you call, not by a separate plan or tier you have to select in advance.

Pricing Tiers for xAI, Explained

Long-context pricing (200,000+ tokens per prompt)

Every current Grok model roughly doubles its input, cached input, and output rates once a single prompt reaches 200,000 tokens. This is the single biggest lever on grok api cost for anyone working with long documents, large codebases, or extended conversation history – trimming a prompt just under the threshold can cut a request bill in half. We have found this threshold is the detail teams overlook most often when estimating a Grok budget: it is the entire request that jumps to the higher tier, not just the tokens past 200,000.

Batch API (-20%)

The Batch API processes requests asynchronously, with most batches completing within 24 hours. It applies a 20 percent discount across all token types, including reasoning and cached tokens. It does not extend to Grok 4.6, Grok 4.5, or grok-build-0.1. In our view, this selective eligibility is easy to miss when picking a model for async, high-volume processing – it is worth checking the model against this list before assuming the discount applies.

Spend-based rate limit tiers

Rate limits scale with how much a developer account has spent on the API, not with a manually selected plan. Tier 0, the default for a new account, starts at 150 requests per second and 50 million tokens per minute for Grok 4.6 and Grok 4.5. Spend enough to reach Tier 4 and those limits rise to 500 requests per second and 100 million tokens per minute, with a custom Enterprise tier above that available on request.

Prompt Caching on the Grok API

Prompt caching (reusing a previous prompt so the model does not reprocess it from scratch) is where xAI offers its steepest discount. On Grok 4.6, a cached input token costs $0.50 per 1 million versus $2.00 for a fresh input token, a 75 percent discount. Grok 4.5 goes further, at $0.30 per 1 million cached tokens, an 85 percent discount off its own $2.00 standard rate.

How much is a token in Grok once it is cached rather than fresh? Roughly a quarter to a sixth of the standard input price, depending on the model, which makes caching worthwhile for any application that resends the same system prompt or reference document on repeated calls. xAI does not publish a separate self-serve volume discount beyond caching and the Batch API; high-volume teams need to talk to sales for custom rates.

Grok 4.6 vs Grok 4.3 vs grok-build-0.1: Which Should You Use?

Grok 4.6 is the model to reach for by default. xAI positions it as the most capable and fastest model in the lineup, and its 500,000-token context window and image input cover most production use cases without needing a second model.

Grok 4.3 and the related grok-4.20-0309 variants are the mid-tier choice. At $1.25 input and $2.50 output per 1 million tokens for prompts under 200,000 tokens, they cost roughly half of Grok 4.6, and they carry a 1 million-token context window plus Batch API eligibility, which Grok 4.6 does not have.

grok-build-0.1 is the cheapest current model and is built specifically for coding workflows. At $1.00 input and $2.00 output per 1 million tokens, it is a reasonable default for high-volume code generation or review tasks where the largest, most general-purpose model is not necessary. From our experience running Grok at Cabina.AI, grok-build-0.1 is an underrated pick for code review tasks specifically – there is little reason to pay flagship rates for that kind of work.

Is the Grok API Free?

No, not for production use. Grok itself is free to use in chat form on grok.com and inside the X app, but calling the API requires a paid account. xAI has historically credited new API accounts with a small amount of free usage to test the platform, though the exact current amount is best confirmed on the signup page at console.x.ai rather than assumed from older announcements. Beyond any starting credit, every token is billed from the first production request – so if you are asking how much do Grok tokens cost before shipping to production, budget for per-token billing from day one, not a monthly allowance. We have noticed xAI publishes exact starting-credit figures less consistently than Anthropic or OpenAI, so we recommend checking console.x.ai directly before budgeting around it.

SuperGrok vs the Grok API: Which Is Cheaper?

SuperGrok is the consumer subscription for chatting with Grok on the web and in apps, separate from the developer API. It is priced in three tiers: SuperGrok Lite, SuperGrok, and SuperGrok Heavy, with Heavy adding a multi-agent mode built for the hardest, multi-step problems.

A subscription bundles a fixed monthly usage allowance for a flat fee, which tends to be cheaper for one person chatting daily. The API has no monthly cap and no chat interface bundled in – it charges per token, with no ceiling on total spend, which is the only realistic option once you are building something other people will use.

If you want to compare Grok against other models before committing to an API integration, Grok is also available on Cabina.AI alongside ChatGPT, Claude, and 50+ other models under one subscription, which is a lower-commitment way to test outputs side by side.

Grok API vs Claude API Pricing

Grok models api pricing lands close to Claude on the low end and meaningfully cheaper at the flagship tier, mostly because Grok splits pricing by prompt length rather than by a single flat rate per model.

Grok APIClaude API
Flagship modelGrok 4.6Claude Fable 5.1
Flagship input / output (per 1M, standard)$2.00 / $6.00$10.00 / $50.00
Cheapest modelgrok-build-0.1Claude Haiku 4.5
Cheapest input / output (per 1M)$1.00 / $2.00$1.00 / $5.00
Best cache discount85% (Grok 4.5)97.5% (Fable 5.1)
Batch API discount20% (select models)50%

The ChatGPT API from OpenAI uses a similar per-token structure with its own separate rate card, which we cover in a dedicated ChatGPT API Pricing guide on this blog. Use the calculator above to price a specific Grok model against your own token volume. Since Cabina.AI gives users both Grok and Claude on the same platform, we regularly see people comparing the two, and the deciding factor is usually context limits or Batch API eligibility for the task at hand, not price alone.

Grok API Pricing FAQ

Is the Grok API free?

No, not for production use. Grok is free to chat with on grok.com and in the X app, but the API requires a paid account and bills every token from the first production request. New accounts may receive a starting credit, though the current amount should be confirmed at signup rather than assumed.

How much does the Grok API cost per 1M tokens?

Grok api pricing per million tokens ranges from $1.00 input on grok-build-0.1 to $12.00 output on Grok 4.6 at the long-context rate. The flagship Grok 4.6 costs $2.00 input and $6.00 output per 1 million tokens for prompts under 200,000 tokens.

What is the cheapest and most expensive xAI model?

grok-build-0.1 is the cheapest current model, at $1.00 per 1 million input tokens and $2.00 per 1 million output tokens. Grok 4.6 is the most expensive once a prompt crosses 200,000 tokens, at $4.00 input and $12.00 output per 1 million tokens.

Does xAI offer a batch discount on the Grok API?

Yes, for some models. The Batch API cuts input, output, cached, and reasoning tokens by 20 percent for Grok 4.3, grok-4.20-0309-reasoning, grok-4.20-0309-non-reasoning, and grok-4.20-multi-agent-0309. Grok 4.6, Grok 4.5, and grok-build-0.1 are not currently eligible for the batch discount.

Does the Grok API charge more for long prompts?

Yes. Every current model roughly doubles its input, cached input, and output price once a single prompt reaches 200,000 tokens. The higher rate applies to the entire request, not just the portion above the threshold.

Is the Grok API cheaper than SuperGrok?

It depends on how you use Grok. SuperGrok is a flat monthly subscription for chatting with Grok directly, which tends to be cheaper for one person with steady, moderate use. The API has no monthly cap and bills every token, so grok api costs per model can run higher than a subscription for heavy personal chat use, but it is the only option for building an application other people will use.

What is the newest xAI model and how much does it cost?

Grok 4.6 is the newest flagship model, priced at $2.00 per 1 million input tokens and $6.00 per 1 million output tokens for prompts under 200,000 tokens, rising to $4.00 and $12.00 at the long-context rate.

Does the Grok API have rate limits based on how much you spend?

Yes. xAI scales rate limits with cumulative API spend rather than a fixed plan. The default tier for a new account allows 150 requests per second and 50 million tokens per minute on Grok 4.6 and Grok 4.5, rising to 500 requests per second and 100 million tokens per minute at the highest published tier.

Categorized in:

Guide,

Last Update: September 23, 2026