xAI API
xAI's developer API for Grok models (text, coding, image/video), billed usage-based per token.
Category: Development & Code · Agent & RAG frameworks
Features
xAI exposes Grok 4 and Grok 3 through an OpenAI-compatible REST API; Grok 4 Mini and Grok 3 Mini are smaller variants at lower prices. The API provides streaming, function calling, image understanding, and image generation via Aurora.
Billing is per token; a public pricing table at x.ai/api lists all current models. $5 credit per month is included in the free tier. Real-time web search and X platform search are directly integrated into model calls.
- Grok 4 and Grok 3 models with real-time web search
- Live search across X platform posts as a built-in feature
- Image understanding and generation via Aurora from Grok 3
- Streaming and function calling with an OpenAI-compatible API
- $5 credit per month in the free tier
- Dedicated high-throughput endpoints for enterprise
Prices and plans
| Tier | Price | Period | What you get |
|---|---|---|---|
| xAI API | Beispiele: Grok 4.6 2,00 $ pro 1M Input-Token, 6,00 $ pro 1M Output-Token; Grok Build 0.1 1,00 $ / 2,00 $ pro 1M Token (Input/Output) | Custom | API access to Grok 4.6, 4.3, and Grok Build (coding) Tiered pricing by context length (under/over 200K tokens) |
Limits
Standalone, usage-based price list on docs.x.ai/docs/pricing, separate from the consumer subscription tiers in the catalog's Grok/xAI entry. Longer context (200K+ tokens) costs more. Grok Build 0.1 is the model behind the "Grok Build" coding tool.
Similar tools
FAQ
Is xAI API available for free?
Yes. A permanently free plan is published, not a time-limited trial.
Where is xAI API's vendor based?
xAI, based in USA. For data processing and privacy terms the vendor's own contract governs.
Is xAI API still active?
Live-checked against the official vendor page.
How many plans are documented for xAI API?
The catalog documents 1 plans with price, billing period, and included features.
Which use case is xAI API categorized for?
xAI API is listed in the catalog under “Development & Code.”
Where do the details about xAI API come from?
Prices, limits, and product details are documented against the listed official vendor page.
How we compare
We compare free access, paid entry, plan limits, features and the listed official sources. Unsourced figures stay marked as not published.
Only confirmed entries appear in the catalog. Prices, plans and limits come from listed official vendor pages. Missing figures stay marked as not published. Result lists are alphabetical by default and can be switched to Free access first; neither is a quality ranking. The vendor page always wins.
Edited and checked by the AI Compare team
Sources
- https://docs.x.ai/docs/pricing
- https://x.ai/api
Visit site (opens in a new tab)
Spotted an outdated figure? Vendor pages change without notice. Report an error