Grok 4
Grok 4 is xAI's latest reasoning model with a 256k context window. It supports parallel tool calling, structured outputs, and both image and text inputs. Note that reasoning is not exposed, reasoning cannot be disabled, and the reasoning effort cannot be specified. Pricing increases once the total tokens in a given request is greater than 128k tokens. See more details on the [xAI docs](https://docs.x.ai/docs/models/grok-4-0709)
Context window
This model accepts 131K tokens in one request (~98K words of text).
What fits in one request
- FitsShort documentAbout 1,500 words of text
- FitsLong documentAbout 37K words of text
- Won't fitSmall codebaseAbout 150K words of text
- Won't fitFull novelAbout 375K words of text
Specifications
Context size, pricing, and release info in one place.
- Context window
- 131,072 tokens (131K)
- Max output tokens
- 131,072 tokens (131K)
- Speed tier
- balanced
- Provider
- Xai
- Model family
- Grok
- Release date
- Jul 2025
- Input cost
- $3.00/M / 1M tokens
- Output cost
- $15.00/M / 1M tokens
Capabilities
See which features this model supports, such as vision, tools, and streaming.
- Vision
- Accepts image inputs alongside text
- Supported
- Tool use
- Can call external tools and APIs
- Supported
- Function calling
- Structured function call interface
- Supported
- Extended thinking
- Shows its chain-of-thought reasoning
- Supported
- Streaming
- Returns tokens as they are generated
- Supported
- Prompt caching
- Reuse repeated prompt prefixes cheaply
- Supported
- Web search
- Can browse the web during a request
- Not supported
- Batch API
- Process many requests asynchronously
- Not supported
Best for
Jump to a guide or ranking that matches each workload.
Compare Grok 4
Open a side-by-side comparison with one click.
- Grok 4 vs Amazon Titan Text Express
Grok 4 has 212% larger context window
- Grok 4 vs Amazon Titan Text Lite
Grok 4 has 212% larger context window
- Grok 4 vs Amazon Titan Text Premier
Grok 4 has 212% larger context window
- Grok 4 vs Claude Instant
Grok 4 has 31% larger context window
- Grok 4 vs Anthropic Claude
Grok 4 has 31% larger context window
- Grok 4 vs Codellama 34b Instruct
Grok 4 has 3100% larger context window
Frequently asked questions
Short answers about context size and how this model behaves.
More from Xai
Other models by Xai in our catalog.
Powered by Mem0
Use a smaller model.
Get better results.
Mem0 gives your AI long-term memory so you stop re-sending context on every call. That means you can use a smaller, faster, cheaper model — and still get better answers.
Example: a multi-turn chat session
80% less to send — works with any model