Grok 4.3 API pricing
xAI · checked 2026-11-21 · source
Input / 1M tokens
$1.25
Output / 1M tokens
$2.5
Cached input / 1M tokens
$0.2
Context window
1,000,000
Provider
xAI
Cost per typical task
Computed from the prices above. The token counts are illustrative task sizes, not measurements.
| Task | Tokens | Arithmetic | Cost |
|---|---|---|---|
| Chat reply | 1,000 input + 300 output | 1,000 ÷ 1,000,000 × $1.25 + 300 ÷ 1,000,000 × $2.5 = $0.002000 | $0.002000 |
| Summarize a long document | 20,000 input + 1,000 output | 20,000 ÷ 1,000,000 × $1.25 + 1,000 ÷ 1,000,000 × $2.5 = $0.0275 | $0.0275 |
| Coding agent step (cached context) | 5,000 input + 40,000 cached input + 2,000 output | 5,000 ÷ 1,000,000 × $1.25 + 40,000 ÷ 1,000,000 × $0.2 + 2,000 ÷ 1,000,000 × $2.5 = $0.0192 | $0.0192 |
← Calculate the cost of your own prompt · Compare with the cheapest LLM APIs