Grok API text models are billed per million tokens, from 1.25 US dollars input and 2.50 output on grok-4.3 up to 2.00 input and 6.00 output on grok-4.7, at standard short context rates. Cached input, very long requests, tool calls, and priority processing all change the total. These figures were read from the vendor page on 28 November 2026. Saraswati Stitch keeps a free calculator for modelling these costs before you choose a model.

Listed token prices

The rates below come from the official xAI pricing page, in US dollars per million tokens at short context.

ModelInputCached inputOutput
grok-4.72.000.506.00
grok-4.62.000.506.00
grok-4.52.000.306.00
grok-4.31.250.202.50

Vendors revise prices and retire models, so confirm the page before you commit a budget.

Charges that change the bill

Long context

Requests of 200,000 tokens or more move to a higher tier. On the higher priced models that means 4.00 input and 12.00 output, with a doubled cached rate. On grok-4.3 it becomes 2.50 input and 5.00 output. Sending a whole archive with each question can double your unit cost without improving the answer.

Tools

When the model searches or runs code, those calls are billed on top of tokens. The page lists web search and code execution at 5 US dollars per 1,000 calls. An agent decides how often to call tools, so costs rise with the difficulty of the question.

Batch and priority

The batch API discounts these models by 20 percent for work that can wait, with most jobs finishing within a day. Priority processing runs the other way, billing text requests at twice the standard rate for faster scheduling.

A worked monthly example

Suppose a support assistant handles 1,000 requests, each with 2,000 input tokens and 500 output tokens, which is 2 million input and 500,000 output tokens.

ModelInput costOutput costTotal
grok-4.74.003.007.00
grok-4.32.501.253.75
grok-4.3 in batch2.001.003.00

At 100,000 requests a month, multiply by one hundred: 700 US dollars on grok-4.7 against 375 on grok-4.3. That gap is wide enough to justify testing whether the cheaper model passes your quality checks.

Ways to spend less

Keep stable instructions at the start of each request so more input qualifies for the cached rate, which can cut input cost by a large margin. Trim conversation history rather than resending everything. Cap output length where a short answer is enough. Route routine requests to the cheaper model and send only the hard ones to the newer one. Set a monthly ceiling and alerts in the vendor console before launch, because an agent stuck retrying overnight can spend far more than you planned. Our guide on reducing AI API costs works through each lever.

Set a ceiling before launch

Decide the most you are willing to pay per month and per user before the feature goes live, not after the first invoice. Cap requests per visitor on anything public, set an alert in the vendor console at a figure that would worry you, and log token counts for every call so a rising bill can be traced to a cause. The costs that surprise teams are rarely the steady ones. They are the retry loop that runs overnight, the agent that calls a paid tool far more often than expected, or a sudden spike in traffic. A ceiling turns those from a nasty bill into a safe stop.

How caching changes the sum

Take the same 1,000 requests and suppose half of the input on grok-4.3 is served from cache. One million tokens are billed at 1.25 and one million at 0.20, so input falls from 2.50 to 1.45, while output stays at 1.25. The total drops from 3.75 to 2.70, a saving of about 28 percent with no change to the model or the answers. Caching rewards consistency, so a system prompt that includes the current time or a random identifier near the top changes on every call and almost nothing can be reused. Move anything that varies to the end of the request, then read the usage data in each response to confirm cached tokens are actually being counted.

Choosing a model by job

Pick the model by testing it on the task rather than by its version number. Classification, tagging, and short replies often run fine on the lower priced model, while multi step reasoning or long tool chains may justify the newer one. Run the same twenty examples through both, score the answers, and compare cost per accepted result. Estimate your volume with the Grok API cost calculator, or compare providers in the AI cost calculator, which uses a live feed that may differ from direct list prices.