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.
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 current OmniaKey catalog lists Grok 4.6 against the long-context tier at $3.20 input, $9.60 output, and $0.80 cached input per million tokens. That is an OmniaKey platform quote, not a new xAI price. Keep the two billing relationships separate when you plan a budget.
Prices and model details checked August 22, 2026. xAI's public API page identifies grok-4.6 as its newest flagship with a 500K context window and usage-based billing. The OmniaKey figures below come from the current model catalog and use an 80% price ratio on the long-context tier. Recheck both live pages 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 | OmniaKey current listed quote* |
|---|---|---|---|
| Input | $2.00 | $4.00 | $3.20 |
| Cache-read input | $0.50 | $1.00 | $0.80 |
| Output | $6.00 | $12.00 | $9.60 |
* The OmniaKey catalog currently uses the long-context tier for this model. It is a gateway rate and can change independently of xAI's direct account pricing.
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 owns the current OmniaKey quote, 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 contract terms. 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 boundary 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;
- OmniaKey's listed gateway price should be read from its own catalog, not inferred 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 boundary, 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 boundary, 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.
| Route | Calculation | Total |
|---|---|---|
| xAI standard | 0.1 × $2 + 0.02 × $6 | $0.32 |
| OmniaKey listed quote | 0.1 × $3.20 + 0.02 × $9.60 | $0.512 |
The OmniaKey number uses the catalog's current long-context quote even though this example is below 200K. Confirm the live gateway rate before treating it as a contract.
Example 2: repository-scale context
Assume 300,000 uncached input tokens and 40,000 output tokens. The prompt crosses the threshold.
| Route | Calculation | Total |
|---|---|---|
| xAI long-context | 0.3 × $4 + 0.04 × $12 | $1.68 |
| OmniaKey listed quote | 0.3 × $3.20 + 0.04 × $9.60 | $1.344 |
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.
| Route | Calculation | Total |
|---|---|---|
| xAI long-context cache read | 0.3 × $1 + 0.04 × $12 | $0.78 |
| OmniaKey listed quote | 0.3 × $0.80 + 0.04 × $9.60 | $0.624 |
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
xAI describes Grok 4.6 as its newest flagship for coding, long-running agents, tool calling, and interactive or visual work. The official API page lists:
- 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 documented capabilities, not an independent benchmark result. Tool reliability, latency, refusal behavior, and accepted-task cost still depend on the client, permissions, prompt, tools, and workload.
For a broader model-routing decision, read the coding-agent model guide. This article answers the narrower question of 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 | OmniAKey current quote* |
|---|---|---|
grok-4.6 | $4 / $1 / $12 | $3.20 / $0.80 / $9.60 |
grok-4.5 | $4 / $0.60 / $12 | $3.20 / $0.48 / $9.60 |
- The OmniAKey column applies the current 80% xAI ratio shown in the model catalog and can change independently. On token rates alone, the current distinction is cache-read pricing: Grok 4.5 is cheaper when the provider actually reports cache reads. 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, acceptance tests, 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 workload its own attribution and revocation path.
A practical sequence is:
- run one representative task with a known acceptance test;
- 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.
What does Grok 4.6 cost through OmniaKey?
The current catalog lists the long-context quote at $3.20 input, $0.80 cached input, and $9.60 output per million tokens. Verify the live model page before committing a budget because platform rates can change.
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.