Grok 4
xAI's mid-2025 flagship, top scores on Humanity's Last Exam at launch, with native real-time X integration.
Updated
Quick facts
- Released
- Jul 2025
- Context
- 256K tokens
- Output / 1M
- $15.00 / 1M tokens
- License
- Proprietary
About Grok 4
Grok 4 is xAI's mid-2025 release that briefly led the Humanity's Last Exam leaderboard and brought the company into the frontier conversation in earnest. It's most distinctive in its real-time access to the X (Twitter) firehose, which makes it useful for current-events Q&A in ways the closed-cutoff models can't match.
For most coding and writing workloads, Grok 4 is competitive but not category-leading. It's the right pick when current-events relevance is the differentiator.
Benchmarks
Published scores from xAI's model card or independent leaderboards. We do not publish numbers we cannot source, see methodology.
- GPQA87.5
Capabilities
Strengths
- Real-time X data access
- Strong on benchmarks at launch
- Less restrictive content policy than peers
Tracked weaknesses
- Tooling and ecosystem still maturing
- Smaller deployment footprint than majors
Pricing
Per-million-token rates as published by xAI.
| Tier | Price | Notes |
|---|---|---|
| Input | $3.00 / 1M tokens | Tokens you send to the model |
| Output | $15.00 / 1M tokens | Tokens the model generates |
| Context | 256K tokens | Max combined input + output |
Call Grok 4 from your code
Drop-in snippet for the xAI SDK. Set your API key in the environment and run.
import OpenAI from "openai";
const client = new OpenAI({
// Use OPENAI_API_KEY for OpenAI, or your provider's key + baseURL.
apiKey: process.env.OPENAI_API_KEY,
});
const completion = await client.chat.completions.create({
model: "grok-4",
messages: [
{ role: "user", content: "What's the time complexity of quicksort?" },
],
});
console.log(completion.choices[0].message.content);Compare Grok 4 with…
Frequently asked
How much does Grok 4 cost per million tokens?
Grok 4 is priced at $3.00 / 1M tokens for input tokens and $15.00 / 1M tokens for output tokens via the official xAI API at the time of writing.What is Grok 4's context window?
Grok 4 supports a context window of 256K tokens.Is Grok 4 open source?
No. Grok 4 is a closed-weight model, you can use it via xAI's API but the model weights are not publicly downloadable.When was Grok 4 released?
Grok 4 was released on Jul 9, 2025 by xAI.What is Grok 4's knowledge cutoff?
Grok 4's training data has a knowledge cutoff of Nov 2024. For information after that date you'll need a tool-use or web-search wrapper.
Intelligence, distilled weekly.
One short email every Friday, new model launches, leaderboard moves, and pricing drops. Curated by hand. Free, no spam.