xAI: Grok-4

byxAI

Grok-4 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 128K 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.

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

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

Grok-4 pricing

USD, as listed on Oct 15, 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 providers

5 providers serve it, including DevPass (LLM Gateway), FastRouter and Helicone. 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
FastRouter$3$15$0.75256K64K
Helicone$3$15$0.75256K256K
LLM Gateway$3$15$0.75256K256K
Poe$3$15$0.75256K128K

What Grok-4 costs per month

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

Grok-4 per month
$281
Without caching
$383
Per request
$0.0094

Supported request parameters

What you can set when you call Grok-4 through an OpenAI compatible API.

  • Toolstools
  • Reasoningreasoning

Alternatives to Grok-4

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

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

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

    by anthropicFeb 5, 2026$3/M input tokens$15/M output tokens48 providers

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

    by anthropicJan 15, 2025$3/M input tokens$15/M output tokens33 providers

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

    by thinkingmachinesJul 15, 2026$3.74/M input tokens$9.36/M output tokens22 providers

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

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

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

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

More from xAI

  • Generates video from text, images and files. 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 22 providers.

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

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

    by x-aiAug 10, 2026$2/M input tokens$6/M output tokens29 providers

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

    by x-aiAug 7, 2026$0/M input tokens$0/M output tokens3 providers

  • Grok Voice STT 1.0

    Transcription

    Turns speech into text.

    by x-aiAug 4, 2026

  • Turns text into spoken audio.

    by x-aiJul 31, 2026

All xAI models

Grok-4 questions

How much does the Grok-4 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?

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

Which providers serve Grok-4?

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

Does Grok-4 support tool calling?

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

Is Grok-4 open source?

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

When was Grok-4 released?

Jul 9, 2024.

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

Building on Grok-4?

I test your real tasks on it and the two closest alternatives, then ship the agent on whichever wins on cost and accuracy.

Book Meeting