Grok 4.6 API Pricing
xAI lists Grok 4.6 at $2 input and $6 output per million tokens below the long-context threshold, then doubles those rates for prompts above 200K tokens.
On this page
- Grok 4.6 API pricing at a glance
- What changes after 200K prompt tokens
- Three reproducible cost examples
- Example 1: ordinary coding request
- Example 2: repository-scale context
- Example 3: repeated cached context
- Cache reads are not the same as a free prompt
- What Grok 4.6 is designed to do
- Grok 4.6 versus Grok 4.5 for cost planning
- Call Grok 4.6 through an OpenAI-compatible route
- Budget controls for coding agents
- Common Grok 4.6 pricing mistakes
- Treating 500K context as free usage
- Applying the $2 input rate to a 300K prompt
- Assuming the gateway copies xAI's tier switch
- Counting every repeated prefix as a cache hit
- Comparing models by token price alone
- Putting a real API key in a repository or prompt
- Frequently asked questions
- How much does the Grok 4.6 API cost?
- What is the Grok 4.6 API model ID?
- Does Grok 4.6 have a 500K free allowance?
- Is Grok 4.6 always cheaper than Claude or GPT?
- Can I use Grok 4.6 in a coding agent?
- Sources checked
Updated October 30, 2026: the price tables now show xAI's official rates only.
Grok 4.6 API pricing has two prompt-length tiers. xAI lists $2 per million input tokens and $6 per million output tokens when the prompt stays at or below 200K tokens. When a prompt exceeds 200K tokens, the request uses $4 input and $12 output per million tokens. xAI also lists cache-read rates of $0.50 and $1.00 per million tokens for those two tiers.
The Grok 4.6 model page shows the current price through OmniaKey.
SpaceXAI has since released Grok 4.7. Read our Grok 4.7 review for current benchmarks and the upgrade decision; below is the detailed Grok 4.6 budget reference.
Prices and model details checked August 22, 2026. At that time, xAI's public API page identified grok-4.6 as its newest flagship with a 500K context window and usage-based billing. Recheck the live xAI page before a production purchase.
Grok 4.6 API pricing at a glance
All values are USD per one million tokens. The long-context tier applies to a request whose prompt exceeds 200K tokens; it is not a free allowance for the first 200K.
| Usage | xAI prompt at or below 200K | xAI prompt above 200K |
|---|---|---|
| Input | $2.00 | $4.00 |
| Cache-read input | $0.50 | $1.00 |
| Output | $6.00 | $12.00 |
The general calculation is:
cost = uncached_input_millions × input_rate
+ cached_input_millions × cache_read_rate
+ output_millions × output_rate
The Grok 4.6 model page shows the current price, model ID, context window, capabilities, and request reference. Use the live model catalog before copying a price into a production spreadsheet.
This table covers model-token charges only. It does not include taxes, currency conversion, separate file or tool charges, image-generation or voice/video endpoints, or enterprise pricing terms. Voice has its own model and rate; see Grok Voice 3.0 pricing. The current xAI model metadata lists no Batch discount for Grok 4.6, so do not assume that moving a job to Batch automatically lowers this model's token rates.
What changes after 200K prompt tokens
The threshold is evaluated on the prompt sent to the model. It is not the same as the model's 500K maximum context window, and it is not an account-level monthly quota.
For a request under the threshold, xAI's standard prices apply to the relevant input and output usage. Once the prompt crosses the long-context threshold, xAI's higher rates apply to the request. A large repository, tool schema, conversation history, or image-related text can push an agent request over the threshold even when the final answer is short.
The practical consequences are:
- a 500K context window describes capacity, not included tokens;
- repeating a large repository prefix can cross the threshold on every turn;
- output is billed separately, so long reasoning and patch retries still matter;
- a cache hit lowers the input line item but does not make output free;
- the price through OmniaKey comes from its own model page, not from xAI's tier switch.
If your client exposes token counts, log the prompt size before the request and compare it with the provider's reported usage afterward. Do not classify a request from character count or file size alone.
At the threshold, read the published tiers as follows:
| Prompt size | xAI tier | Input / cache-read / output |
|---|---|---|
| Exactly 200,000 tokens | Standard | $2 / $0.50 / $6 per 1M |
| 200,001 to 500,000 tokens | Long-context | $4 / $1 / $12 per 1M |
| Above the listed 500K prompt cap | Not supported by this model metadata | Check the current model page |
The 500K figure is a maximum prompt length in the current model metadata, not a promise that a 500K prompt can also produce an unrestricted response. For a request near either limit, use the provider-reported token fields and the final invoice rather than a character-count estimate.
Three reproducible cost examples
These examples use xAI's published rates and exclude taxes, currency conversion, separate media charges, and future rate changes.
Example 1: ordinary coding request
Assume 100,000 uncached input tokens and 20,000 output tokens. The prompt remains below 200K.
| Provider | Calculation | Total |
|---|---|---|
| xAI standard | 0.1 × $2 + 0.02 × $6 | $0.32 |
Example 2: repository-scale context
Assume 300,000 uncached input tokens and 40,000 output tokens. The prompt crosses the threshold.
| Provider | Calculation | Total |
|---|---|---|
| xAI long-context | 0.3 × $4 + 0.04 × $12 | $1.68 |
The long-context tier makes the same model materially more expensive than a small prompt. Before trimming quality, remove duplicated tool output, stale conversation turns, and unrelated files.
Example 3: repeated cached context
Assume 300,000 tokens are reported as cache reads and the response contains 40,000 output tokens.
| Provider | Calculation | Total |
|---|---|---|
| xAI long-context cache read | 0.3 × $1 + 0.04 × $12 | $0.78 |
This only applies when the provider reports those tokens as cache reads. Repeating similar text, or changing an earlier prefix, can produce a cache miss.
Cache reads are not the same as a free prompt
xAI's cache rate is a lower price for eligible repeated input. It does not turn the context window into a subscription allowance. The client and provider decide whether a prefix is reused, and the billing record is the source of truth.
For a coding agent, stable system instructions, tool definitions, repository rules, and a fixed project preamble are good candidates for a reusable prefix. Put changing task details after the stable section when the client lets you control request order.
Measure these fields separately when they are available:
- uncached input tokens;
- cached input tokens;
- output tokens, including reasoning where the API reports it;
- retries and failed tool turns;
- the final accepted-task result.
A cache strategy that saves input money but causes stale instructions or extra retries can still increase the cost of a completed task.
What Grok 4.6 is designed to do
In the August 22 documentation snapshot, xAI described Grok 4.6 as its flagship for coding, long-running agents, tool calling, and interactive or visual work. The official API page listed:
- model ID
grok-4.6; - a 500K context window;
- vision and structured tool use;
- OpenAI-compatible and xAI-native integration paths;
- usage-based billing, with prepaid credits and enterprise invoicing options.
Those are capabilities xAI lists, not an independent benchmark result. Tool reliability, latency, refusal behavior, and accepted-task cost still depend on the client, permissions, prompt, tools, and your tasks.
For a broader choice of coding model, read the coding-agent model guide. The narrower question below is how to budget a Grok 4.6 API request.
Grok 4.6 versus Grok 4.5 for cost planning
Both model IDs are present in the OmniaKey catalog and both expose a 500K context label. The current long-context comparison is:
| Model | xAI input / cache-read / output |
|---|---|
grok-4.6 | $4 / $1 / $12 |
grok-4.5 | $4 / $0.60 / $12 |
On token rates alone, the current distinction is cache-read pricing: Grok 4.5 is cheaper when the provider actually reports cache reads. The Grok 4.6 model page shows the current price. Do not assume that a lower cache rate means a lower cost per accepted task; compare the exact model ID, behavior, retries, and live catalog rate.
For a controlled comparison, keep the repository revision, system prompt, tool permissions, the tests that define success, and maximum output constant. Record:
- requested and returned model IDs;
- prompt, cache, and output tokens;
- latency and retry count;
- whether the task passed its tests without manual repair;
- final billed amount.
The useful metric is cost per accepted task, not cost per million tokens in isolation:
accepted-task cost = successful-run charges
+ failed reruns
+ human correction time
+ remediation risk
Call Grok 4.6 through an OpenAI-compatible route
Create a scoped key in the API keys dashboard, confirm that grok-4.6 is available in the live catalog, and call the OpenAI-compatible endpoint:
curl https://api.omniakey.com/v1/chat/completions \
-H "Authorization: Bearer $OMNIAKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.6",
"messages": [{"role": "user", "content": "Review this deployment plan for hidden failure modes."}],
"stream": true
}'
Use the exact model ID. The API quick start documents the endpoint and authentication pattern. After a representative task, review the usage dashboard and compare the token fields with your client-side estimate.
Budget controls for coding agents
Use a small, scoped key for local experiments, another for CI, and a separate one for shared automation. This gives each set of tasks its own attribution and revocation path.
A practical sequence is:
- run one representative task with a test you already trust;
- record prompt, cache, output, retries, and total cost;
- remove stale context and unbounded tool output;
- set a key limit above normal task variance;
- alert on repeated failures or an unexpected model ID;
- review accepted-task cost before increasing the limit.
The transparent billing guide explains how to reconcile model identity, token counts, and gateway charges. A spending limit reduces exposure; it does not reduce token consumption by itself.
Common Grok 4.6 pricing mistakes
Treating 500K context as free usage
It is a maximum request capacity. Tokens placed in that context are still billed.
Applying the $2 input rate to a 300K prompt
The prompt has crossed the long-context threshold, so use the higher xAI tier.
Assuming the gateway copies xAI's tier switch
OmniaKey has its own catalog and billing relationship. Read its live quote instead of applying xAI's direct-account table to a gateway balance.
Counting every repeated prefix as a cache hit
Only provider-reported cache reads receive the lower rate.
Comparing models by token price alone
Retries, latency, tool failures, and human repair can dominate a completed coding task.
Putting a real API key in a repository or prompt
Use an environment variable, a scoped key, and the dashboard for rotation. Never paste the real value into an issue, benchmark log, or article example.
Frequently asked questions
How much does the Grok 4.6 API cost?
xAI lists $2 input and $6 output per million tokens for prompts at or below 200K, and $4 input and $12 output when the prompt exceeds 200K. Cache-read rates are $0.50 and $1.00 respectively.
What is the Grok 4.6 API model ID?
Use grok-4.6. Pinning the exact ID makes budgets and task comparisons reproducible.
Does Grok 4.6 have a 500K free allowance?
No. 500K is the context capacity. Input, cache reads, and output remain metered.
Is Grok 4.6 always cheaper than Claude or GPT?
No. Compare the exact model, prompt tier, cache behavior, retries, and accepted-task cost. The provider pricing comparison covers the broader cost framework.
Can I use Grok 4.6 in a coding agent?
Yes, when the client supports the required OpenAI-compatible or xAI-native protocol and the active catalog exposes grok-4.6. Verify the exact client configuration and model ID before a production run.
Sources checked
- xAI API overview and pricing
- xAI developer pricing documentation
- xAI developer model documentation
- xAI developer quickstart
- OmniaKey Grok 4.6 model page
- OmniaKey API quick start
Fact-checked August 22, 2026. xAI rates, cache terms, context thresholds, gateway availability, and platform quotes can change. Verify the first-party documentation and live OmniaKey catalog before committing a production budget.
Models in this article
Related articles
Grok 4.7 Review
Grok 4.7 is a credible same-price upgrade over 4.6 for long coding and knowledge-work agents, but xAI's launch scores are not a substitute for a matched workload test.
Grok 4.8 Release Date: Preview and API Status
Musk said on November 17 that a soft rollout had reached some Bot users, with another week or two of polish before general release, while xAI's model docs, release notes and price list still carry no Grok 4.8 entry.
Grok Imagine 2.0 Prompt Guide: Structure, Examples and Real Images
Eight recipes with real images: what Grok Imagine 2.0 followed, what it added and how to steer it.
