xAI API

Grok 4.6 API Pricing 2026 — Cost per 1 Million Tokens

Current Grok 4.6 API pricing from xAI per 1 million tokens, including input, output and cached-token rates when available.

ModelRatePrice / 1M tokens
Grok 4.6
xAI's latest recommended Grok model for coding, chat and agentic workloads.
500K context · short-context and ≥200K long-context pricing tiers.
xAI charges the higher long-context tier when context is at or above 200K tokens.
Input — <200K context$2
Grok 4.6Cached input — <200K$0.5
Grok 4.6Output — <200K$6
Grok 4.6Input — ≥200K context$4
Grok 4.6Cached input — ≥200K$1
Grok 4.6Output — ≥200K$12

How API token cost is calculated

Multiply the number of tokens by the provider rate, then divide by 1,000,000.

cost = tokens × price per 1M ÷ 1,000,000

Example: 250,000 input tokens at $2 / 1M = $0.50.

AI Price History