$ AI PriceCompare
← All API prices
§ SpaceXAI API pricing

Grok API pricing: SpaceXAI's models, per 1M tokens

SpaceXAI is the name xAI took after fully merging into SpaceX (the deal closed Feb 2, 2026). The Grok product name didn't change, and the API documentation still lives at docs.x.ai. The current text lineup is small: one flagship, one reasoning workhorse and one coding model (older Grok 4.6, 4.5 and 4.20 ids are still listed in the docs), plus Grok Imagine and Grok voice models.

Updated November 2, 2026
§ Short answer

The short answer

Grok 4.7, the flagship, costs $2.00 input / $6.00 output per 1M tokens. Grok 4.3 is $1.25 / $2.50 with a 1M context, and Grok Build 0.1 for coding is $1.00 / $2.00. Once a prompt reaches 200K tokens, every model doubles its rates for the whole request.

§ Rates

SpaceXAI API prices per 1M tokens

ModelTierInput / 1MOutput / 1MCache hit / 1MContextNotes
Grok 4.7Flagship$2.00$6.00$0.50500KNew flagship (Sep 21, 2026); larger base model, replaces 4.6 at the same price; ≥200K tokens: $4/$12, cache $1.00
Grok 4.3Mid-tier$1.25$2.50$0.201MReasoning workhorse; replaced Grok 4; ≥200K tokens: $2.50/$5, cache $0.40
Grok Build 0.1Specialist$1.00$2.00$0.20256KCode tasks; replaced Grok Code Fast 1; ≥200K tokens: $2/$4, cache $0.40
§ Cost examples

What real workloads cost

ModelSupport chatbot
10,000 conversations × (2,000 input + 400 output tokens)
Document Q&A
1,000 questions × (30,000 input + 800 output tokens)
Coding agent session
4M input tokens (90% cache hits) + 150,000 output tokens
Grok Build 0.1$28.00$31.60$1.42
Grok 4.3$35.00$39.50$1.59
Grok 4.7$64.00$64.80$3.50

Standard rates per 1M tokens from data on this site. The coding-agent row assumes 90% of input is read from the prompt cache (full input price where a model has no cache rate). Cache-write fees, batch discounts and long-context surcharges listed in the notes are not included. Updated November 2, 2026.

§ Media

SpaceXAI image, video & voice API prices

ModelTypePriceNotes
Grok Imagine 1.5Video$0.080 / sCheapest frontier tier (480p–1080p)
Grok Imagine VideoVideo$0.050 / sOlder Grok Imagine video model (480p–720p); Grok Imagine 1.5 Lite is now cheaper
Grok Imagine 1.5 LiteVideo$0.020 / sCheapest Grok Imagine video tier (grok-imagine-video-1.5-lite)
Grok Voice 3.0Voice$0.08 / minReal-time speech-to-speech (grok-voice-3.0); text input $0.004; replaces the deprecated grok-voice-2.0 at the same price
§ Rivals

How SpaceXAI compares at each tier

ModelProviderTierInput / 1MOutput / 1MContext
Grok 4.7SpaceXAIFlagship$2.00$6.00500K
Qwen3.8-MaxAlibabaFlagship$2.00$6.001M
Gemini 4 ArgonGoogleFlagship$2.00$10.001M
Kimi K3.1 ProMoonshot AIFlagship$2.00$10.001M
Gemini 3.1 ProGoogleFlagship$2.00$12.001M
Grok 4.3SpaceXAIMid-tier$1.25$2.501M
Mistral Large 3MistralMid-tier$0.50$1.50256K
DeepSeek V4-ProDeepSeekMid-tier$0.66$1.981M
Mistral Large 4MistralMid-tier$0.70$2.101M
Gemini 3.8 FlashGoogleMid-tier$0.75$3.751M

SpaceXAI's cheapest model per tier (bold) against the four cheapest same-tier models from other providers, by output price.

The 200K threshold reprices the whole request

SpaceXAI's docs say a request whose prompt reaches the long-context threshold is billed at the higher rate for all tokens in that request, not just the part above 200K. Grok 4.7 goes to $4/$12 per 1M, Grok 4.3 to $2.50/$5 and Grok Build 0.1 to $2/$4. A 210K-token prompt therefore costs about twice as much as a 190K one. If your documents sit near the line, trim or chunk them to stay below 200K. That's an easy way to halve the cost of those calls.

Grok 4.3 vs Grok 4.7

Grok 4.3 is cheaper on both input ($1.25 vs $2.00) and output ($2.50 vs $6.00). It also has the bigger window: 1M against Grok 4.7's 500K. Grok 4.7 is the newer flagship on a larger base model. Default to 4.3 for long-document reasoning and bulk work, and move a task to 4.7 when 4.3's answers aren't good enough. For code, Grok Build 0.1 is the cheapest of the three but has a 256K window.

Cheap output, pricier cache hits

Grok 4.7 has one of the lowest output prices among flagships: $6.00 per 1M against $10.00 for Gemini 4 Argon, $20.00 for Claude Opus 5.5 and $50.00 for GPT-6 Astra. That favours output-heavy jobs such as long reports, drafting and code generation. Its cache-hit rate of $0.50 is high compared with Argon's $0.10, though. In agent loops that re-read a large cached context on every step, Grok's advantage shrinks: in the coding-agent column above, cache reads make up about half of Grok 4.7's cost.

§ FAQ

Frequently asked questions

Is the Grok API from xAI or SpaceXAI?

Both names refer to the same company. xAI rebranded as SpaceXAI after fully merging into SpaceX (deal closed Feb 2, 2026), and the Grok product name stayed the same. Model ids such as grok-4.7 and grok-4.3 are what you call in the API.

Does the Grok API search X and the web in real time?

Only if you enable it. SpaceXAI's docs say real-time data needs the server-side search tools (Web Search or X Search) turned on in the request. Without them, Grok knows only what was in its training data.

Is there a free tier or Batch discount for the Grok API?

SpaceXAI's model and pricing docs don't list free credits or a Batch discount; they note only that not every model accepts Batch API requests. Budget at the standard rates on this page. The free Grok chat plan is a consumer product and is separate from API billing.

Grok API vs ChatGPT API: which costs less?

At the flagship tier, Grok 4.7 ($2.00 / $6.00) is far cheaper than GPT-6 Astra ($10.00 / $50.00). In the mid tier, Grok 4.3 ($1.25 / $2.50) undercuts GPT-6.1 Sol ($2.00 / $10.00) on both input and output. GPT-6.1 Sol has cheaper cache hits ($0.10 vs $0.20), but even on our 90%-cached coding-agent example that doesn't make up for its higher input and output rates. Grok's 200K long-context surcharge kicks in earlier than OpenAI's 272K one, though.

§ Keep reading

Related guides.

How we choose: prices come from each vendor's official pricing page and are re-checked every week. We take no affiliate fees, so rankings aren't for sale.