xAI

Grok 4 Pricing

API pricing for Grok 4 by xAI. Input tokens cost $3/1M, output tokens cost $15/1M with 256K context window.

Last updated:

ReasoningTools

Input Cost

$3

per 1M tokens

Output Cost

$15

per 1M tokens

Context Window

256K

tokens

Cost Calculator

Estimated Cost:

$0.00

Model Details

Provider xAI
Model ID grok-4
Context Window 256K tokens
Max Output 64000 tokens
Cache Read Cost $0.75/1M
Release Date 2025-07-09

Compare Alternatives

Model Input Output Context
Grok 4 (this model) $3 $15 256K
Claude Sonnet 3 Anthropic $3 $15 200K
Claude Sonnet 3.5 Anthropic $3 $15 200K
Claude Sonnet 3.5 v2 Anthropic $3 $15 200K
Claude Sonnet 3.7 Anthropic $3 $15 200K
Claude Sonnet 3.7 (latest) Anthropic $3 $15 200K

Available from Resellers

Grok 4 is also available through these resellers and gateways:

Reseller Model Input Output
Abacus Grok 4 $3 $15
Abacus Grok 4 Fast (Non-Reasoning) $0.2 $0.5
Abacus Grok 4.1 Fast (Non-Reasoning) $0.2 $0.5
Azure Grok 4 $3 $15
Azure Grok 4 Fast (Non-Reasoning) $0.2 $0.5
Azure Grok 4 Fast (Reasoning) $0.2 $0.5
Azure Cognitive Services Grok 4 $3 $15
Azure Cognitive Services Grok 4 Fast (Non-Reasoning) $0.2 $0.5
Azure Cognitive Services Grok 4 Fast (Reasoning) $0.2 $0.5
FastRouter Grok 4 $3 $15
← Back to All Models