Grok API pricing & API key
Every xAI model on one page: 11 models, from $1.85 to $2.95 per 1M input tokens. Get one Grok API key from YepAPI and pay per request — no subscription, no xAI account or waitlist.
Takes 30 seconds.
Grok API pricing (11 models)
YepAPI prices per 1M tokens (text) or per output (media), cheapest first. Updated November 1, 2026.
Text Generation
| Model | Input / 1M | Output / 1M | Context |
|---|---|---|---|
| Grok 4.3 | $1.85 | $3.69 | 1M |
| Grok 4.20 | $1.85 | $3.69 | 2M |
| Grok 4.20 Multi-Agent | $1.85 | $3.69 | 2M |
| Grok 4.7 | $2.95 | $8.86 | 500K |
| Grok 4.6 | $2.95 | $8.86 | 500K |
Image Generation
| Model | Price |
|---|---|
| Grok Imagine Image | from $0.11/image |
| Grok Imagine Image 2.0 | from $0.13/image |
Text to Speech
| Model | Price |
|---|---|
| Grok Voice TTS 1.0 | $0.0317/1K chars |
Video Generation
| Model | Price |
|---|---|
| Grok Imagine Video 1.5 Lite | from $0.04/sec (480p) |
| Grok Imagine Video | from $0.11/sec (480p), $0.15/sec (720p) |
| Grok Imagine Video 1.5 | from $0.16/sec (480p), $0.28/sec (720p), $0.50/sec (1080p) |
All Grok models
Text Generation
Grok 4.3
Text GenerationAccess Grok 4.3 through one API key. xAI's latest model with 1M context.
Grok 4.20
Text GenerationAccess Grok 4.20 through one API key. xAI's flagship model with the largest context window.
Grok 4.20 Multi-Agent
Text GenerationAccess Grok 4.20 Multi-Agent through one API key. Multi-agent orchestration with 2M context.
Grok 4.7
Text GenerationAccess Grok 4.7 through one API key. xAI Flagship for Coding & Agents.
Grok 4.6
Text GenerationAccess Grok 4.6 through one API key. xAI Grok 4.6 Frontier Coding & STEM.
Image Generation
Video Generation
Grok Imagine Video 1.5
Video GenerationGrok Imagine Video 1.5 from $0.16/sec — 1–15 second clips at up to 1080p through one API key.
Grok Imagine Video
Video GenerationGrok Imagine Video from $0.11/sec — the budget xAI video tier with seven aspect ratios.
Grok Imagine Video 1.5 Lite
Video GenerationGrok Imagine Video 1.5 Lite from $0.04/sec — faster, cheaper xAI video at up to 1080p.
xAI API through YepAPI
YepAPI provides access to xAI models through a unified API endpoint. Instead of managing a separate xAI API key and billing account, use your single YepAPI key to call any xAI model alongside 274 other AI models from OpenAI, Anthropic, Google, Meta, and more.
All xAI models use the same OpenAI-compatible request format. Switch between models by changing the model parameter — no SDK changes, no code rewrites. Pay per token with no monthly minimums.
How to get a Grok API key
- Sign up at yepapi.com with Google or email — about 30 seconds.
- Open the dashboard and create an API key (it starts with yep_sk_).
- Call any xAI model with that key — the OpenAI-compatible /v1/ai/chat/completions endpoint for text models.
- Top up any amount; usage is billed per request.
Grok API FAQ
- How much does the Grok API cost?
- xAI models cost from $1.85 to $2.95 per 1M input tokens through YepAPI. The cheapest is Grok 4.3 ($1.85 in / $3.69 out per 1M). You pay per request with no monthly fee.
- How do I get a Grok API key?
- Sign up at yepapi.com (about 30 seconds), open the dashboard and create an API key. The one key works for all 11 xAI models and 274 models from other providers — no separate xAI account.
- What is the cheapest Grok model?
- Grok 4.3 — $1.85 in / $3.69 out per 1M.
- Which Grok model has the largest context window?
- Grok 4.20, with 2M tokens of context.
- Can I use the Grok API with the OpenAI SDK?
- Yes. Set the base URL to https://api.yepapi.com/v1/ai, use your YepAPI key, and pass the xAI model ID (for example "x-ai/grok-4.3").