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...

by xAI

Overview

Quick stats across all benchmark runs.

Score

56 benchmarks

Avg Latency

43.0s

382 requests

Pricing

$3.00 in / $15.00 out

per 1M tokens

Context

256K

tokens

Alternatives

Models with similar or better quality but different tradeoffs

No alternatives found

Run benchmarks on this model to discover alternatives

Benchmark Performance

How this model performs across different benchmarks

No benchmark data available

Run benchmarks with this model to see performance breakdown

Price vs Performance

Compare cost efficiency across all models

Current model (baseline)
Other models (relative score)
Y-axis shows score difference from shared benchmarks. X-axis uses log scale.

Score Over Time

Performance trends across all benchmark runs

Benchmark Activity

Number of benchmark runs over time

Get started with this model using OpenRouter

import { OpenRouter } from "@openrouter/sdk";

const openrouter = new OpenRouter({
  apiKey: "<OPENROUTER_API_KEY>"
});

const completion = await openrouter.chat.completions.create({
  model: "x-ai/grok-4",
  messages: [
    {
      role: "user",
      content: "Hello!"
    }
  ]
});

console.log(completion.choices[0].message.content);

Get your API key at openrouter.ai/keys

Other Models from xAI

Compare performance with other models from the same creator

ModelLatencyCost/1MScore
Grok 4.36.4s$1.8847%
Grok 4.1 Fast14.2s$0.3520%
Grok 3 Mini22.0s$0.40
Grok 324.7s$9.00
Grok 3 Mini Beta23.3s$0.40
Grok 3 Beta26.8s$9.00
Grok 4 Fast18.3s$0.35
Grok Code Fast 116.1s$0.85
Grok 4.20 Multi-Agent$4.00
Grok 4.202.5s$1.88