← RouterPlex Blog
Model releases4 min read

Grok API Pricing: Every Model, Rate and the 200K Cliff

Grok API pricing: Grok 4.5 is $2 per 1M input and $6 per 1M output tokens, doubling above a 200K prompt. Full xAI rate table, cached input, and setup.

Grok 4.5 costs $2 per 1M input tokens and $6 per 1M output tokens, with cached input at $0.30 per 1M, over a 500K-token context window. The rate that catches people out: once a prompt reaches 200K tokens, the price doubles to $4 input and $12 output — and the higher rate applies to every token in that request, not just the ones past the threshold.

Grok models are OpenAI-compatible, so they can be called through any gateway that speaks /v1/chat/completions. On RouterPlex, grok-4.5 is billed at xAI list price with no markup.

Sources: xAI models and pricing and xAI pricing docs, checked July 30, 2026. Rates change; verify before committing to a volume estimate.

Grok API pricing, every text model #

All figures are USD per 1M tokens. The first row of each model is the standard rate for prompts under 200K tokens; the second is long-context pricing at or above 200K.

ModelContextInputCached inputOutput
grok-4.5500K$2.00$0.30$6.00
grok-4.5 (≥200K prompt)500K$4.00$0.60$12.00
grok-4.31M$1.25$0.20$2.50
grok-4.3 (≥200K prompt)1M$2.50$0.40$5.00
grok-4.20-0309-reasoning1M$1.25$0.20$2.50
grok-4.20-0309-non-reasoning1M$1.25$0.20$2.50
grok-4.20-multi-agent-03091M$1.25$0.20$2.50
grok-build-0.1256K$1.00$0.20$2.00
grok-build-0.1 (≥200K prompt)256K$2.00$0.40$4.00

Grok 4.5 is the flagship and the most expensive per token. Grok 4.3 and the Grok 4.20 variants sit at roughly 60% of the input price and 40% of the output price, over twice the context. Grok Build 0.1 is the cheapest published text rate.

The 200K cliff is the number that matters #

Most pricing tables present long-context pricing as a footnote. It deserves better, because it is not a marginal rate.

xAI's rule is explicit: *requests whose prompt reaches the listed token threshold are billed at the higher rate for all tokens in the request.* There is no blended calculation.

text
199,000-token prompt on grok-4.5 → 199,000 × $2.00/1M = $0.398
201,000-token prompt on grok-4.5 → 201,000 × $4.00/1M = $0.804

A 1% larger prompt costs 102% more. If you are running long-context agent loops that accumulate history, crossing 200K mid-session doubles the cost of every subsequent turn that carries the full transcript. Two practical consequences:

  • Trim before the threshold, not after. Compaction that fires at 250K tokens has already paid the penalty. Fire it at 180K.
  • Grok 4.3 is often the better long-context choice. At 1M context and $2.50/$5.00 even in its long-context tier, it is cheaper past 200K than Grok 4.5 is *below* 200K on output.

What a real workload costs #

Take a coding-agent turn with a 40K-token prompt and 2K tokens of output, well under the threshold:

ModelInput costOutput costTotal per turn1,000 turns
grok-4.5$0.080$0.012$0.092$92.00
grok-4.3$0.050$0.005$0.055$55.00
grok-build-0.1$0.040$0.004$0.044$44.00

Cached input changes this substantially for agents that resend a stable system prompt and file context. At $0.30 per 1M, a cache hit on Grok 4.5 input is 85% cheaper than a cache miss, which usually matters more than the choice between 4.5 and 4.3.

Calling Grok through an OpenAI-compatible endpoint #

Grok speaks the OpenAI chat-completions schema, so the only changes are the base URL, the key, and the model ID.

python
from openai import OpenAI
 
client = OpenAI(
base_url="https://api.routerplex.com/v1",
api_key="YOUR_ROUTERPLEX_KEY",
)
 
response = client.chat.completions.create(
model="grok-4.5",
messages=[{"role": "user", "content": "Summarise this changelog."}],
)
print(response.choices[0].message.content)

The same key reaches every other model in the catalog, so switching from grok-4.5 to claude-opus-5 or kimi-k3 is a one-string change with no new account, no second balance, and no separate invoice.

Subscriptions are not API credit #

Grok's consumer plans and the developer API are separate products on separate billing. A SuperGrok subscription does not produce API credit, and API spend is not covered by a monthly plan. If your goal is programmatic access, price the API per token and ignore the subscription tiers entirely — see xAI's pricing page for current consumer plans.

Capping Grok spend #

Per-token billing on a long-context model is exactly the shape of bill that surprises people, and the 200K cliff makes it worse. On RouterPlex every API key carries its own hard lifetime budget, enforced server-side: a key with a $20 budget stops at $20 whether the overrun came from a runaway agent loop, a leaked key, or a prompt that quietly crossed 200K tokens. The balance is prepaid and cannot go negative.

Compare the live Grok 4.5 rate against the rest of the model catalog, or start with a $5 top-up.

Frequently asked questions

How much does the Grok API cost?

xAI lists Grok 4.5 at $2 per 1M input tokens and $6 per 1M output tokens for prompts under 200K tokens, with cached input at $0.30 per 1M. Prompts at or above 200K tokens are billed at $4 input and $12 output per 1M.

What is the cheapest Grok model on the API?

Grok Build 0.1 is the lowest published rate at $1.00 per 1M input and $2.00 per 1M output tokens under 200K, with a 256K context window. Grok 4.3 is $1.25 input and $2.50 output over a 1M-token context.

Why did my Grok bill double on a long request?

xAI uses long-context pricing. When a prompt reaches the 200K-token threshold, the higher rate applies to every token in that request, not just the tokens past the threshold. A 201K-token prompt on Grok 4.5 is billed entirely at $4/$12, not $2/$6.

What is the Grok 4.5 context window?

Grok 4.5 has a 500K-token context window. Grok 4.3 and the Grok 4.20 variants carry 1M tokens, and Grok Build 0.1 carries 256K.

Is Grok API pricing the same as a SuperGrok subscription?

No. The consumer Grok plans and the developer API are billed separately. Paying for a Grok subscription does not grant API credit, and API usage is charged per token.

Can I use Grok without an xAI account?

Yes. Any gateway exposing an OpenAI-compatible endpoint can route Grok requests. On RouterPlex, grok-4.5 is callable at xAI list price from the same prepaid balance and key as GPT, Claude, Gemini and the rest of the catalog.

Run the smallest paid test.

Add $5, cap the key, and verify the result with your own workload.

Related reading