Skip to main content
RapidDev - Software Development Agency
AI API Limits & Performance Matrix11 min readVerified July 10, 2026

Grok 4 API Rate Limits, Pricing & Performance (July 2026)

Grok 4 was retired on May 15, 2026. Deprecated slugs now redirect to Grok 4.3 billing; xAI's current flagship is Grok 4.5 (launched July 8, 2026). Below are Grok 4.5 limits: 150 RPS / 50M TPM on production tiers, 500K-token context, $2.00 input / $6.00 output per MTok with cached input at $0.50/MTok (75% off). No free API tier. EU access expected mid-July 2026.

4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members

Deprecated model

Sunsets May 15, 2026

Grok 4 was retired on May 15, 2026. The deprecated slugs (grok-4, grok-4.1-fast, grok-code-fast-1) were redirected to Grok 4.3 billing at retirement; Grok 4.3 was itself subsequently superseded by Grok 4.5, which launched on July 8, 2026. New projects should target the Grok 4.5 API string (verify exact name on docs.x.ai). The page below covers Grok 4.5 limits and pricing — the current xAI flagship.

Migrate to:Grok 4.5Current xAI flagship at identical output cost ($6.00/MTok) with 500K context, real-time X grounding, and reasoning modes — launched July 8, 2026.
xAIGenerally available

API model string

grok-4.5 (verify exact string on docs.x.ai; grok-4 slug deprecated and redirects to grok-4.3 billing)

Context window

500K tokens (requests >200K may bill at a higher unpublished rate)

Max output not published

Knowledge cutoff
not published
Released
July 8, 2026
Modalities
text, image in; text out

Last verified July 10, 2026

Rate limits by tier

Grok 4 was retired May 15, 2026; the limits below describe its current successor Grok 4.5. xAI uses cumulative-spend tiers that unlock automatically — tiers never downgrade, and specific spend thresholds are not published per-model. Check the xAI Console Rate Limits page for your personalized caps.

TierRequirementsRPMTPMRPDConcurrentNotes
Production (default, cumulative spend)Recharge any amount; cumulative spend since Jan 1, 2026 governs tier1,800 RPM (older Grok 4.20-era docs, model-dependent — verify in xAI Console)50M tokens/minute (Grok 4.5 documented cap for us-east-1/us-west-2)not publishednot publishedHigher caps available via request form on xAI Console (docs.x.ai). EU API access for Grok 4.5 expected mid-July 2026 — not available at launch.
Enterprise / High-spendHigher cumulative spend; contact sales@x.ai for Voice/Imagine limit increasesnot published (submit request form at docs.x.ai)not publishednot publishednot publishedPersonalized limits shown on xAI Console Rate Limits page. Tier caps scale exponentially with cumulative spend.

Swipe the table sideways to see every limit column.

  • 1.Limits are per-model with hard RPS and TPM caps; caps scale exponentially with cumulative-spend tier.
  • 2.API billing is independent of X Premium/SuperGrok consumer subscriptions.
  • 3.No free API tier — the old $150/month credit program ended May 2025.
  • 4.Grok 4 slug (grok-4) is deprecated and redirects to grok-4.3 billing; Grok 4.3 has since been superseded by Grok 4.5.

Limits verified against the xAI docs, July 10, 2026.

Token pricing

What you pay per million tokens (USD). Input and output are billed separately.

Input

$2.00

per 1M tokens

Output

$6.00

per 1M tokens

Cached input

$0.50

per 1M cached

  • Cached input $0.50/MTok (75% off the $2.00 standard rate).
  • Batch discount not available for Grok 4.5 at launch.
  • Requests using more than 200K tokens within the 500K context window bill at a higher unpublished rate — budget conservatively for full-window requests.
  • Server-side tools billed separately: Web/X Search and Code Execution $5/1,000 calls; File Attachments $10/1,000 calls; Collections Search $2.50/1,000 calls.
  • A $0.05 fee applies per request flagged for a usage-policy violation.
  • Reasoning (thinking) tokens are billed as output tokens and can spike unexpectedly — set reasoning_effort=low or med for non-critical calls.

Side-project chatbot

$16

per month

Assumptions

5M input tokens / 1M output tokens per month

5 × $2.00 + 1 × $6.00 = $10 + $6 = $16/month

Mid-scale RAG pipeline

$129

per month

Assumptions

60M input / 12M output per month, 70% cached reads at $0.50/MTok

(18M × $2.00 + 42M × $0.50) / 1M + 12M × $6.00 / 1M = $36 + $21 + $72 = $129/month

High-throughput agentic system

$1,280

per month

Assumptions

400M input / 80M output per month

400 × $2.00 + 80 × $6.00 = $800 + $480 = $1,280/month

Run your own numbers

Drag your real monthly token volumes and watch the bill update live — priced against rival models at the same usage.

30M
1M500M
5M
0.1M100M

Estimated grok-4.5 (verify exact string on docs.x.ai; grok-4 slug deprecated and redirects to grok-4.3 billing) spend

$90/mo

Input: $60

Output: $30

30M in × $2.00 + 5M out × $6.00 = $90

Same volume, priced across models

  • Qwen3-MaxCheapest$66
  • grok-4.5 (verify exact string on docs.x.ai; grok-4 slug deprecated and redirects to grok-4.3 billing)This model$90
  • Claude 4 Opus$275
  • GPT-5$300

Rivals priced at their published input/output rates for the same monthly volumes. Prompt caching is model-specific, so it is applied to grok-4.5 (verify exact string on docs.x.ai; grok-4 slug deprecated and redirects to grok-4.3 billing) only. Estimates for comparison; real bills vary with request shape and long-context surcharges.

grok-4.5 (verify exact string on docs.x.ai; grok-4 slug deprecated and redirects to grok-4.3 billing) vs the alternatives

Grok 4.5 (successor) vs GPT-5.5, Claude Opus 4.8, and Qwen3-Max on the metrics that matter for production API use.

Aspectgrok-4.5 (verify exact string on docs.x.ai; grok-4 slug deprecated and redirects to grok-4.3 billing)GPT-5Claude 4 OpusQwen3-Max
Context window500K tokens~1M tokens (GPT-5.5)1M tokens (Claude Opus 4.8)262K tokens (Qwen3-Max)
Input $/MTok$2.00$5.00 (GPT-5.5)$5.00 (Claude Opus 4.8)$1.20 (Qwen3-Max)
Output $/MTok$6.00$30.00 (GPT-5.5)$25.00 (Claude Opus 4.8)$6.00 (Qwen3-Max)
Cached input $/MTok$0.50 (75% off)$0.50 (90% off) (GPT-5.5)$0.50 (90% off) (Claude Opus 4.8)not published (Qwen3-Max)
Batch discountnone at launch50% (GPT-5.5)50% (Claude Opus 4.8)50% (Qwen3-Max)
Max RPS (top published tier)150 RPS / 50M TPMnot published (GPT-5.5)not published (Claude Opus 4.8)not published (Qwen3-Max)
Free API tiernono (GPT-5.5)no (Claude Opus 4.8)1M trial/model (Qwen3-Max)
EU availabilitymid-July 2026 (TBD)yes (GPT-5.5)yes (Claude Opus 4.8)yes — Frankfurt (Qwen3-Max)

Swipe the table sideways to see every model.

Hitting a 429? The playbook

The exact errors you'll see

HTTP 429 Too Many RequestsRateLimitError (OpenAI-SDK compatible — raised when any RPS or TPM cap is exceeded)xAI docs note: exceeding any RPS or TPM cap returns HTTP 429

Why it happens & how to fix it

Burst exceeds 150 RPS hard cap

Reduce concurrency; spread requests over time with a token-bucket or semaphore; implement exponential backoff starting at 2^attempt seconds.

TPM cap hit (50M TPM on Grok 4.5)

Reduce token-heavy requests; cache system prompts (cached input counts at $0.50 and reduces effective TPM load); note batch is excluded on Grok 4.5 at launch.

Thinking/reasoning tokens spike output volume unexpectedly

Set reasoning_effort=low or reasoning_effort=med for non-critical calls; monitor output token counts per request in the xAI Console.

Server-side tool calls accumulate above budget

Count tool calls (Web/X Search, Code Execution) separately from token budget at $5/1,000 calls; batch multiple lookups into a single tool call where possible.

Retry strategy

xAI does not document a Retry-After response header — implement exponential backoff unconditionally. The official xAI docs example uses wait = 2 ** attempt seconds. Catch RateLimitError from the OpenAI SDK (swap base_url to https://api.x.ai/v1), wait, then retry. Cap max retries at 5–7 to avoid runaway loops. Add random jitter (±20%) to prevent thundering-herd when multiple workers hit the cap simultaneously.

retry.ts
1import OpenAI from 'openai';
2
3const client = new OpenAI({
4 apiKey: process.env.XAI_API_KEY,
5 baseURL: 'https://api.x.ai/v1',
6});
7
8async function chatWithRetry(
9 messages: OpenAI.Chat.ChatCompletionMessageParam[],
10 maxRetries = 6
11): Promise<string> {
12 for (let attempt = 0; attempt < maxRetries; attempt++) {
13 try {
14 const response = await client.chat.completions.create({
15 model: 'grok-4.5',
16 messages,
17 });
18 return response.choices[0].message.content ?? '';
19 } catch (err) {
20 if (err instanceof OpenAI.RateLimitError && attempt < maxRetries - 1) {
21 const wait = Math.pow(2, attempt) * 1000 * (1 + Math.random() * 0.2);
22 console.warn(`Rate limit hit — waiting ${Math.round(wait)}ms (attempt ${attempt + 1})`);
23 await new Promise((r) => setTimeout(r, wait));
24 } else {
25 throw err;
26 }
27 }
28 }
29 throw new Error('Max retries exceeded');
30}

How to raise your limits

The ladder from the starter tier to enterprise — what each rung takes, and what it unlocks.

1

Entry (any recharge)

Automatic — tiers unlock as cumulative spend crosses thresholds; no manual request needed.

Recharge any amount to activate API access; cumulative spend since January 1, 2026 governs which tier you are on — thresholds not published per-model, check xAI Console Rate Limits page.

Unlocks: Production API access with default RPS/TPM caps; tiers never downgrade.

2

Higher RPS / TPM via request form

Days to weeks — review by xAI team.

Submit the rate-limit increase request form on the xAI Console (docs.x.ai) with your use case and expected volume.

Unlocks: Elevated per-model RPS and TPM beyond default documented caps.

3

Enterprise / Voice / Imagine

Custom negotiation — typically 1–4 weeks.

Contact sales@x.ai directly; mention specific product (Voice API or Imagine) and expected volume.

Unlocks: Custom rate limits, SLAs, dedicated infrastructure, and access to Voice/Imagine endpoints.

4

EU region access

Expected mid-July 2026 per xAI announcement.

Monitor docs.x.ai for EU endpoint availability (announced for mid-July 2026 but not yet live as of July 10, 2026).

Unlocks: GDPR-compliant EU-region inference, required for many EU enterprise customers.

Cut your token spend

Cache the system prompt

-75% on repeated-prompt input cost ($0.50 vs $2.00/MTok)

Cache stable system context — instructions, persona, retrieved docs — using xAI's cached input feature. Especially high-impact in agentic loops where the same system prompt appears on every call.

Set reasoning_effort=low for classification and routing tasks

Avoid unexpected output-token spikes from thinking mode

Grok 4.5 reasoning tokens are billed as output at $6.00/MTok and can inflate output volume dramatically. Use reasoning_effort=low or med for non-critical calls; reserve high for complex reasoning tasks.

Minimize tool call frequency

Avoids $5/1,000 calls surcharge for Web/X Search and Code Execution

Batch multiple lookups into a single tool invocation. Prefer in-context text over File Attachments ($10/1,000 calls) for documents under 100K tokens.

Stay under 200K tokens per prompt where possible

Avoids unpublished higher rate triggered above 200K within the 500K window

Split long documents into chunked calls of under 200K tokens. If full-window context is necessary, budget conservatively — the >200K rate is not published.

Monitor RPS not just RPM

Prevents 429s even when total TPM headroom remains

xAI caps at 150 RPS hard; a burst of parallel requests can 429 even if you are well under 50M TPM. Introduce a concurrency limiter (e.g., semaphore at 100–120 concurrent) upstream of the API client.

Track per-request policy flags

Avoids $0.05/flagged-request fee accumulating in batch workflows

Review content for policy compliance before submission, especially in high-volume batch or agentic pipelines. Monitor flagged-request counts in the xAI Console.

Use file attachments strategically

Save $10/1,000 calls vs repeated attachment uploads

Prefer extracting text and passing it in-context (counts as input tokens at $2.00/MTok) for documents you read fewer than ~5K times/month; switch to file attachments only for very large or binary assets where in-context text is impractical.

Frequently asked questions

Is Grok 4 still available via the API?

No. Grok 4 was retired on May 15, 2026. The deprecated grok-4 slug redirects to Grok 4.3 billing, which has itself been superseded by Grok 4.5 (launched July 8, 2026). If you are calling grok-4 in production, update your model string to the current Grok 4.5 API name — verify the exact string on docs.x.ai.

How do I increase my Grok 4.5 rate limits?

Tiers unlock automatically as your cumulative API spend (since January 1, 2026) crosses thresholds — no manual request needed for standard tier advances. To go beyond default caps (150 RPS / 50M TPM), submit the rate-limit increase request form on the xAI Console at docs.x.ai. For Voice or Imagine endpoints, contact sales@x.ai directly.

Is the Grok 4.5 API free?

No. xAI ended its $150/month free credit program in May 2025. There is no free API tier for Grok 4.5. You must recharge your xAI account to access the API; billing starts at $2.00/MTok input and $6.00/MTok output.

How does Grok 4.5 pricing compare to GPT-5 and Claude Opus?

Grok 4.5 is significantly cheaper on output: $6.00/MTok vs GPT-5.5's $30.00/MTok (5× cheaper) and Claude Opus 4.8's $25.00/MTok (4× cheaper). Input is $2.00/MTok vs $5.00 for both rivals. Grok 4.5 does not offer a batch discount at launch, while both GPT-5.5 and Opus 4.8 offer 50% off for batch. For teams outside the EU, the lack of EU endpoints as of July 10, 2026 is a constraint.

What does the HTTP 429 error mean on the xAI API?

HTTP 429 Too Many Requests means you have exceeded either the hard RPS cap (150 requests/second for Grok 4.5) or the TPM cap (50M tokens/minute). The OpenAI-compatible SDK raises this as RateLimitError. xAI does not send a Retry-After header, so implement exponential backoff unconditionally: wait 2^attempt seconds between retries, with random jitter to avoid thundering-herd.

Does Grok 4.5 support prompt caching?

Yes. Cached input is priced at $0.50/MTok — a 75% discount off the $2.00 standard input rate. Cache stable system context, instructions, and retrieved documents to cut costs dramatically in agentic loops. Note: requests using more than 200K tokens may bill at a higher unpublished rate; keep prompts under 200K where possible.

Is Grok 4.5 available in the EU?

Not as of July 10, 2026. xAI announced EU API access for Grok 4.5 for mid-July 2026, but it was not available at launch. EU teams should monitor docs.x.ai for the availability update. If EU data residency is a hard requirement, consider Claude Opus 4.8 or GPT-5.5, both of which have EU endpoints available now.

Can RapidDev help us optimize Grok 4.5 API costs and quota?

Yes. RapidDev specializes in gateway architecture, caching strategies, and quota engineering for AI APIs including xAI. If you need help reducing your Grok 4.5 spend or avoiding 429 cascades in production, book a free scoping call at rapidevelopers.com/contact.

RapidDev

We build AI apps that don't hit rate limits

  • Retry, backoff & caching built in
  • Multi-provider fallback routing
  • Fixed price, you own the code
Get a free estimate

30-min call. No commitment.

Still weighing your options?

Talk to a team that ships on all of these platforms. A free consultation gets you an honest recommendation for your specific project — even if the answer is a tool, not us.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.