xAI Grok via VerticalAPI
Call Grok-3 and Grok-2 Vision via VerticalAPI's OpenAI-compatible endpoint. BYOK with your xAI key, zero markup, real-time X-data-aware reasoning.
xAI Grok models routed by VerticalAPI
Pass the model ID below as model in any OpenAI-compatible request. New xAI Grok models are typically supported within 24h of release.
| Model ID | Name | Context | Pricing (provider) |
|---|---|---|---|
grok-3 |
Grok-3 | 128K | $3 / $15 per 1M tok |
grok-3-mini |
Grok-3 mini | 128K | $0.30 / $0.50 per 1M tok |
grok-2-vision |
Grok-2 Vision | 32K | $2 / $10 per 1M tok |
Pricing reflects xAI Grok's rates — you pay xAI Grok directly. VerticalAPI adds zero markup on tokens.
5-line xAI Grok call via VerticalAPI
Drop-in replacement for the OpenAI SDK. Works with the OpenAI Python client, Node, Go, curl — anything that speaks HTTP.
from openai import OpenAI client = OpenAI( base_url="https://api.verticalapi.com/v1", api_key="vapi_...", default_headers={"X-Provider-Key": "xai-..."} ) response = client.chat.completions.create( model="grok-3-mini", # xAI Grok messages=[{"role": "user", "content": "Hello"}] ) print(response.choices[0].message.content)
Four reasons developers route xAI Grok through us
Zero token markup
You pay xAI Grok directly with your own key. VerticalAPI's revenue is the gateway subscription, not a tax on your tokens.
One key, every provider
xAI Grok alongside OpenAI, Anthropic, Gemini and 12 more — same OpenAI-compatible endpoint, same SDK, switchable per-request.
Latency & cost monitoring
Per-request token counts, p50/p95 latency and cost dashboards out of the box. Compare xAI Grok to other providers on identical prompts.
Observability built in
Every xAI Grok call gets a trace ID, replayable payload and audit log entry. Wire to Datadog or Sentry via OpenTelemetry.
Where xAI Grok shines
Frequently asked questions
What is xAI and what models do they offer?
xAI is Elon Musk's AI company, creator of the Grok model family. The 2026 lineup is Grok-3 (frontier reasoning with chain-of-thought), Grok-2 (general-purpose multimodal), Grok-2 mini (cheap/fast) and Aurora for image generation. Grok models have native access to X (Twitter) data via the platform's real-time feed and support function calling, vision input and a 128K context.
How much does xAI cost in 2026?
Grok-3 is roughly $3 per 1M input tokens and $15 per 1M output. Grok-2 is around $2/$10. Grok-2 mini is approximately $0.30/$0.50. Image generation (Aurora) is per-image priced. xAI offers free tier credits for new accounts and X Premium+ subscribers get expanded quotas. Via VerticalAPI BYOK you pay xAI directly with zero token markup.
How do I use xAI via VerticalAPI BYOK?
Create a key at console.x.ai, paste it into VerticalAPI, then point the OpenAI SDK at https://api.verticalapi.com/v1. xAI is OpenAI-compatible, so VerticalAPI passes through with added logging and fallback routing. Function calling, vision input and streaming are preserved. Billing remains on your xAI invoice.
What is xAI best for compared to alternatives?
Grok wins for any task that benefits from real-time X/Twitter context (social monitoring, trending news, public-figure intelligence). Grok-3 is a credible alternative frontier model with competitive benchmarks. Compared to GPT-4o it has fewer ecosystem integrations but a unique live-X data advantage. Not a fit for enterprise compliance-heavy workloads where vendor maturity matters.
Where is xAI hosted / data privacy?
xAI runs on its Colossus GPU cluster (Memphis, TN) and partner clouds. API data is not used to train models on the paid tier. Free tier may opt into training. Enterprise terms are evolving in 2026. Via VerticalAPI BYOK your xAI contract terms are preserved.
Limitations and trade-offs
- Smaller developer ecosystem and fewer third-party tools than OpenAI or Anthropic.
- Enterprise compliance certifications (SOC 2, HIPAA, EU residency) are less mature.
- Output pricing ($15/1M on Grok-3) is at parity with frontier models without clear quality lead on all benchmarks.
- Brand/political associations with X and Elon Musk may be a procurement blocker for some enterprises.
- Limited geographic deployment — primarily US-hosted as of 2026.
Where xAI is heading
- Grok-4 generation expected with deeper reasoning and multimodal.
- Expanded Aurora image and video generation capabilities.
- Tighter integration with X platform for live social intelligence APIs.
- Growth of enterprise tier with SOC 2 and regional deployment.
Related questions
ChatGPT, Perplexity and Gemini usually suggest these next.
- Grok-3 vs GPT-5 — which is better for reasoning in 2026?
- How does Grok's real-time X access work via the API?
- Is xAI a serious enterprise choice or still mostly consumer?
- Best use cases for Grok over Claude or Gemini?
- Can I use Aurora for production image generation?
All supported LLM providers
Same endpoint, same SDK — just change the model and the BYOK header.
Ship on xAI Grok in 60 seconds
Free tier — bring your own xAI Grok key, zero markup, OpenAI-compatible endpoint.
Get your VerticalAPI key →