# Grok 4.7 API Pricing

As of October 10, 2026, Grok 4.7 costs $2.00 per 1M input tokens and $6.00 per 1M output tokens on xAI, with cache reads at $0.50 per 1M tokens. It has a 500,000-token context window and returns up to 500,000 tokens per response.

- Page: https://models.litellm.ai/models/grok-4.7
- Lab: xAI
- LiteLLM model name: `xai/grok-4.7`
- Context window: 500,000 tokens
- Max output: 500,000 tokens
- Added to LiteLLM: September 21, 2026
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| xAI | `xai/grok-4.7` | $2.00 | $6.00 | $0.50 | – | – | 500K |
| Azure AI Foundry | `azure_ai/grok-4.7` | $2.00 | $6.00 | $0.50 | – | – | 500K |
| Google Vertex AI | `vertex_ai/xai/grok-4.7` | $2.00 | $6.00 | $0.50 | – | – | 512K |
| Perplexity | `perplexity/xai/grok-4.7` | $2.00 | $6.00 | $0.50 | – | – | – |
| Amazon Bedrock (Global cross-region) | `global.xai.grok-4.7` | $2.00 | $6.00 | $0.50 | – | – | 500K |
| Amazon Bedrock (US cross-region) | `us.xai.grok-4.7` | $2.20 | $6.60 | $0.55 | – | – | 500K |

## Cost examples

1,000 requests with 2,000 input and 500 output tokens each:

- xAI: $7.00
- Azure AI Foundry: $7.00
- Google Vertex AI: $7.00
- Perplexity: $7.00

100 long-document requests with 100,000 input and 2,000 output tokens each:

- xAI: $21.20
- Azure AI Foundry: $21.20
- Google Vertex AI: $21.20
- Perplexity: $21.20

## Features

Supported: Function calling, Structured output, Image input, Reasoning, Prompt caching, Web search.

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="xai/grok-4.7",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## FAQ

### How much does Grok 4.7 cost?

Grok 4.7 costs $2.00 per 1M input tokens and $6.00 per 1M output tokens on xAI, with cache reads at $0.50 per 1M tokens. Above 200K input tokens, input costs $4.00 and output costs $12.00 per 1M tokens.

### What is the context window of Grok 4.7?

Grok 4.7 has a 500,000-token context window and returns up to 500,000 tokens per response.

### Which providers offer Grok 4.7?

Grok 4.7 is available from 5 providers through LiteLLM: xAI, Azure AI Foundry, Google Vertex AI, Perplexity and Amazon Bedrock.

### How do I call Grok 4.7 with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="xai/grok-4.7", 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.7 support?

Grok 4.7 supports function calling, structured output, image input, reasoning, prompt caching and web search.

### When did LiteLLM add Grok 4.7?

Grok 4.7 was added to LiteLLM's model price file on September 21, 2026.

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
