Grok 4
Grok 4 is xAI's high-capability Grok 4 reasoning model. It uses chain-of-thought reasoning for mathematics, science, and coding workloads with a context window of 256K tokens.
import { streamText } from 'ai'
const result = streamText({ model: 'xai/grok-4', prompt: 'Why is the sky blue?'})P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.