Grok Code Fast 1 API pricing
As of October 16, 2026, Grok Code Fast 1 costs $1.00 per million input tokens and $2.00 per million output tokens on the xAI API. Cached input is $0.20 per million.
New Sep 22
It is the 2nd cheapest of 7 Grok models tracked here, by blended price. The closest Standard-tier model from another provider is Mistral Large 4 (Mistral) at $0.68 / $2.09; Grok Code Fast 1 is 21% more expensive. Same list price as Grok Build 0.1. First listed in the LiteLLM price data on August 28, 2025. Prompts longer than 200K tokens are billed at $2.00 input / $4.00 output.
Input / 1M tokens$1.00
Output / 1M tokens$2.00
Context window256K
Max output256K
Every published rate
| Rate | Per 1M tokens |
|---|
| Input (standard) | $1.00 |
| Output (standard) | $2.00 |
| Cached input (read) | $0.20 |
| Input, prompts over 200K tokens | $2.00 |
| Output, prompts over 200K tokens | $4.00 |
What it costs in practice
| Task | Tokens | Per request | Per 1,000 requests |
|---|
| Chatbot reply | 1,000 in / 500 out | $0.002 | $2.00 |
| Summarize a long document | 20,000 in / 1,000 out | $0.02 | $22.00 |
| Coding agent step | 50,000 in / 2,000 out | $0.05 | $54.00 |
Standard rates, no caching or batch discount; prompts over 200K tokens are billed at the higher long-prompt rate. Compare your own numbers across all models →
Price history
Dates are when each change first appeared in the LiteLLM price data, usually within days of the provider's announcement.
Details
| Provider | xAI |
| Price tier | Standard |
| Features | Vision, Reasoning, Prompt caching, Tool use |
| API model names | grok-code-fast, grok-code-fast-1, grok-code-fast-1-0825 |
| Official pricing | api.x.ai |
Models at a similar price
Other xAI models