xAI

Grok 4

Type
language model
Context
256K tokens
Max output
128K
Released
10 July 2025
Knowledge cutoff
January 2025
API string
xai/grok-4

Prices by provider

Provider Input, $ per 1M Output, $ per 1M In our data since
vercel_ai_gateway $3 $15 31 Jul 2026
FastRouter $3 $15 31 Jul 2026
Helicone $3 $15 31 Jul 2026
LLM Gateway $3 $15 31 Jul 2026
Microsoft Foundry $3 $15 31 Jul 2026
OCI Generative AI $3 $15 31 Jul 2026
OpenRouter $3 $15 31 Jul 2026
Poe $3 $15 31 Jul 2026
Requesty $3 $15 31 Jul 2026
ZenMux $3 $15 31 Jul 2026
xAI $3 $15 31 Jul 2026
Replicate $7.2 $36 31 Jul 2026

Only the base tier and only per-token prices are shown. Batch, discounted and cached rates, as well as prices per image or per second of video, do not go into this table: they cannot stand in the same column as a price per million tokens.

The date in the last column is the day this price first entered our collection. The price may well be older: before that day we simply were not recording it. It has not changed since — otherwise a new row with a new date would stand in its place.