xAI flagship model with real-time reasoning and computer vision capabilities
grok-2| Scenario | Input Tokens | Output Tokens | Uncached Cost | With Prompt Caching |
|---|---|---|---|---|
| Short Chat Query | 1,000 | 500 | $0.00700 | N/A |
| Document Summarization | 10,000 | 2,000 | $0.0400 | N/A |
| Codebase & Context Analysis | 100,000 | 20,000 | $0.4000 | N/A |
| Batch Corpus Processing | 1,000,000 | 100,000 | $3.00 | N/A |
Ideal for production workloads demanding flagship capabilities, deep context depth (128k tokens), and reliability from xAI. Excellent when predictable tokenomics and prompt caching support are paramount.
If your use-case requires sub-second streaming latency or ultra-high frequency classification at micro-cent pricing, consider lighter budget options such as Gemini Flash-Lite or Claude Haiku. For deep formal logic, consider dedicated reasoning models like o3.
For Grok 2, 1 million input tokens costs $2.00, while 1 million output tokens costs $10.00. If using prompt caching, repetitive input prefixes are discounted to $2.00 per million.
Grok 2 features a maximum context window of 131,072 tokens (~98,304 words), with a maximum output limit of 8,192 tokens per completion.
Grok 2 utilizes the xAI Byte-level BPE (~131k vocabulary). Token counting on TokenMath runs client-side to ensure maximum privacy.
No, Grok 2 does not currently advertise prompt caching discounts on its standard API tier.