Grok is xAI's frontier LLM family, exposed through an OpenAI-compatible API with a very large context window and live access to X data. Its headline is cost: the Grok 4.1 Fast tier is one of the cheapest frontier-class models on the market. Here's the pricing, the free credits, and how to get a key.
| Модель | Вход / 1М | Выход/1М |
|---|---|---|
| Grok 4.7 under 200K prompt | $2.00 | $6.00 |
| Grok 4.7 at/over 200K prompt | $4.00 | $12.00 |
| Grok 4.6 under 200K prompt | $2.00 | $6.00 |
| Grok 4.1 Fast самый дешевый | ~$0.20 | ~$0.50 |
| Grok 3 mini | ~$0,30 | ~$0.50 |
| Live Search (X data) | add-on, billed per source/request | |
Grok 4.6 and 4.7 both use a 200,000-token prompt cliff: cross that line and the entire request — input, cached input and output — bills at 2x, not just the tokens over the line. Cached input is $0.50/1M under the line, $1.00/1M over it. Both models are also the only ones on xAI's US regional endpoint, billed at a flat 1.1x premium on top of whichever tier applies. Full breakdown: the 200K-token cliff, priced.
xAI has typically offered promotional API credits rather than a permanent free tier — often in exchange for opting into data sharing — so the exact deal moves around. Grok chat is also included with X Premium, but that's separate from API access, which draws down a billed balance in your console. If you only need to experiment, claim whatever credit promotion is live; for production, budget per-token from the table above and price it with the calculators below.
1. Перейти к console.x.ai and sign in with your X account.
2. Add a payment method or claim available free credits.
3. Открыть API-ключи and create a new key — copy it once (it won't be shown again).
4. Because the API is OpenAI-compatible, just change the base URL.
Call it with the OpenAI SDK shape:
Grok 4.1 Fast at roughly $0.20 / $0.50 per million tokens undercuts most frontier options — cheaper on output than GPT-class mid models and far below Claude Opus. The flagship Grok 4.7 sits at $2 / $6 per million for prompts under 200,000 tokens, in the same band as GPT-5-class models, but doubles to $4 / $12 the moment a prompt crosses that line — a pricing shape none of the other frontier APIs use. If cost is the priority, Grok Fast competes with Gemini Flash and DeepSeek; if you need its X-data and reasoning, budget for the 200K cliff explicitly. See the ОпенАИ, Клод, Близнецы и ДипСик guides, then rank them for your exact token mix with the самый дешевый инструмент LLM API.
Grok 4.6 and 4.7 bill $2 / $6 per million tokens for prompts under 200,000 tokens, doubling to $4 / $12 at or over that line (the whole request, not just the overage). The cheaper Grok 4.1 Fast is ~$0.20 / $0.50 (reference, September 2026). Confirm in the xAI console.
Yes — it follows the OpenAI chat-completions shape, so you can reuse the OpenAI SDK and just point the base URL at api.x.ai/v1 and swap the model name.
Usually promotional credits rather than a permanent free tier (sometimes tied to data sharing). X Premium includes Grok chat but not API access. Check the console for the current offer.
A very large context window, strong reasoning modes, and optional Live Search over X (Twitter) data — useful for real-time and social-aware applications.
Not affiliated with xAI. Prices are reference estimates — always verify on the official pricing page.