Grok 4

grok-4 · Grok

Grok, their latest and greatest flagship model, offers unparalleled performance in natural language, math, and reasoning – the perfect jack of all trades. The current pointing model version is grok-4-0709.

API Pricing

Input$3.3 / 1M tokens
Output$16.5 / 1M tokens
Cache read$0.825 / 1M tokens

Specifications

Context256K tokens
Modalitiestext, image
Featuresfunction calling, structured outputs, thinking

Frequently asked questions

What is Grok 4?

Grok, their latest and greatest flagship model, offers unparalleled performance in natural language, math, and reasoning – the perfect jack of all trades. The current pointing model version is grok-4-0709.

What is the context length of Grok 4?

Grok 4 has a 256,000 token context window.

How much does Grok 4 cost?

On AIHubMix, Grok 4 costs $3.3 per million input tokens and $16.5 per million output tokens. Cached input reads are billed at $0.825 per million tokens.

What modalities does Grok 4 support?

Grok 4 accepts text and image input.

What capabilities does Grok 4 support?

Grok 4 supports function calling, structured outputs and thinking. Per-protocol parameter support is listed in the capability table on this page.

How do I call Grok 4 via API?

Grok 4 is available through the AIHubMix unified API. The API is OpenAI-compatible: point your OpenAI SDK at https://aihubmix.com/v1, use your AIHubMix API key, and set the model name to grok-4 — no other code changes needed.

Who created Grok 4?

Grok 4 is developed by Grok. AIHubMix aggregates it alongside models from other providers behind one API and one bill.

More models from Grok

See all Grok models →

Grok 4.6

by Grok

Grok 4.6 is xAI’s (SpaceXAI) flagship multimodal reasoning model for coding, long-running…

$2/1M in · $6/1M out
500,000 tokens context

Grok 4.5

by Grok

Grok 4.5 was trained on datasets spanning knowledge in coding, science, engineering, and…

$2/1M in · $6/1M out
500,000 tokens context

Grok Build 0.1

by Grok

Fast coding model trained specifically for agentic coding workflows.

$1/1M in · $2/1M out
256,000 tokens context

Grok 4.3

by Grok

Grok 4.3 is amongst the leading models in intelligence and well priced when comparing to…

$1.25/1M in · $2.5/1M out
1,000,000 tokens context

grok-4-20-non-reasoning

by Grok

Grok 4.2 is xAI’s latest large language model, built for strong reasoning, multimodal…

$2/1M in · $6/1M out
2,000,000 tokens context

Grok 4 20 (reasoning)

by Grok

Grok 4.2 is xAI’s latest large language model, built for strong reasoning, multimodal…

$2/1M in · $6/1M out
2,000,000 tokens context

Use Grok 4 via the AIHubMix unified API — one interface for every major LLM.