There is no plan to subscribe to: the xAI API is pay-as-you-go, and xAI bills per million tokens used.
The listed rate per million is only one input to your invoice, whether you call the API directly or from an automation tool like Activepieces that runs it on a schedule. Grok is cheapest only when you measure the rest.
Per-token pricing and the sticker rate
What the xAI API is and how it is billed
When you call Grok models, such as Grok 4.7, from your own code, you are using the xAI API, the developer platform. The metered unit is the token, counted separately for what you send and what the model returns.
Grok is cheapest only when you measure the rest.
The rate card hides four drivers that each move the bill without changing the sticker price:
- xAI bills output and reasoning tokens for what the model generates, so a long answer or a long chain of thought costs more than the same prompt with a short reply.
- Cached input is repeated prompt content that xAI prices differently from fresh input, so a stable prompt prefix lowers the bill and a shifting one forfeits the saving.
- Tool calls can carry their own charges on top of tokens.
- Rate-limit tiers cap how much you can send, so your tier decides whether you can run the volume you priced.
Why the API is not the same as SuperGrok
SuperGrok is a consumer subscription for using Grok in its apps. The API is a separate developer account billed by usage.
When Grok API pricing was last verified
As of 2026-11-04, the figures here follow the xAI documentation. Rates, caching rules and tier limits can change after that date, so confirm them in your xAI console before you commit a budget.
If you are running this arithmetic for your own team, see what the same workload costs on Activepieces.
Current Grok API prices and limits
Where xAI's pricing page didn't show a figure, the cell below says "not shown on page" rather than carrying a guess.
Text and reasoning models
| Model | Input per 1M | Cached input per 1M | Output per 1M | Context window | Rate limits | Features |
|---|---|---|---|---|---|---|
| grok-4.7, short context | not shown on page | not shown on page | not shown on page | not shown on page | By spend tier, below | Code, chat, agentic tool calling |
| grok-4.7, long context | not shown on page | not shown on page | not shown on page | not shown on page | By spend tier, below | Code, chat, agentic tool calling |
| grok-4.3 | not shown on page | not shown on page | not shown on page | not shown on page | By spend tier, below | not shown on page |
Prices and plan limits checked against docs.claude.com and claude.com and openai.com and gemini.google on November 4, 2026.
Grok image, video and voice API pricing
Grok Imagine Image 2.0 is priced at $0.01 per image of media input and $0.04 per image of output (1K · Low), while Grok Imagine Video 1.5 and the Grok Voice API are separate endpoints.
Grok API tool, search and batch charges
If your agent calls tools heavily, there is a cost line this table can't show. xAI meters tool calls and search per call, not per token, and I have no confirmed per-call figures.
Grok API rate-limit tiers and spend thresholds
On the rate-limit page, capacity is tied to cumulative spend. According to xAI, Tier 0 allows 10 M tokens per minute, and Tier 1 ($50) shows 5 M, so the first $50 buys no extra headroom on that chart.

Tier 2 ($250) returns to 10 M.
Further up the chart, Tier 3 ($1,000) allows 20 M and Tier 4 ($5,000) allows 40 M, with a Tier 4 cap of 85 M, so roughly two maximum-allocation customers would use up the available Tier 4 capacity.
What Grok costs at three realistic monthly workloads
On the same grok-4.7 rate card, three workloads produce very different bills because the token mix, not the volume, sets the price.
| Workload | Monthly tokens | Input / output / reasoning mix | Cache hit rate | Monthly total at grok-4.7 rates |
|---|---|---|---|---|
| Support bot | Steady, high volume | Input-heavy, short replies, little reasoning | High | Cached input + fresh input + output |
| Document summarisation | Bursty, tied to batch size | Large input, compact output, minimal reasoning | Low | Mostly fresh input, plus a small output line |
| Heavy agentic workload | Highest per task | Output and reasoning rise with every tool step | Moderate | Output + reasoning + repeated context |
Support bot at 5 million tokens a day
Over a 30-day month that is 150 million tokens, and most of it is the same system prompt and policy text resent on every turn. A high cache hit rate therefore does more to your bill than any change in reply length.
Grok cost for summarising 50,000 pages monthly
There is almost nothing to cache, because each page is read once, so the input bucket is billed at the full uncached rate. Your lever here is prompt length and summary length, not cache tuning.
Agentic workload with long contexts and tool calls
With every tool call, a growing context is re-sent and reasoning tokens are added, so output and reasoning grow with each step. Measure tokens per completed task, because a single failed retry multiplies the whole chain.

Hidden costs and limits in Grok API
Reasoning tokens counted as output
Behind a short visible answer there can be a long invisible bill: a reasoning model's hidden thinking is metered as output, the dearer side of the price list. A retried task pays for that thinking twice.

Long-context and tool-call surcharges
Past 200k tokens of context, the output price doubles, so one oversized prompt can cost more than many ordinary ones. Search and tool invocations are metered per call on top of tokens. Uncached repeats of the same prefix are billed at the full input rate.
Priority and regional billing modes
On xAI's pricing page, a workload costing $300 a month at standard rates costs $330 on the US regional endpoint at 1.1x, a 10% premium for data residency.
Priority at 2x brings it to $600, so you pay an extra $300 a month for speed.
Grok API rate limits by spend tier
Per xAI's rate-limit documentation, Tier 0 needs $0, Tier 1 needs $50, Tier 2 $250, Tier 3 $1,000 and Tier 4 $5,000 in cumulative spend.
A new project starts at the lowest ceiling, so a launch can be throttled before the budget is touched. Nothing caps spend at the top, so set your own limit.
Model retirements and price changes
When a model is deprecated or prices move, a cost model built on its rates goes stale. Re-measure tokens per completed task after every migration, because a replacement model may reason longer and bill more output for the same job.
Worth checking against a plan that does not meter every step: one credit covers a whole run on Activepieces.
The case for Grok's lowest cost
Where Grok's low cost holds up
On the price list, Grok looks cheapest, and the case only holds while output and reasoning tokens stay small relative to the work.
Because a prototype sends short prompts and reads short answers, its token costs stay small whatever the per-million rates are.
Its large context windows let you send a whole document without building a chunking pipeline. It accepts requests from the OpenAI SDK, so migrating means changing a base URL and a key rather than rewriting client code.
Where Grok's cost advantage breaks down
None of those advantages touches output, the meter that grows fastest on agentic and reasoning-heavy jobs.
A model that reasons at length bills those thinking tokens at the output rate, so a cheap rate multiplied by a large count can still be an expensive task.
What the Grok cost comparison chart shows
GLM-5.3-Flash spent 103k reasoning tokens on a task and still finished cheaper.
Before you accept "Grok is cheaper," run your own tasks through both models and divide the total bill by the number of tasks that finished correctly.
Grok versus OpenAI, Anthropic and Google on cost
At its Xhigh reasoning setting, Grok cost $5,905 to run one benchmark index, more than double Claude Opus 5.5 High at $2,716. So it isn't cheaper across the board, and that rules out Grok's Xhigh for cost-sensitive reasoning work.
Price table of the four vendors
The variable that decides your bill is the output-to-input ratio: output price divided by input price. A workload that reads a lot and writes little rewards cheap input and caching. One that reasons at length is billed almost entirely at the output rate.
Cost to run the same benchmark
Artificial Analysis ran one index across models. The spread shows what reasoning tokens do to a bill, whatever the sticker price says.
| Vendor | Model | Cost to run the index |
|---|---|---|
| OpenAI | GPT-6.1 Terra | $267 |
| Anthropic | Claude Opus 5.5 High | $2,716 |
| OpenAI | GPT-6 Astra Max | $5,661 |
| xAI | Grok 4.7 Xhigh | $5,905 |
| Gemini 4 Argon | $6,103 | |
| Gemini 4 Carbon | $8,240 |
At $267, Terra costs about a tenth of Opus, so a vendor's efficient tier can beat another vendor's flagship by an order of magnitude.
Cheapest model for each Grok workload
For high-volume, short-output work, start with the efficient tiers such as Terra.
For long reasoning, compare total bills, not rates, because Opus 5.5 High undercut Grok 4.7 Xhigh on this index. Grok wins only where your own tasks show a low ratio and a correct finish.
Five steps before committing Grok spend
Five steps, in this order:
- Run 100 real prompts and record input, output and reasoning tokens per task.
- Price those totals at the table rates for the Grok model you plan to use, such as Grok 4.7.
- Set a spend limit in the console.
- Structure prompts with a stable prefix so cached input applies.
- Recheck pricing monthly.
Measure tokens per task first
Log every token type for each prompt and mark whether the answer was correct.
Divide total spend by correct finishes, not by calls, because retries are billed too.
Keep the system prompt, tool definitions and fixed documents at the front and the changing text at the end. Repeated input can then be cached, and you'll see how much of your volume the cheaper cached rate covers.

Set a Grok API spend cap and alerts
Set the console limit before the test, not after. With per-token billing there's no plan ceiling, so a looping agent keeps charging until something stops it.
Put an alert below the cap so you can look before the cap cuts service.
Route calls through a workflow if Grok is one of several models
If Grok is one model among several, make the xAI API call a single step in a workflow tool, with a fallback model for errors and rate-limit responses. A tier limit then slows one step instead of halting the pipeline.
What Activepieces does about this
The practical problem in this article is that one Grok call is rarely the whole job.
A task that retries, reasons and calls tools is where the invoice drifts from the rate card, and the place to see that drift is a workflow, not a single request.
Activepieces is an automation platform where the xAI API call can be one step among many. You can log token counts at that step, branch on the result, and send a fallback to another model when Grok returns an error or a rate-limit response.
That fits the measurement the article asks for. Put the call in a flow, write input, output and reasoning tokens to a sheet or database on every run, and mark whether the answer passed a check.
After a hundred runs you have tokens per correct task from your own traffic, which is the number the sticker price can't give you.
A looping agent can also be stopped inside the flow, with a counter or a spend check that halts the run before the console cap does.
Pricing follows the same logic.
Activepieces counts the run, not the steps inside it: 1 credit per flow run, where Zapier bills per task and Make per module, so a flow that splits an agent chain into small, cleanly retried steps doesn't multiply the workflow bill.
AI steps add credits by model tier, so check that line before you budget. The platform's own meter stays predictable while xAI's token meter does the varying.
On openness, the Community Edition is MIT-licensed and can be self-hosted, so the flow that holds your model names, retries and fallbacks sits in infrastructure you control. MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces in production.
Swapping a model then means editing one step, not hunting for hardcoded names across services.
Frequently asked questions
Is the xAI API free to use?
No. The API is metered per token, so every request is billed by what you send, what the model returns, and any reasoning it does along the way.
Budget from measured usage, not from the sticker price, because output and reasoning tokens usually decide the invoice.
Does SuperGrok include API credits?
No. SuperGrok is a consumer subscription for using Grok in the apps, and the API is billed separately by token. Paying for one doesn't lower or cover the other, so a team that wants both should expect two line items and track them separately.
Is there a Grok API free tier or promotional credit?
Sometimes, but treat it as a bonus, not a plan. xAI has offered promotional credits at various points, and the terms can change or attach conditions.
Check your console for what your account actually holds. Don't build a cost forecast on credits you haven't seen there, because the forecast breaks the day they run out.
How often does xAI change its prices?
There's no schedule you can rely on. Prices, model availability and rate-limit tiers can shift as new models like Grok 4.7 arrive, and older ones can be retired.
That's why the monthly recheck matters: rerun your own token mix against the current pricing page and compare the result to your last run.
Can I use the OpenAI SDK with the xAI API?
Yes. The xAI API accepts requests in the same shape as OpenAI's, so you point the SDK's base URL at xAI's endpoint, swap in your xAI key, and set the model name.
The practical consequence is a small migration, usually one configuration change. You still need to retest output length and reasoning behavior, since those drive cost more than the client library does.
Related reading
References
Running the numbers
See what the same workload costs here.
Free forever plan, and every paid plan self-hosts at no extra cost.
See pricing Talk to sales


