Home/xAI/Grok 4
xAI pricing

Grok 4 API Pricing & Cost Calculator

Grok 4 is xAI's flagship with native X (Twitter) integration for real-time information and reasoning. 256K context, strong at current-events queries that other models can't answer.

xAI retired Grok 4 on 2026-05-15

The prices below are kept for reference and for comparing against current models. New requests to this model are unlikely to succeed.

Still available from xAI: Grok 4.5, Grok 4.6, Grok 4.3

Input
$3.00
per 1M tokens
Output
$15.00
per 1M tokens
Context window
256K
tokens
Released
2025-07
Cutoff 2025-04
≈ Estimated tokenizer·$3.00 in·$15.00 out (per 1M)
Quick start with a use case
Total cost per call$0.0105
Input$0.003000
Output$0.007500
Cost comparison
Standard
$0.0105
With Caching
Not supported
With Batch
Not supported
Cutting costs? Open models start at $0.28/1M

DeepSeek, Kimi & 200+ open models on Novita AI — often 5–20x cheaper than proprietary APIs for comparable tasks.

Try Novita AI

Affiliate link — we may earn a commission at no extra cost to you.

Detailed pricing

Grok 4 pricing breakdown

All pricing dimensions including caching and batch discounts.

TypePrice (per 1M tokens)
Input$3.0000
Output$15.0000
Cutting costs? Open models start at $0.28/1M

DeepSeek, Kimi & 200+ open models on Novita AI — often 5–20x cheaper than proprietary APIs for comparable tasks.

Try Novita AI

Affiliate link — we may earn a commission at no extra cost to you.

Last verified 2026-08-01 · xAI official pricing · ⚠️ Spotted a wrong price? Report in 30s →

How it compares

Grok 4 vs alternatives

Single-call cost (1000 input + 500 output tokens) ranked from cheapest.

ModelPer call
Grok 4
xAI · this page
$0.0105
DeepSeek V3.2
DeepSeek
$0.000480
GPT-5.6 Luna
OpenAI
$0.000800
DeepSeek V4-Flash
DeepSeek
$0.000900
Gemini 3.1 Flash Lite
Google
$0.001000
GPT-5 mini
OpenAI
$0.001250
Recommended use

When to choose Grok 4

Grok 4 shines for general-purpose tasks, complex multi-step reasoning, tasks needing real-time information, and image and document understanding. Token counts are estimated within ~10-20% margin.

Context window of 256K tokens handles long conversations and large documents.
Prompt caching available — significant savings for repeated system prompts.
Tool / function calling supported.
FAQ

Frequently asked questions

Grok 4 costs $3.00 per 1M input tokens and $15.00 per 1M output tokens. A typical chat call (1000 input + 500 output tokens) costs approximately $0.0105. Use the calculator above to estimate your specific use case.
Grok 4 supports a 256K token context window with a max output of 256,000 tokens. Knowledge cutoff: 2025-04.
Yes, Grok 4 accepts image input. Vision token pricing is generally calculated based on image dimensions and folded into the input token count. Specific image-specific pricing varies — refer to xAI's official documentation.
Token counts for Grok 4 are estimated from character ratios (~10-20% margin). Cost calculations use prices verified on 2026-08-01. For final billing accuracy, always verify with xAI's usage dashboard.
Grok 4 does not currently support fine-tuning. Consider another model in the xAI family if fine-tuning is required.