Atlas / Models / X Ai / xAI: Grok 4

xAI: Grok 4✓ Catalog verified

x-ai/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

Input price
$3.00 /1M
Output price
$15.00 /1M
Context
256K
Modalities
imagetext
Released
Jul 9, 2025
Tool calling
✓ Yes
Atlas signal
88/100
01

Overview

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

Access: available through the official X Ai API. Context window: 256K.

Pricing and metadata from the ModelsAtlas catalog.Last refreshed Aug 5, 2026
02

Specifications

API identifierx-ai/grok-4
ProviderX Ai
Model typeMultimodal LLM
Context window256K catalog
Input modalitiesimage · text
Output modalitiestext
ReleasedJul 9, 2025
TokenizerGrok
ModeratedNo
Architecture modalitytext+image->text
Supported parameters
include_reasoninglogprobsmax_tokensreasoningresponse_formatseedstructured_outputstemperaturetool_choicetoolstop_logprobstop_p
Source: provider documentation + catalog feedMethodology →
03

Pricing

Live pricing components for x-ai/grok-4 as published in the catalog.

$3.00
Input /1M
$15.00
Output /1M
Per request
Per image
Pricing componentRaw unit priceNormalizedUnit
Prompt tokens$0.000003$3.00 / 1MPer input token
Completion tokens$0.000015$15.00 / 1MPer output token
Request feeN/AN/APer request
Image feeN/AN/APer image unit
Web search fee$0.005$0.005000Per search request
Source: catalog pricing feedCompare all pricing →Cheapest models →
04

Cost calculator

Estimate monthly spend from your own token volumes.

Scale / Volume

Estimated Total Cost

$4.5Calculated from current list pricing in the ModelsAtlas catalog.
05

Capabilities

CapabilityStatusWhat it means
Visual Understanding✓ SupportedImage and document analysis support
Audio ProcessingNot advertisedSpeech and voice aligned flows
Tool Calling✓ SupportedSupports tools / function calling
Self-HostingNot advertisedDeploy outside managed APIs
Derived from catalog capability tags and supported parameters
06

Capability signals

Directional signals derived from model metadata and capability tags — not official benchmark submissions.

xAI: Grok 4
MMLU Signal (Reasoning)
97signal
Coding Signal (HumanEval proxy)
88signal
Math Signal (GSM8K proxy)
83signal
Science Signal (GPQA proxy)
83signal
Estimated from metadata — not an official benchmark runAll benchmarks →Methodology →
07

Quick start

Call xAI: Grok 4 through an OpenAI-compatible client.

from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="x-ai/grok-4",
    messages=[{"role": "user", "content": "Explain quantum physics."}]
)

print(response.choices[0].message.content)
08

Alternatives

Closest models by context window from a different provider.

09

Sources & attribution

Pricing and metadata are maintained in the ModelsAtlas catalog.

Capability bars use metadata tags — directional estimates onlyHow we source and verify data →
10

Frequently asked questions

How much does xAI: Grok 4 cost?

$3.00 per 1M input tokens and $15.00 per 1M output tokens on the official X Ai API.

What is the context window of xAI: Grok 4?

xAI: Grok 4 supports up to 256K tokens of context.

Does xAI: Grok 4 support tool / function calling?

Yes, xAI: Grok 4 supports tool / function calling — you can register tools and the model will emit structured tool calls.

How do I access xAI: Grok 4?

Use the official X Ai API with the model id `x-ai/grok-4`. See the Quick start section above for code examples.