Unofficial guide · Grok / xAI API
Grok API models, pricing and rate limits: what grok-4.7 costs and how tiers work
Grok is xAI's model family, and on the xAI API grok-4.7 costs $2 per million input tokens, $0.50 per million cached input tokens and $6 per million output tokens, as long as the prompt stays below 200K tokens. At 200K and above, every token in the request is billed at double those rates. Rate limits are set per model in requests per second (RPS) and tokens per minute (TPM), and they rise with your cumulative spend.
Independent guide. aiedu.guide is not affiliated with xAI (SpaceXAI), Grok, Cursor or any other company named here, and is not endorsed or sponsored by any of them. Prices come from xAI's public docs; check them before you budget.
No affiliate links on this page. See our disclosure.
Prices and limits here are xAI's own list figures, checked on 8 Oct 2026 (attachment_search price updated 29 Sep 2026). Gateway prices differ; see Grok 4.7 model IDs and prices by channel. For the rest of the series, see the Grok developer guide.
How much does the Grok 4.7 API cost?
Short answer: $2 per million input tokens, $0.50 per million cached input tokens and $6 per million output tokens when the prompt is below 200K tokens. At or above 200K prompt tokens, it's $4, $1 and $12, applied to every token in the request.
Table: grok-4.7 token prices on the xAI API, per 1M tokens (last checked 8 Oct 2026)
| Endpoint and prompt size | Input | Cached input | Output |
|---|---|---|---|
| Standard, below 200K | $2.00 | $0.50 | $6.00 |
| Standard, 200K and above | $4.00 | $1.00 | $12.00 |
| US regional endpoint, below 200K | $2.20 | $0.55 | $6.60 |
| US regional endpoint, 200K and above | $4.40 | $1.10 | $13.20 |
grok-4.6 has the same rates as grok-4.7.
How much does Grok 4.7 cost per million tokens? $2 for input, $0.50 for cached input and $6 for output, below 200K prompt tokens. These are xAI's list prices on its own API.
What happens when a Grok prompt reaches 200K tokens?
Short answer: The whole request is billed at the higher rate, not just the tokens past 200K. xAI's pricing page says requests whose prompt reaches the threshold "are billed at the higher rate for all tokens in the request".
That makes 200K a cliff, not a gentle step. If you can keep a prompt under it, for example by trimming history or retrieved documents, the whole request stays at the lower rate.
Is it "at 200K" or "above 200K"? xAI's pricing tables say "≥ 200k". Its release notes and a few other pages say "above" or "exceeds" 200k. The only prompt this affects is one of exactly 200,000 tokens.
Does Grok charge more for long prompts? Yes. Once a prompt reaches 200K tokens, xAI bills every token in that request at the long-context rate: $4 input, $1 cached input and $12 output per million.
What other Grok API pricing options are there?
Short answer: Priority processing costs double, the US regional endpoint costs 10% more, and the Batch API isn't available for grok-4.7. Grok 4.7 Fast exists, but not on the public xAI API.
- Priority processing: send
service_tier: "priority"and every token type costs twice as much. You're billed at the priority rate only when the response confirms"service_tier": "priority". It works on Chat Completions and the Responses API, not on Batch, image or video requests. - US regional endpoint:
https://us.api.x.ai/v1bills 1.1 times the standard rate on input, output and cached input, including long-context rates. It serves onlygrok-4.7andgrok-4.6. - Batch API: not supported for
grok-4.7,grok-4.6,grok-4.5orgrok-build-0.1. xAI's 20% batch discount applies only togrok-4.3and thegrok-4.20family. - Cached input: $0.50 per million tokens instead of $2 below 200K. xAI highly recommends setting
prompt_cache_keyon the Responses API; without it, xAI says "you often pay full input price on a cache-cold server". See the Grok API quickstart.
Is Grok 4.7 Fast available on the API?
Short answer: No. xAI says Grok 4.7 Fast is available only in Cursor and Grok Build, not on the public xAI API. It costs 2x the standard token rates, or 1.5x for long-context requests, according to xAI.
Fast rates per million tokens: $4 input, $1 cached input and $12 output below 200K, and $6, $1.50 and $18 above. Fast isn't part of Grok Build's free tier. Cursor's own Fast pricing is on the channels page.
What do Grok's server-side tools cost?
Short answer: Web search costs $5 per 1,000 calls, X search costs $5 per 1,000 posts and $10 per 1,000 profiles fetched, and code execution costs $5 per 1,000 calls. Remote MCP has no per-call fee, only tokens.
Table: xAI tool prices (last checked 8 Oct 2026)
| Tool | Price |
|---|---|
web_search (includes image search) | $5 per 1,000 calls |
x_search | $5 per 1,000 posts fetched; $10 per 1,000 user profiles fetched |
code_execution (code_interpreter on the Responses API) | $5 per 1,000 calls |
attachment_search | $5 per 1,000 calls |
collections_search / file_search | $2.50 per 1,000 calls |
| Remote MCP | No per-call fee; tokens only |
image_generation | Imagine model rates |
view_image, view_x_video | Token-based |
X search is billed per item fetched, and that includes parent and quoted posts. For how the search tools work, see moving from Live Search to web_search and x_search.
Other charges on xAI's pricing page:
- Usage-guideline violation fee: $0.05 per request when a violation is caught before generation (Responses API).
- Storage: files $0.025 per GiB per day, collections $0.10 per GiB per day, downloads $0.20 per GiB.
What are the Grok API rate limits?
Short answer: xAI sets limits per model in requests per second and tokens per minute, by spend tier. For grok-4.7, Tier 0 allows 150 RPS and 50M TPM; Tier 4 allows 500 RPS and 100M TPM. Exceeding any limit returns a 429 error.
Table: grok-4.7 rate limits by tier (last checked 8 Oct 2026)
| Tier | Cumulative spend since 1 Jan 2026 | Requests per second | Tokens per minute |
|---|---|---|---|
| Tier 0 | $0 | 150 | 50M |
| Tier 1 | $50 | 172 | 53M |
| Tier 2 | $250 | 208 | 60M |
| Tier 3 | $1,000 | 312 | 74M |
| Tier 4 | $5,000 | 500 | 100M |
| Enterprise | On request | On request | On request |
grok-4.6 and grok-4.5 have the same limits.
How the tiers work:
- What counts as spend: "total revenue received through prepaid credit purchases or successfully fulfilled invoices", counted from 1 Jan 2026.
- No downgrades: "Once you qualify for a tier, you stay there permanently."
- RPS and RPM: xAI derives RPS from requests per minute divided by 48, with a minimum of 2.
- What counts toward TPM: cached prompt tokens and reasoning tokens both count, even though cached tokens are billed at a lower rate.
- Scope: the tiers apply to text, embedding and voice models. For Imagine limit increases, xAI says to contact sales.
- Your own tier is shown in the xAI console.
Do cached tokens count toward Grok rate limits? Yes. xAI's rate-limits page says cached prompt tokens still count toward TPM, though they're billed at a reduced rate. Reasoning tokens count too.
Can my xAI rate-limit tier go down? No. xAI says that once you qualify for a tier, you stay there permanently.
When you do hit a limit, the error is a 429; in xai-sdk it surfaces as grpc.StatusCode.RESOURCE_EXHAUSTED. See Grok API error codes.
Which Grok models are on the xAI API?
Short answer: grok-4.7 is the newest text model. xAI still lists grok-4.6, grok-4.5, grok-4.3, the grok-4.20 models, grok-build-0.1, and the Imagine image, Imagine video and voice models.
Table: models xAI lists on its API (last checked 8 Oct 2026)
| Model ID | Context window | Notes |
|---|---|---|
grok-4.7 | 500,000 tokens | Text and image in, text out. No alias listed. Reasoning can't be turned off. |
grok-4.6 | 500K | Same price and rate limits as grok-4.7 |
grok-4.5 | 500K | Aliases grok-4.5-latest and grok-build-latest |
grok-4.3 | 1M | Alias grok-4.3-latest. Accepts reasoning_effort: "none". Batch discount applies. |
grok-4.20-0309-reasoning, grok-4.20-0309-non-reasoning, grok-4.20-multi-agent-0309 | 1M | Batch discount applies |
grok-build-0.1 | 256K | Lists grok-code-fast-1 as its alias |
grok-imagine-image, grok-imagine-image-2.0 | Imagine image models | |
grok-imagine-image-quality | Imagine image model. $0.05 per image; retires 2 Nov 2026. | |
grok-imagine-video, grok-imagine-video-1.5, grok-imagine-video-1.5-lite | Imagine video models. 1.5-lite is $0.020 per second. | |
grok-voice-think-fast-2.0 | Voice model | |
grok-voice-transcribe-2.0 | Speech to text, and now the default. grok-voice-transcribe-1.0 reached end of life on 2 Oct 2026; requests to it go to 2.0 at the same price. |
grok-4.7 is served from us-east-1, us-west-2 and us-central-1, according to its model page.
What is the context window of Grok 4.7? 500,000 tokens, with no text output limit. grok-4.6 and grok-4.5 also have 500K; grok-4.3 and the grok-4.20 models have 1M.
What happened to retired Grok model names?
Short answer: On 15 May 2026 at 12:00 PM PT, xAI retired a set of older slugs. Requests to them are now redirected: most go to grok-4.3, but grok-code-fast-1 goes to grok-build-0.1.
Table: where retired xAI slugs go now (last checked 8 Oct 2026)
| Retired slug | Now served by |
|---|---|
grok-4-1-fast-reasoning, grok-4-fast-reasoning | grok-4.3 at low reasoning effort |
grok-4-1-fast-non-reasoning, grok-4-fast-non-reasoning, grok-3 | grok-4.3 at none |
grok-4-0709 | grok-4.3 |
grok-code-fast-1 | grok-build-0.1 |
grok-imagine-image-pro | grok-imagine-image-quality, then grok-imagine-image-2.0 at low quality from 2 Nov 2026 |
The billing surprise. Old code keeps working, but it's no longer running the model its name suggests, and xAI's migration page says requests redirected to grok-4.3 are billed at grok-4.3 rates. For grok-code-fast-1, the same page contradicts itself about which rate applies, so we don't state one. Update the model ID in your code rather than relying on the redirect.
Next retirement: grok-imagine-image-quality retires on 2 Nov 2026. After that, xAI serves it with grok-imagine-image-2.0 at quality: "low" and bills at that rate, which xAI says is $0.01 per image cheaper. grok-imagine-image (1.0) isn't affected.
Why do I still see grok-4.1-fast on Vercel? Vercel's spacexai/grok-4.1-fast-* models are served by Google Vertex AI, not by xAI's API, so xAI's redirect doesn't apply to them. Details are on the channels page.
What happens if I call a retired Grok model? The request is redirected, not rejected. Most retired slugs are now served by grok-4.3, and grok-code-fast-1 is served by grok-build-0.1.
FAQ
How much does Grok 4.7 cost per million tokens?
$2 for input, $0.50 for cached input and $6 for output, below 200K prompt tokens. These are xAI's list prices on its own API.
Does Grok charge more for long prompts?
Yes. Once a prompt reaches 200K tokens, xAI bills every token in that request at the long-context rate: $4 input, $1 cached input and $12 output per million.
Is Grok 4.7 Fast available on the API?
No. xAI says Grok 4.7 Fast is available only in Cursor and Grok Build, not on the public xAI API. It costs 2x the standard token rates, or 1.5x for long-context requests, according to xAI.
Do cached tokens count toward Grok rate limits?
Yes. xAI's rate-limits page says cached prompt tokens still count toward TPM, though they're billed at a reduced rate. Reasoning tokens count too.
Can my xAI rate-limit tier go down?
No. xAI says that once you qualify for a tier, you stay there permanently.
What is the context window of Grok 4.7?
500,000 tokens, with no text output limit. grok-4.6 and grok-4.5 also have 500K; grok-4.3 and the grok-4.20 models have 1M.
What happens if I call a retired Grok model?
The request is redirected, not rejected. Most retired slugs are now served by grok-4.3, and grok-code-fast-1 is served by grok-build-0.1.
Next steps
Official sources
Facts on this page come from these pages. Prices, limits and retirements change often, so check the official page before you rely on a number.
- xAI docs: Pricing
- xAI docs: Grok 4.7 model page (price, limits, regions, Batch)
- xAI docs: Grok 4.7
- xAI docs: Models
- xAI docs: Rate limits
- xAI docs: Regional endpoints
- xAI docs: Priority processing
- xAI docs: Reasoning
- xAI docs: Release notes
- xAI docs: 15 May 2026 model retirement
- xAI docs: grok-build-0.1 model page
- xAI docs: grok-imagine-image-quality retirement (2 Nov 2026)
- xAI docs: Debugging errors
- xAI: API overview
- Vercel: Grok 4.1 Fast Reasoning model page
Checked 8 October 2026