# xAI Grok API Pricing: Grok 4 and Imagine Rates

URL: https://3ammarketer.com/blog/xai-grok-api-pricing
Published: 2026-11-03

> A complete price guide to xAI API rates across text, voice, and visual generation models, including Grok 4.7, Voice API, and Imagine models.

The flagship Grok 4.7 model costs $2.00 per 1 million input tokens and $6.00 per 1 million output tokens. For teams designing voice agents or multimodal media pipelines, xAI also bills Speech to Speech at $0.08 per minute and starts image generation from $0.02 per image. [1]

## Understanding the xAI API billing model

xAI uses usage-based pricing billed per token, with prepaid credits and enterprise invoicing available. Developers forecast basic text generation by counting raw context consumption alongside completion output, while voice generation and video synthesis introduce separate billing meters based on duration or media inputs. [1]

Because prompt accumulation directly scales token consumption in multi-turn conversations, managing context sizing controls baseline inference spend. Teams managing sustained agent conversations can review [what is a context window in AI](/blog/what-is-a-context-window-in-ai) to gauge buffer allocations against large prompt histories. Grok 4.7 supports a context window of 500k tokens and carries a knowledge cutoff date of May 2026. [1][2]

## Text model pricing index

Across the primary Grok text tier, token costs depend heavily on model class. From our data, captured on 2026-10-13, flagship releases like grok-4.7, grok-4.6, and grok-4.5 all share identical token rates at $2 per million input tokens and $6 per million output tokens. Our historical data also tracked earlier mid-tier reasoning and non-reasoning versions, which price input and output symmetrically lower. [3]

xAI text model pricing across Grok versions [1][3]

| Model | Input Price / 1M Tokens | Output Price / 1M Tokens |
| --- | --- | --- |
| grok-4.7 | $2.00 | $6.00 |
| grok-4.6 | $2.00 | $6.00 |
| grok-4.5 | $2.00 | $6.00 |
| grok-4.3 | $1.25 | $2.50 |
| grok-4.20 reasoning | $1.25 | $2.50 |
| grok-4.20 non-reasoning | $1.25 | $2.50 |
| grok-4.20 multi-agent | $1.25 | $2.50 |
| grok-build-0.1 | $1.00 | $2.00 |

Output costs per 1 million tokens across Grok model versions as of October 2026. [3]

- grok-4.7: 6 $/1M tokens
- grok-4.6: 6 $/1M tokens
- grok-4.5: 6 $/1M tokens
- grok-4.3: 2.5 $/1M tokens
- 4.20 R: 2.5 $/1M tokens
- 4.20 NR: 2.5 $/1M tokens
- 4.20 MA: 2.5 $/1M tokens
- build-0.1: 2 $/1M tokens

Input costs per 1 million tokens across Grok model versions as of October 2026. [3]

- grok-4.7: 2 $/1M tokens
- grok-4.6: 2 $/1M tokens
- grok-4.5: 2 $/1M tokens
- grok-4.3: 1.25 $/1M tokens
- 4.20 R: 1.25 $/1M tokens
- 4.20 NR: 1.25 $/1M tokens
- 4.20 MA: 1.25 $/1M tokens
- build-0.1: 1 $/1M tokens

## Media generation and Voice API costs

Multimodal systems handle separate unit costs depending on whether they touch audio channels, video frames, or still graphics. The Grok Voice API offers dedicated pricing per communication mode: Speech to Speech costs $0.08 per minute, Text to Speech costs $15.00 per 1 million characters, REST Speech to Text costs $0.10 per hour, and streaming Speech to Text costs $0.20 per hour. Developers connecting automated calling systems can contrast these audio benchmarks against [real pricing and loops for business agents](/blog/ai-agents-for-business-pricing-breakdown). [1]

The Imagine model family handles image and video generation through per-item and per-second metrics instead of tokens. Rates vary based on resolution tiers, generation speeds, and media input handling. [1]

xAI Imagine visual and video generation fee breakdown [1]

| Imagine Model | Input Modalities | Media Input Cost | Output Generation Rate |
| --- | --- | --- | --- |
| grok-imagine-image-2.0 | Text, Image | $0.01 / img | 1K / 2K from $0.04 / img |
| grok-imagine-image-quality | Text, Image | $0.01 / img | 1K / 2K from $0.05 / img |
| grok-imagine-image | Text, Image | $0.002 / img | 1K / 2K at $0.02 / img |
| grok-imagine-video-1.5 | Text, Image, Audio | $0.01 / img | 480p / 720p / 1080p from $0.08 / sec |
| grok-imagine-video-1.5-lite | Text, Image | $0.01 / img | 480p / 720p / 1080p from $0.02 / sec |
| grok-imagine-video | Text, Image, Video | $0.01 / sec, $0.002 / img | 480p / 720p from $0.05 / sec |

![A table detailing the per-item and per-second pricing structure for the Imagine model family.](https://dygolixznokmekyvajbb.supabase.co/storage/v1/object/public/images/content/e580fa22d79d31bfa3a04adb.png)

## Selecting the right model for your budget

Production architecture spend hinges on matching specific task complexity to the right model class. From our data, for 1 million input plus 1 million output tokens, xAI grok-build-0.1 costs $3 while xAI grok-4.5 costs $8, which is 2.7 times as much. When running high-throughput loops, mapping lower-demand workflows to lighter models cuts baseline spend significantly. [3]

Engineering teams evaluating overall provider budgets can compare these metrics alongside the wider [LLM API pricing timeline](/data/model-pricing). Intermediate models such as grok-4.3, grok-4.20 reasoning, grok-4.20 non-reasoning, and grok-4.20 multi-agent sit at $1.25 per million input tokens and $2.50 per million output tokens, giving developers a middle tier for tasks that exceed build-0.1 capability but do not require flagship capacity. [3]

Our read: For conversational agent loops that accumulate large message queues, grok-build-0.1 at $3 total per million balanced input and output tokens is the logical default. Reserve grok-4.7 at $8 per balanced million tokens strictly for complex reasoning steps where accuracy is worth the 2.7x price multiplier.

Limit: The public documentation does not publish context window capacities for Grok legacy iterations like build-0.1 or the 4.20 family, nor does it list token cache discount ratios or volume discount commitments for enterprise invoicing.

## Sources

1. [SpaceXSI API: Grok Models, API Keys & Pricing | SpaceXSI](https://x.ai/api)
2. [Grok Models & Pricing | SpaceXSI Docs](https://docs.x.ai/docs/models)
3. [LLM API pricing timeline (3AM Marketer data set)](https://3ammarketer.com/data/model-pricing)
