Overview
xAI sells API access to its Grok models. The current list includes grok-4.7, 4.6 and 4.5 (500K context), grok-4.3 and the grok-4.20-0309 reasoning, non-reasoning and multi-agent models (1M context), and grok-build-0.1, a coding model with a 256K window. Cached input is priced at a quarter or less of the input rate.
Prices are per million tokens and double once a request reaches 200K tokens, so long-document work costs more than the headline rate suggests. grok-4.3 costs $1.25 in and $2.50 out below that threshold; grok-4.7 costs $2 in and $6 out.
You can pay by buying credits in advance, which are drawn down per request, or by monthly invoice. Invoiced accounts start with a $0 monthly limit that you raise yourself, and the console warns at 80% of it; auto top-up of credits can also be capped per month. There is no published batch discount on the pages read, so large offline jobs cost the same per token as interactive calls.
Pricing and plans
| Plan | Price | What you get |
|---|---|---|
| grok-4.7 | $2 in / $6 out per 1M | Cached input $0.50; 500K context; $4 / $12 at 200K+ tokens |
| grok-4.5 | $2 in / $6 out per 1M | Cached input $0.30; 500K context |
| grok-4.3 | $1.25 in / $2.50 out per 1M | Cached input $0.20; 1M context |
| grok-4.20-0309 (reasoning / non-reasoning) | $1.25 in / $2.50 out per 1M | 1M context |
| grok-build-0.1 | $1 in / $2 out per 1M | Coding model; 256K context |
What it does
- Long context
- Up to 1M tokens on grok-4.3 and grok-4.20 models; 500K on grok-4.5 to 4.7.
- Cached input pricing
- Repeated prompt prefixes billed from $0.20 per 1M tokens on grok-4.3.
- Multi-agent model
- grok-4.20-multi-agent-0309 is listed at the same price as the single-agent 4.20 models.
- Prepaid or invoiced billing
- Pre-purchase credits or receive a monthly invoice with a spending limit you control.
- Spend warnings
- Console warnings at 80% of the monthly spending limit; auto top-up can be capped.
Strengths and limitations
Strengths
- grok-4.3 pairs a 1M-token context window with a $2.50 per 1M output price.
- Prepaid credits make it possible to cap exposure exactly.
- Invoiced spending limit starts at $0, so there is no open-ended bill by default.
Limitations
- No permanent free tier is published on xAI's pages.
- Requests of 200K tokens or more cost twice the standard rate.
- Only xAI's own Grok models are available.
- No EU data-residency option was found on the pages read.
Who it suits
Good for
- Apps built specifically on Grok models
- Long-context workloads under 200K tokens per request
Look elsewhere if
- Hobby projects that need a free allowance
- Teams needing EU-only processing
Alternatives to xAI API (Grok)
| Tool | From | Free option | Stages |
|---|---|---|---|
| OpenRouter Model router (unified API) | — | Free tier | |
| Claude API AI model API (model maker) | Usage-based | ||
| Scaleway Generative APIs Inference provider (EU-hosted open-weight models) | Usage-based | ||
| Replicate Model hosting API (image, video, audio and LLMs) | $0.09/hr | ||
| Mistral API (Mistral Studio) AI model API (model maker) | Usage-based | Free tier | |
| OpenAI API AI model API (model maker) | Usage-based |
Questions
How much does the Grok API cost?
On 2026-09-29 grok-4.3 cost $1.25 per 1M input tokens and $2.50 per 1M output tokens below 200K tokens; grok-4.7 cost $2 and $6.
Does the xAI API have a free tier?
xAI's own model and billing pages read on 2026-09-29 do not list a free tier; credit offers mentioned elsewhere could not be confirmed there.
Can I prepay for the xAI API?
Yes. You can pre-purchase credits that API usage draws down, or choose monthly invoicing with a spending limit.
Sources read for this page