xAI Grok API Pricing: Grok 4 and Imagine Rates
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 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.12
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
| 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 |
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.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
| 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 |
More on grok-imagine-image-2.0
| |||
| grok-imagine-image-quality | Text, Image | $0.01 / img | 1K / 2K from $0.05 / img |
More on grok-imagine-image-quality
| |||
| grok-imagine-image | Text, Image | $0.002 / img | 1K / 2K at $0.02 / img |
More on grok-imagine-image
| |||
| grok-imagine-video-1.5 | Text, Image, Audio | $0.01 / img | 480p / 720p / 1080p from $0.08 / sec |
More on grok-imagine-video-1.5
| |||
| grok-imagine-video-1.5-lite | Text, Image | $0.01 / img | 480p / 720p / 1080p from $0.02 / sec |
More on grok-imagine-video-1.5-lite
| |||
| grok-imagine-video | Text, Image, Video | $0.01 / sec, $0.002 / img | 480p / 720p from $0.05 / sec |
More on grok-imagine-video
| |||

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. 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