xAI Grok API

SpaceX-owned xAI's Grok models over an OpenAI-compatible API

LLMs & Chat Usage_based Has API
Researched · Published · Reviewed
RECATOOLS Score
7.8 / 10
Capability
8.5
Value for money
6.5
Ease of use
7
ASEAN readiness
6
API quality
7.5
Founded
2024
HQ
Palo Alto, California, USA
Developer
SpaceX

Overview

The xAI Grok API, branded SpaceXSI since SpaceX bought xAI, serves Grok text, image, video and voice models over OpenAI-compatible endpoints. The flagship, Grok 4.7, has a 500K-token context and costs $2 per million input tokens and $6 output. The original Grok 4 model was retired from the API in May 2026.

Advertisement

Pricing

Pricing shown for reference only. These figures reflect RECATOOLS research as of 14 Oct 2026 and may be out of date or incomplete. This is not financial or purchasing advice — always confirm the current price on the provider’s official website before making any decision.

grok-4.3
$1.25 / $2.50 per 1M tokens
1M context; $2.50 / $5 for prompts of 200K+ tokens
  • Cached input $0.20 per 1M
  • Batch API 20% off
  • Serves requests to the retired Grok 4 slugs
grok-4.20 (reasoning, non-reasoning, multi-agent)
$1.25 / $2.50 per 1M tokens
1M context; $2.50 / $5 for prompts of 200K+ tokens
  • Cached input $0.20 per 1M
  • Batch API 20% off
grok-build-0.1
$1 / $2 per 1M tokens
256K context; coding model in early access
  • Cached input $0.20 per 1M
  • $2 / $4 for prompts of 200K+ tokens
Server-side tools
From $2.50 per 1,000 calls
Billed on top of tokens
  • Web Search $5 per 1,000 calls
  • X Search $5 per 1,000 posts, $10 per 1,000 profiles
  • Code execution $5 per 1,000 calls; Collections search $2.50
Imagine and Voice
From $0.02 per image
Image, video and voice APIs
  • Video from $0.02 per second
  • Speech-to-speech $0.08 per minute
  • Text-to-speech $15 per 1M characters

API pricing (pay as you go)

Model Input Cached input Output
grok-4.6 500k context; ≥200k-token prompts: $4.00 / $1.00 / $12.00 $2 $0.50 $6
grok-4.5 500k context; ≥200k-token prompts: $4.00 / $0.60 / $12.00 $2 $0.30 $6
grok-4.3 1M context; ≥200k-token prompts: $2.50 / $0.40 / $5.00 $1.25 $0.20 $2.50
grok-4.20-0309-reasoning 1M context; ≥200k-token prompts: $2.50 / $0.40 / $5.00 $1.25 $0.20 $2.50
grok-4.20-0309-non-reasoning 1M context; ≥200k-token prompts: $2.50 / $0.40 / $5.00 $1.25 $0.20 $2.50

Rates in USD, per 1M tokens unless a row says otherwise. Short-context rates shown. Once a prompt reaches 200k tokens, the whole request bills at long-context rates (2x). US regional endpoint (grok-4.6 only) costs 1.1x. Checked 16 Sep 2026 against the provider’s price page.

Use cases

Frontier LLM API Enterprise integration Reasoning workloads

What you can produce with xAI Grok API

  • Grok 4.7 text generation with a 500K-token context and low-to-xhigh reasoning effort
  • OpenAI-compatible Chat Completions and Responses API endpoints at api.x.ai
  • Answers grounded in live X posts and web pages through the paid X Search and Web Search tools
  • Function calling, structured outputs, code execution and remote MCP tools
  • Image and video generation with Grok Imagine, plus speech-to-speech, TTS and STT voice APIs
  • Batch jobs completed within about 24 hours, at 20% off on Grok 4.3 and 4.20 models
  • Grok models inside Microsoft Foundry and Google Cloud Vertex AI
Advertisement
RECATOOLS Verdict

Grok 4.7 is a keenly priced frontier model: $2 and $6 per million tokens undercuts the rival flagships in xAI's own comparison table, and the 500K context, configurable reasoning and OpenAI-compatible Responses API make it easy to trial. Live X and web data are a genuine advantage, but they are paid tools, not built in.

Expect churn. xAI retired eight model slugs in May 2026, shipped three flagship versions between July and September, and has changed its brand twice since SpaceX bought it. Pin model versions, budget for search-tool fees, and put SpaceX ownership through your usual governance review for regulated workloads.

Desk research by RECATOOLS from public sources, written with AI assistance — not a hands-on test. How we review

What we found

This page used to cover Grok 4, the model xAI released on its API and grok.com in July 2025. That model has left the API. On 15 May 2026 xAI retired grok-4-0709 along with the Grok 4 Fast, Grok 4.1 Fast, Grok 3 and grok-code-fast-1 slugs, and requests to them are now served by Grok 4.3 and billed at its rates. The current flagship is Grok 4.7, released on 21 September 2026 with a 500,000-token context, reasoning effort from low to xhigh, and pricing of $2 per million input tokens and $6 per million output, rising to $4 and $12 once a prompt passes 200,000 tokens. Grok 4.6 and 4.5 cost the same; Grok 4.3 and the Grok 4.20 models keep a one-million-token context at $1.25 and $2.50.

The company has changed as well. SpaceX announced on 2 February 2026 that it had acquired xAI, the business rebranded as SpaceXAI in July, the Grok 4.7 announcement is signed by SpaceXAI LLC, and the developer documentation now calls the company SpaceXSI. The API still runs at api.x.ai and is OpenAI-compatible, with a Responses API, a Batch API at 20% off on some models, a priority tier at twice the price and a US-only endpoint at a 10% premium. Grok models are also sold through Microsoft Foundry and Google Cloud Vertex AI.

Live data is a tool rather than a property of the model. The documentation says Grok knows nothing of current events unless Web Search or X Search is switched on, and both are billed on top of tokens: $5 per 1,000 web searches and $5 per 1,000 X posts returned.

The benchmark table in the Grok 4.7 announcement is the vendor's own and shows losses as well as wins against rival frontier models. Earlier versions of this page quoted SWE-bench gains, Reddit verdicts and a $175 monthly free-credit scheme that could not be traced; the current billing documentation describes prepaid credits and no free API allowance.

Compiled by RECATOOLS from public sources: vendor documentation and pricing, code repositories and published reporting.

About this listing

Researched on
Published on
Last reviewed

This entry was compiled from publicly available data including xAI Grok API's official website, press releases, documentation, and reputable third-party publications. RECATOOLS is not affiliated with xAI Grok API unless explicitly stated.

Data accuracy

Third-party AI tools update their pricing, features, availability, and policies frequently. Information here may be outdated by the time you read this — we make reasonable efforts to keep listings current, but cannot guarantee absolute accuracy.

For the latest details, please refer to xAI Grok API directly →

Spotted something out of date? Suggest an update →

Advertisement