xAI: Grok 4 (xAI)Official docs

xAI: Grok 4 (xAI)

byxAI
Official docs

Grok 4 (xAI) is a reasoning model from xAI released on Jul 9, 2024. It reads text and images and writes text, with a 256K token context window and up to 256K tokens per reply.

Show more

It costs $3 per million input tokens and $15 per million output tokens. Cached input bills at $0.75, 75% less than fresh input.

It supports tool calling and prompt caching.

3 providers serve it, including DevPass (LLM Gateway), Helicone and LLM Gateway.

Modalities
In / out price
$3 / $15 per 1M
Context
256K
Max output
256K
Released
Jul 9, 2024
Knowledge cutoff
n/a
  • Tool calling
  • Structured output
  • Reasoning
  • Prompt caching
  • Open weights
  • Free to use

Grok 4 (xAI) pricing

USD, as listed on Nov 29, 2026. Most bills are input heavy, so the cached input rate matters as much as the headline price.

Input$3 / 1M tokens
Output$15 / 1M tokens
Cached input (read)$0.75 / 1M tokens

Grok 4 (xAI) providers

3 providers serve it, including DevPass (LLM Gateway), Helicone and LLM Gateway. Each host sets its own price and limits, so the cheapest one is not always the one with the longest context.

ProviderInput /MOutput /MCache read /MContextMax output
DevPass (LLM Gateway)$3$15$0.75256K256K
Helicone$3$15$0.75256K256K
LLM Gateway$3$15$0.75256K256K

What Grok 4 (xAI) costs per month

Pick a workload close to yours or type your own volumes.

Grok 4 (xAI) per month
$281
Without caching
$383
Per request
$0.0094

Supported request parameters

What you can set when you call Grok 4 (xAI) through an OpenAI compatible API.

  • Toolstools
  • Reasoningreasoning
  • Temperaturetemperature

Alternatives to Grok 4 (xAI)

Models that take the same inputs and call tools, closest in price, cheaper ones first.

  • Reads text, images and video. Tool calling, structured output, reasoning. Served by 95 providers.

    by moonshotaiJul 16, 20261.05M context$3/M input tokens$15/M output tokens95 providers

  • Reads text, images and files. Tool calling, structured output, reasoning. Served by 55 providers.

    by anthropicFeb 17, 2026$3/M input tokens$15/M output tokens55 providers

  • Reads text, images and files. Tool calling, structured output, reasoning. Served by 26 providers.

    by anthropicSep 29, 2025$3/M input tokens$15/M output tokens26 providers

  • Reads text, images and files. Tool calling, structured output, reasoning. Served by 53 providers.

    by openaiJul 9, 20261.05M context$2/M input tokens$12/M output tokens53 providers

  • Reads text, images, files, audio and video. Tool calling, structured output, reasoning. Served by 5 providers.

    by googleFeb 19, 20261M context$2/M input tokens$12/M output tokens5 providers

  • Reads text, images, files, audio and video. Tool calling, structured output, reasoning. Served by 19 providers.

    by googleNov 18, 2026$3/M input tokens$15/M output tokens19 providers

More from xAI

  • Generates video from text and images. Served by 2 providers.

    by x-aiOct 1, 20262 providers

  • Index 46.5

    Reads text, images and files. Tool calling, structured output, reasoning. Served by 36 providers.

    by x-aiSep 21, 2026500K context$2/M input tokens$6/M output tokens36 providers

  • Grok Voice STT 1.0

    Transcription

    Turns speech into text.

    by x-aiSep 17, 2026

  • Reads text, images and files. Tool calling, structured output, reasoning. Served by 34 providers.

    by x-aiAug 12, 2026$2/M input tokens$6/M output tokens34 providers

  • Generates images from text and images. Served by 3 providers.

    by x-aiAug 7, 20263 providers

  • Reads text, images and files. Tool calling, structured output, reasoning. Served by 26 providers.

    by x-aiJul 8, 2026$2/M input tokens$6/M output tokens26 providers

All xAI models

Grok 4 (xAI) questions

How much does the Grok 4 (xAI) API cost?

$3 per million input tokens and $15 per million output tokens, with cached input at $0.75. The estimator on this page turns that into a monthly bill for your own workload.

What is the context window of Grok 4 (xAI)?

256,000 tokens of input, and it can write up to 256,000 tokens in one reply. As a rough guide, a million tokens is around 750,000 English words.

Which providers serve Grok 4 (xAI)?

3 providers serve it, including DevPass (LLM Gateway), Helicone and LLM Gateway. Prices differ by host, so the Providers table on this page lists each one with its input and output price.

Does Grok 4 (xAI) support tool calling?

Yes. It accepts tool definitions, which is what an agent needs to call your APIs.

Is Grok 4 (xAI) open source?

No. xAI serves it through an API only, so you cannot download the weights or host it yourself.

When was Grok 4 (xAI) released?

Jul 9, 2024.

Catalog data from models.dev (MIT licensed), refreshed daily, last on Nov 29, 2026. The summary is written from these facts.