AI API PricesxAI (Grok) › Grok 4 Fast

Grok 4 Fast pricing

Grok 4 Fast API cost from xAI (Grok) — $0.200 per 1M input tokens and $0.500 per 1M output tokens. 2M context. Estimate your real monthly bill below, then compare it against every other model.

Input price
$0.200
per 1M input tokens
Output price
$0.500
per 1M output tokens
Context window
2M
tokens per request
Reference call
$0.0007
1K in + 1K out

Fast / cheap 2M context · all prices USD per 1M tokens, list price last verified 2026-06-27.

Grok 4 Fast capabilities & limits

Representative specs for this tier — confirm exact limits in the xAI (Grok) docs.

Context window2M
Max output16K
Knowledge cutoffAug 2025
API formatOpenAI-compatible
✓ Vision✓ Tools / functions✓ JSON / structured

API acting up? Check live xAI (Grok) status → · all AI API status

Call Grok 4 Fast from your code

The exact model string and endpoint to use. Works with the OpenAI SDK — just point base_url at the URL below.

Model stringgrok-4-fast
Base URLhttps://api.x.ai/v1
API key envXAI_API_KEY
curl https://api.x.ai/v1/chat/completions \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4-fast",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Model strings follow each provider's naming convention; confirm the current id in the xAI (Grok) docs before relying on it.

What a Grok 4 Fast API call actually costs

Blended input + output cost at Grok 4 Fast's list rates — useful yardsticks before you commit to volume.

$0.0007
Short call
1K in · 1K out
$0.0009
Chat turn
3K in · 500 out
$0.0045
RAG / long prompt
20K in · 1K out
$0.700
1M in + 1M out
bulk job

Grok 4 Fast cost calculator

Enter your monthly volume to estimate the Grok 4 Fast bill. Runs entirely in your browser.

Estimated monthly cost

For the full multi-model breakdown, use the cost calculator.

xAI (Grok) models — Grok 4 Fast in context

How Grok 4 Fast prices against its siblings. Cheapest reference cost first.

Model Input /1M Output /1M Cost / call* Context Type
Grok 3 mini $0.100 $0.300 $0.0004 128K Fast / cheap
Grok 4 Fast
2M context
$0.200 $0.500 $0.0007 2M Fast / cheap
Grok Code Fast 1
Code-specialised
$0.200 $1.50 $0.0017 256K Balanced
Grok 4
Flagship
$3.00 $15.00 $0.018 256K Flagship

*Reference cost of one call with 1,000 input + 1,000 output tokens — a neutral yardstick. Use the calculator for your real usage. Cheapest row highlighted.

Cheaper than Grok 4 Fast? In the same fast / cheap tier, Gemini 1.5 Flash-8B runs $0.037 in / $0.150 out. The overall cheapest model tracked is Gemini 1.5 Flash-8B — see the cheapest LLM API guide.

How Grok 4 Fast pricing works

Grok 4 Fast is billed per token: a lower input price of $0.200 per million tokens for everything you send, and a higher output price of $0.500 per million for everything the model generates. To turn that into a real Grok 4 Fast bill, multiply by your monthly request volume and average prompt/response length — the calculator above does exactly that.

Grok 4 Fast does not list a separate cached-input rate, so every input token bills at $0.200 per million. If repeated context is a big part of your prompts, a model with prompt caching may end up cheaper in practice.

List prices move fast — always confirm the current numbers on the official xAI (Grok) pricing page before relying on them for budgeting.

Grok 4 Fast pricing FAQ

How much does the Grok 4 Fast API cost?

Grok 4 Fast costs $0.200 per 1M input tokens and $0.500 per 1M output tokens. A typical 3K-input / 500-output call works out to about $0.0009.

What is Grok 4 Fast's context window?

Grok 4 Fast has a 2M-token context window. Tokens you put in the prompt are billed at the $0.200 per 1M input rate.

Does Grok 4 Fast charge extra for output tokens?

Yes. Output (generated) tokens cost $0.500 per 1M, versus $0.200 per 1M for input — about 2.5× more, which is normal for LLM APIs.

Is there a cheaper alternative to Grok 4 Fast?

In the same fast / cheap tier, Gemini 1.5 Flash-8B (Google) is cheaper at $0.037 in / $0.150 out. The overall cheapest model on the market is Gemini 1.5 Flash-8B.

Compare Grok 4 Fast with other models