xAI API pricing per 1M tokens

3 xAI models, standard pay-as-you-go text pricing, last checked 2026-10-13. Example cost assumes 20M input + 5M output tokens per month.

ModelInput $/MOutput $/MContextExample $/moCheapest other-provider model at same tier or higher
Grok Build 0.1$1.0$2.0256000$30.00GLM-5.3 Flash (Together), $5.50 — saves $24.50/mo
Note: Coding-focused; <200K prompt
Grok 4.3$1.25$2.51000000$37.50GLM-5.3 Flash (Together), $5.50 — saves $32.00/mo
Note: <200K prompt; ≥200K $2.50/$5
Grok 4.7$2.0$6.0500000$70.00Mistral Large 4, $24.05 — saves $45.95/mo
Note: <200K prompt; ≥200K $4/$12

“Tier” is our rough capability judgment, not a benchmark; a cheaper model at the same tier may still be worse for your task. Official source: https://docs.x.ai/docs/models

Compare every provider on the full price table or estimate your own bill with the savings calculator.

Weekly "AI price drops" email

Placeholder only — this form collects nothing.