Skip to content

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.

ReasoningTool UseVision (Image)
index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'xai/grok-4',
prompt: 'Why is the sky blue?'
})

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
xAI
Legal:Terms
Privacy
256K
$3.00/M$15.00/M
07/09/2025