Grok 4.20 API Pricing
As of October 10, 2026, Grok 4.20 costs $1.25 per 1M input tokens and $2.50 per 1M output tokens on xAI, with cache reads at $0.20 per 1M tokens. Across 2 providers on LiteLLM, the input price ranges from $1.25 to $3.00. It has a 1,000,000-token context window and returns up to 1,000,000 tokens per response.
- Input
- $1.25 / 1M tokens
- Output
- $2.50 / 1M tokens
- Cache read
- $0.20 / 1M tokens
- Context window
- 1,000,000 tokens
- Max output
- 1,000,000 tokens
- Providers
- 2
- Added to LiteLLM
- April 2026
Grok 4.20 pricing by provider
3 listings across 2 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.
| Provider | Model name in LiteLLM | Input | Output | Cache read | Batch in | Batch out | Context |
|---|---|---|---|---|---|---|---|
| xAI | xai/grok-4.20 | $1.25 | $2.50 | $0.20 | $1.00 | $2.00 | 1M |
| xAIsnapshot 0309 | xai/grok-4.20-0309 | $1.25 | $2.50 | $0.20 | $1.00 | $2.00 | 1M |
| Oracle Cloud (OCI) | oci/xai.grok-4.20 | $3.00 | $15.00 | – | – | – | 128K |
Other Grok 4.20 prices on xAI
| Input above 200K tokens | $2.50 per 1M tokens |
| Output above 200K tokens | $5.00 per 1M tokens |
| Cache read above 200K tokens | $0.40 per 1M tokens |
What Grok 4.20 costs in practice
1,000 requests with 2,000 input and 500 output tokens each
| xAI | $3.75 |
| Oracle Cloud (OCI) | $13.50 |
| xAI batch | $3.00 |
100 long-document requests with 100,000 input and 2,000 output tokens each
| xAI | $13.00 |
| Oracle Cloud (OCI) | $33.00 |
Grok 4.20 features
- Function calling
- Structured output
- Image input
- Reasoning
- Prompt caching
- Web search
Use Grok 4.20 with LiteLLM
Call Grok 4.20 through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.
from litellm import completion
response = completion(
model="xai/grok-4.20",
messages=[{"role": "user", "content": "Hello!"}],
)model_list:
- model_name: grok-4.20
litellm_params:
model: xai/grok-4.20
api_key: os.environ/XAI_API_KEYcurl http://0.0.0.0:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-1234" \
-d '{
"model": "grok-4.20",
"messages": [{"role": "user", "content": "Hello!"}]
}'Grok 4.20 FAQ
How much does Grok 4.20 cost?
Grok 4.20 costs $1.25 per 1M input tokens and $2.50 per 1M output tokens on xAI, with cache reads at $0.20 per 1M tokens. Batch requests cost $1.00 per 1M input tokens and $2.00 per 1M output tokens. Above 200K input tokens, input costs $2.50 and output costs $5.00 per 1M tokens. Across 2 providers on LiteLLM, the input price ranges from $1.25 to $3.00.
What is the context window of Grok 4.20?
Grok 4.20 has a 1,000,000-token context window and returns up to 1,000,000 tokens per response.
Which providers offer Grok 4.20?
Grok 4.20 is available from 2 providers through LiteLLM: xAI and Oracle Cloud (OCI). The lowest price is on xAI.
How do I call Grok 4.20 with an OpenAI-compatible API?
Use the LiteLLM Python SDK with model="xai/grok-4.20", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.
What features does Grok 4.20 support?
Grok 4.20 supports function calling, structured output, image input, reasoning, prompt caching and web search.
When did LiteLLM add Grok 4.20?
Grok 4.20 was added to LiteLLM's model price file in April 2026.
Sources
Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:
- api.x.ai/v1/language-models
- www.oracle.com/artificial-intelligence/generative-ai/generative-ai-service/pricing
LiteLLM docs: xAI, Oracle Cloud (OCI).
Provider pages: xAI, Oracle Cloud (OCI).
