Grok API Pricing 2026: Grok 4.7, Long Context, and Tool Costs
Current Grok 4.7 API pricing, its 200K long-context threshold, cached-input rates, Priority Processing, tool costs, context limits, and migration guidance.
Grok 4.7 is xAI’s current flagship for coding, chat, and agentic tool use. It launched on September 21, 2026 under the API ID grok-4.7, with a 500K context window, text and image input, function calling, structured output, and configurable reasoning.
xAI publishes no separate text-output limit for Grok 4.7. Do not mistake the 500K context window for a maximum output size.
Current Grok API Prices
USD per million tokens:
| Model | Context | Short input | Short cached | Short output | Long input | Long cached | Long output |
|---|---|---|---|---|---|---|---|
| Grok 4.7 | 500K | $2.00 | $0.50 | $6.00 | $4.00 | $1.00 | $12.00 |
| Grok 4.6 | 500K | $2.00 | $0.50 | $6.00 | $4.00 | $1.00 | $12.00 |
| Grok 4.5 | 500K | $2.00 | $0.30 | $6.00 | $4.00 | $0.60 | $12.00 |
| Grok 4.3 | 1M | $1.25 | $0.20 | $2.50 | $2.50 | $0.40 | $5.00 |
| Grok 4.20 endpoints | 1M | $1.25 | $0.20 | $2.50 | $2.50 | $0.40 | $5.00 |
| Grok Build 0.1 | 256K | $1.00 | $0.20 | $2.00 | $2.00 | $0.40 | $4.00 |
Long pricing starts when the prompt reaches 200K tokens. At that point, xAI charges the long rate for every token in the request, not only the portion above 200K. Cached prompt tokens count toward the threshold.
Grok 4.7 vs 4.6 Pricing
Grok 4.7 keeps Grok 4.6’s published input, cached-input, and output prices. The upgrade therefore has no unit-token premium at Standard rates. Grok 4.6 had already raised cached input by 66.7% relative to 4.5, from $0.30 to $0.50 below 200K and from $0.60 to $1.00 in the long tier.
For a 4.6-to-4.7 migration, the main risk is behavioral regression rather than a higher token rate. Compare cost per successful task, reasoning-token use, latency, and tool-call behavior on a production-shaped evaluation set.
The 200K Cost Cliff
One request with 199K input and 20K output costs about $0.518 on Grok 4.7. Raising the prompt to 200K with the same output activates long pricing and costs $1.04. A small context increase can therefore nearly double the request bill.
Split independent context when possible, compact conversation history, and keep retrieved documents focused. Do not split requests if doing so harms task completion enough to create retries.
Priority Processing and Batch
Priority Processing charges 2x standard rates for input, cached input, output, and reasoning tokens. Billing uses the priority rate only when the response confirms "service_tier": "priority".
Grok 4.7, 4.6, and 4.5 currently have no Batch discount. xAI lists a 20% Batch discount for Grok 4.3 and the Grok 4.20 endpoints.
Server-Side Tool Costs
Token rates do not include xAI-hosted tool invocations:
| Tool | Price per 1,000 calls |
|---|---|
| Web Search | $5.00 |
| X Search | $5.00 |
| Code Execution | $5.00 |
| File Attachments search | $10.00 |
| Collections search | $2.50 |
| Remote MCP | Token-based; no separate invocation fee |
For example, ten Web Search calls add $0.05 before model tokens. This can dominate a short prompt.
Cost Examples
Assuming separate requests below 200K and no cache hits:
| Daily usage | Grok 4.7 | Grok 4.3 / 4.20 | Grok Build 0.1 |
|---|---|---|---|
| 100K input + 50K output | $15/month | $7.50/month | $6/month |
| 1M input + 500K output | $150/month | $75/month | $60/month |
| 10M input + 5M output | $1,500/month | $750/month | $600/month |
Grok 4.7 and 4.6 have the same published token rates, so the same token mix produces the same bill. Tool calls and Priority Processing remain additional costs.
Which Grok Model Should You Use?
- Choose Grok 4.7 for new coding, chat, and agent integrations after regression testing.
- Keep Grok 4.6 temporarily where pinned behavior matters; it has no price advantage.
- Keep Grok 4.5 only where its lower cached-input rate outweighs older model behavior.
- Choose Grok 4.3 for lower-cost general agents and 1M context.
- Choose a Grok 4.20 endpoint for pinned reasoning behavior or the multi-agent beta.
- Choose Grok Build 0.1 for a lower-cost coding-specific public beta.
Read Grok 4.7 vs Gemini 3.8 Flash and use the AI Pricing Calculator for current costs.
Official sources checked September 25, 2026: xAI pricing, Grok 4.7 docs, release notes, and Priority Processing.
Related Posts
Grok 4.7 vs Gemini 3.8 Flash: API Price, Coding, and the 200K Cost Cliff
2026-08-17
The August 2026 AI API Price War: Google Discounts as DeepSeek Raises Prices
2026-08-01
AI API Pricing Comparison (October 2026): Latest Models Side by Side
2026-02-19