Grok API pricing: every model, every rate
xAI ships fewer models than its competitors but revises them often. Below is the currently billable set.
grok-4.7. Rates checked 2026-11-01.Full rate card
33 billable models in total, 30 of them text models. On those text models: 0 of 30 carry a rate verified against xAI's own published pricing, the remaining 30 are gateway rates only. USD per 1M tokens, checked 2026-11-01.
| Model | Input | Output | Out/In | Official (in / out) |
|---|---|---|---|---|
grok-2-vision-1212 | $2.5 | $12.5 | 5.0× | not verified |
grok-2 | $1.5 | $7.5 | 5.0× | not verified |
grok-2-1212 | $1.5 | $1.5 | 1.0× | not verified |
grok-3 | $1.5 | $7.5 | 5.0× | not verified |
grok-4 | $1.5 | $7.5 | 5.0× | not verified |
grok-4-0709 | $1.5 | $7.5 | 5.0× | not verified |
grok-4-deepsearch | $1.5 | $7.5 | 5.0× | not verified |
grok-4.2 | $1.5 | $7.5 | 5.0× | not verified |
grok-2-imageGen | $1 | — | not verified | |
grok-2-search | $1 | — | not verified | |
grok-3-deepersearch | $1 | $3 | 3.0× | not verified |
grok-3-deepsearch | $1 | $5 | 5.0× | not verified |
grok-3-reasoner | $1 | $5 | 5.0× | not verified |
grok-3-reasoning | $1 | $5 | 5.0× | not verified |
grok-3-search | $1 | $5 | 5.0× | not verified |
grok-4.1 | $1 | $5 | 5.0× | not verified |
grok-4.1-thinking | $1 | $5 | 5.0× | not verified |
grok-4.5 | $1 | $3 | 3.0× | not verified |
grok-4.6 | $1 | $3 | 3.0× | not verified |
grok-4.7 | $1 | $3 | 3.0× | not verified |
grok-4-20-non-reasoning | $0.625 | $1.25 | 2.0× | not verified |
grok-4-20-reasoning | $0.625 | $1.25 | 2.0× | not verified |
grok-4.3 | $0.625 | $1.25 | 2.0× | not verified |
grok-build-0.1 | $0.5 | $1 | 2.0× | not verified |
grok-4.1-fast | $0.2 | $1.5 | 7.5× | not verified |
grok-4.2-fast | $0.2 | $1.5 | 7.5× | not verified |
grok-code-fast-1 | $0.2 | $1.5 | 7.5× | not verified |
grok-3-mini | $0.15 | $0.2505 | 1.7× | not verified |
grok-4-1-fast-non-reasoning | $0.1 | $0.25 | 2.5× | not verified |
grok-4-1-fast-reasoning | $0.1 | $0.25 | 2.5× | not verified |
grok-4-fast | $0.1 | $0.25 | 2.5× | not verified |
grok-4-fast-non-reasoning | $0.1 | $0.25 | 2.5× | not verified |
grok-4-fast-reasoning | $0.1 | $0.25 | 2.5× | not verified |
On xAI the Out/In column runs 1.7× to 7.5×, median 5.0×, it outweighs the input price as soon as output dominates your bill.
Across 30 priced text models the blended rate spans $0.35 (grok-4-1-fast-non-reasoning) to $9 (grok-4.2) per 1M tokens (a 26× spread). At 26× between its own cheapest and dearest, picking the wrong tier inside xAI costs more than picking the wrong vendor.
How these rates were verified
xAI publishes no USD rate card we could confirm against, so none of the 33 prices above is cross-checked with vendor documentation — every figure is a gateway rate read from the live rate config on 2026-11-01. That is the reason no discount percentage appears anywhere on this page: without a published list to compare against, a "saving" would be a number we made up. Read these as an observed snapshot of what the endpoint charges today, and treat the reason to route xAI through one endpoint as access and consolidated billing rather than a discount.
What xAI costs at three usage levels
Priced on grok-4.7 at $1 in / $3 out per 1M tokens, with a 5:1 input-to-output ratio, roughly what an
interactive workload produces.
| Usage level | Tokens per month (in / out) | Monthly cost grok-4.7 |
|---|---|---|
| Light pilot or side project | 5M / 1M | $8.00 |
| Working one product in production | 50M / 10M | $80.00 |
| Heavy high-volume pipeline | 500M / 100M | $800.00 |
This is the model we cover in depth for this vendor. Swap in your own token split in the calculator.
Same budget, other vendors
3 models from 3 other vendors priced within
35% of grok-4.7 on a blended rate (the cheapest, the dearest and one
in between). This is the horizontal check a xAI rate page on its own cannot give you.
| Model | Vendor | In / out per 1M | vs this |
|---|---|---|---|
gpt-5.4-mini | OpenAI | $0.375 / $2.25 | −34.4% |
doubao-lite-128k | ByteDance | $2 / $2 | same |
hunyuan-code | Tencent | $1.75 / $3.5 | +31.2% |
Blended comparison (input + output per 1M tokens). Price is one axis, none of these is a xAI model, so treat them as candidates to test side by side at this budget rather than drop-in substitutes.
Why the output rate decides the bill
Across the 28 priced xAI text models, the output rate runs from 1.7× to 7.5× the input rate, with a median of 5.0×. On xAI that multiple lands on the smaller half of the token count and the larger half of the bill, because output is what a chat or agent turn actually produces.
Worked out: at a 5.0× multiple, a job whose token count is 80% input still spends 56% of its cost on the output it generates. Setting xAI beside any other vendor on the input rate alone hides that.
What xAI is good at
Grok is competitive on real-time and search-adjacent workloads.
Detailed pages for xAI models
The models we cover in depth, each with worked cost at three usage levels and a comparison against similarly priced alternatives.
Routing these rates into your tools
Every model above is reachable from the same OpenAI-compatible endpoint, so the rates on this page apply wherever you already work. These are the tools we have profiled end to end — xAI models included:
| Tool | What to set |
|---|---|
| LangChain | one base_url kwarg — then check whether token usage still comes back |
| LlamaIndex | OpenAILike for gateway IDs, and a second object for the embedding model |
| AutoGen | declare function_calling or tool use fails silently |
| OpenAI Agents SDK | tracing exports to OpenAI by default; the default transport is Responses |
| Codex CLI | 0.122+ rejects wire_api = "chat" at config load |
| Gemini CLI | a model without tool calls replies in prose and never touches the repo |
| CrewAI | custom_openai=True, and cost is agents × turns |
| DSPy | the bill is in compile(), not in inference |
| Cursor | override the base URL and bill your own key |
| LiteLLM model names | the slash is a routing instruction — openai/, or nothing is sent |
| streaming calls | stream_options, or every token count comes back null |
| an empty model picker | read /v1/models and type the id by hand |
| long sessions | two caps, not one — the window and the maximum output |
| every tool we have profiled | the full matrix of what to set and where |
Every one of these takes the same two values (a base URL and a key) and none of them require changing your code beyond where the client is constructed. Pointed at xAI, that is the whole change. The differences that matter are in each tool's defaults, which is what each guide covers.
Other vendors
Every rate card here is built the same way, from the same price snapshot (2026-11-01), so the numbers are comparable across vendors:
Anthropic · OpenAI · Google · DeepSeek · Alibaba · Zhipu · Moonshot · Meta · MiniMax · ByteDance
FAQ
How much does xAI charge per million tokens?
Across the 30 priced text models in this catalogue, the blended rate (input plus output per 1M tokens) runs from $0.35 on grok-4-1-fast-non-reasoning to $9 on grok-4.2, as of 2026-11-01. That 26× spread is what matters: inside xAI alone, picking the wrong tier moves the bill further than switching to another vendor would.
What is the cheapest xAI model for high-volume work?
grok-4-1-fast-non-reasoning is the lowest blended rate here at $0.1 input and $0.25 output per 1M tokens. On a Heavy workload (500M input and 100M output tokens a month) that bills about $75.00. At the other end, the same workload on grok-4.2 costs about $1,500.00.
Is xAI cheaper through a gateway than buying direct?
We do not claim a discount on xAI. None of its 30 text models has a list price published in a stable machine-readable form, so all 30 figures on this page are gateway rates with nothing official to compare them against. Check the xAI number in your own dashboard before committing to a budget.
How does output pricing change a xAI bill?
On xAI output is billed at 1.7× to 7.5× the input rate, median 5.0×, so the input rate alone never predicts the bill. At 5.0× even a workload that is 80% input by token count lands most of its cost on the output column. Price your own split against grok-4.7's $1 input rate in the calculator rather than extrapolating from that headline.
What is the xAI API price per 1M tokens?
xAI quotes every model separately for input and output. grok-4.7, the one closest to this vendor's median rate, is $1 per 1M input and $3 per 1M output as of 2026-11-01. The lowest tier in this catalogue is grok-4-1-fast-non-reasoning, at $0.1 in and $0.25 out.
How much does xAI cost for a coding agent?
A heavy agent month — 500M input and 100M output tokens, the shape a coding assistant really produces because every turn resends the whole context (bills about $800).00 on grok-4.7. Output decides most of that figure: on xAI the median model bills output at 5.0× its input rate, so extrapolating from the headline input rate understates the bill by close to that factor.
Does Grok have a cheap tier for high-volume traffic?
Yes, the fast, non-reasoning variants are the low-cost entry into the family and sit in the sub-$1 blended band. The reasoning tiers multiply both rates, so they are worth reserving for the calls that actually need them.
See all 38 models → or use the cost calculator with your own token split.