All insights

Pricing and plans

Is the Grok API Free? xAI Pricing, Credits, and Costs

Find out what xAI’s public materials say about free API access, how Grok 4.7 token prices work, and how separately billed search tools affect a production budget.

Illustration for Grok api free

Short answer: xAI describes production API use as usage-based and says to load credits to get started. Its public materials reviewed on November 9, 2026, do not establish a generally available free API quota or guaranteed signup credit. xAI does include a playground with accounts, but that does not establish free production API usage. Promo codes may be available to some users; check your account rather than budgeting for an unconfirmed offer.

Current Grok API prices

xAI’s published rates are in USD per 1 million tokens. For grok-4.7, the listed prices are: (docs.x.ai)

grok-4.7 usage Input Cached input Output
Prompt below 200,000 tokens $2.00 $0.50 $6.00
Prompt at or above 200,000 tokens $4.00 $1.00 $12.00

When a prompt reaches the model’s long-context threshold, xAI says the higher rates apply to all tokens in that request, not just the tokens above the threshold. Requests through the US regional endpoint are billed at 1.1× the global token rates. Check the live xAI pricing page before budgeting, since prices can change. (docs.x.ai)

Example budget

Assume a month of requests uses 1 million uncached input tokens and 1 million output tokens, stays below the long-context threshold, and uses no separately billed tools:

  • Input: 1 × $2 = $2
  • Output: 1 × $6 = $6
  • Estimated total: $8 at global rates, before other charges

At the listed US regional rate, the same token volume would cost $8.80. These are calculations from the published rates, not a quote or measured bill.

Remember tool charges

Server-side tools can add charges on top of token usage. The xAI pricing page describes tool invocations as a separate billing component. For Web Search, a November 4, 2026 third-party article reports $5 per 1,000 calls; treat that amount as a provisional estimate and confirm it in the live pricing details before relying on it. (docs.x.ai)

For X Search, xAI’s documentation lists $5 per 1,000 posts fetched and $10 per 1,000 user profiles fetched, in addition to token charges. This is billed by fetched results, not simply by the number of search requests. (docs.x.ai)

Tool Charge Basis
Web Search (web_search) $5, provisionally reported Per 1,000 calls; third-party report, Nov. 4, 2026
X Search (x_search) $5 Per 1,000 posts fetched, per xAI documentation
X Search (x_search) $10 Per 1,000 user profiles fetched, per xAI documentation

So, 1,000 Web Search calls would add $5 at the reported rate, while fetching 1,000 X posts would add $5 at xAI’s published rate. Search-heavy requests can incur both tool and token charges. Confirm Web Search’s current rate and applicable billing terms before setting a production budget.

Are free credits available?

The public xAI API pages describe usage-based billing, and the quickstart tells developers to load credits. The billing guide says users can enter a promo code if they have one; it does not establish a universal signup credit or recurring credit offer. The current public materials reviewed here therefore do not confirm whether a generally available promotion exists or specify its eligibility, amount, expiration, or conditions. Check your xAI Console for any offer attached to your account before counting it toward a budget. (x.ai)

The playground included with an account is useful for trying the product, but its inclusion does not show that production API calls have a free quota. Likewise, a third-party provider’s trial or credits are not an xAI API offer. (x.ai)

Is free Grok chat the same as a free API?

No. xAI’s account FAQ says that users can share an account between Grok and the API, but billing is separate. A consumer subscription does not, by itself, confirm that metered production API usage is included. Check the terms for the specific subscription and the API billing shown in your Console. (docs.x.ai)

How API billing works

xAI offers prepaid API credits and monthly invoicing. Its billing guide says invoicing is disabled by default; with a $0 invoiced limit, requests are rejected after prepaid credits are depleted. The Console also supports auto top-ups, with a $5 minimum top-up. Review your team’s billing settings and limits before sending production traffic. (docs.x.ai)

Bottom line: Budget for production API usage as paid unless your Console confirms an applicable credit or offer. For a basic grok-4.7 estimate below the long-context threshold, multiply uncached input tokens by $2 per million and output tokens by $6 per million. Add any applicable regional premium and tool charges separately, and verify current rates and credit terms before committing a budget.

Sources

API Pricing | SpaceXSI Docs

X Search | SpaceXSI Docs

Billing, Credits & Invoices | SpaceXSI Docs

Grok API Quickstart | SpaceXSI Docs

FAQ - API Accounts (Console) | SpaceXSI Docs

SpaceXSI API: Grok Models, API Keys & Pricing

How to Get a Grok (xAI) and Groq API Key — and Connect It

Contact us