Provider pricing

xAI AI API pricing

xAI's latest frontier model is Grok 4.7, priced at $2/M input, $0.50/M cached input, and $6/M output below 200K prompt tokens. It supports a 500K context window plus text and image input; long-context requests at or above 200K tokens use $4/$1/$12 input, cached-input, and output rates.

Founded2023
HeadquartersAustin, TX
Tracked models20

Best for

Teams building coding agents, long-running knowledge workflows, multimodal tools, or products using X platform data.

Strengths

  • Grok 4.7 targets frontier coding, agentic tasks, and knowledge work
  • 500K context with text and image input
  • Cached input costs 75% less than standard input
  • Real-time data access via X platform integration

Tracked xAI models

ModelInput $/MOutput $/MContextTierBest for
Grok 4.7$2.00$6.00500,000FlagshipFrontier coding, agentic tasks, knowledge work, and multimodal reasoning
Grok 4.6$2.00$6.002,000,000FlagshipLong-running agents, agentic coding and visual/interactive builds
Grok 4.6 Fast$4.00$12.002,000,000PremiumLatency-optimized Grok 4.6 for interactive agents
Grok 4$3.00$15.00256,000FlagshipFrontier reasoning and coding
Grok 4 Heavy$6.00$30.00256,000PremiumMulti-agent parallel reasoning — top scores on ARC-AGI and HLE
Grok 4 Mini$0.300$0.900256,000BudgetCheaper Grok 4 distilled for high-throughput chat and tools
Grok 4.1$2.00$10.002,000,000FlagshipLong-context flagship with native tool use and search
Grok 4.1 Fast$0.200$0.5002,000,000BudgetUltra-cheap with massive 2M context
Grok 4.1 Mini$0.100$0.3001,000,000BudgetSmallest 4.1 variant — RAG and high-volume classification
Grok 3$3.00$15.00131,072FlagshipPrevious-gen flagship — strong general reasoning
Grok 3 Mini$0.300$0.500131,072BudgetBudget Grok 3 for chat and lightweight agents
Grok 3 Reasoning$5.00$25.00131,072PremiumExtended chain-of-thought reasoning variant of Grok 3
Grok 2 Vision$2.00$10.0032,768Mid-tierMultimodal Grok 2 — charts, documents, and screenshots
Grok Code Fast 1$0.200$1.50256,000Mid-tierCoding-specialized Grok for IDEs and agentic dev
Grok Voice$1.00$4.0032,000Mid-tierRealtime voice-mode model for spoken interactions
Grok Image$0.070$0.0700Open SourceAurora image generation — photorealistic text-to-image
Grok 2$2.00$10.00128,000FlagshipPrevious-gen Grok with strong reasoning and search
Grok 1.5$1.00$5.00128,000Mid-tierOriginal Grok 1.5 — extended-context chat and reasoning
Grok 5$4.00$20.002,000,000PremiumNext-gen Grok flagship — agentic reasoning and native search
Grok 5 Mini$0.400$1.501,000,000Mid-tierCheaper distilled Grok 5 for high-throughput chat and tools