Per MillionLLM API prices, tracked daily

grok-code-fast-1 API Pricing

grok-code-fast-1 on xAI costs $1.00 per 1M input tokens and $2.00 per 1M output tokens (as of ).

grok-code-fast-1 API Pricing. Source: the LiteLLM price list (MIT License)
Input$1.00 / 1M tokens
Output$2.00 / 1M tokens
Cached input (read)$0.20
Cache write—
Batch input / output—
Above 200K tokens (input / output)$2.00 / $4.00
Context window256K tokens
Max output256K tokens
Supportsvision, tool calling, reasoning, prompt caching
Deprecation dateNone listed
API model idgrok-code-fast-1
In our records since

What it costs for common jobs

Estimated from the list price above (no caching or batch discount).

What it costs for common jobs. Source: the LiteLLM price list (MIT License)
JobEstimated cost
1,000 chat replies (2,000 tokens in, 500 out each)$3.00
Summarising 100 long documents (50,000 in, 1,000 out each)$5.20
1 million classification calls (300 in, 5 out each)$310.00

Try your own numbers in the LLM API cost calculator.

Price history

Similarly priced models

Sort:

Similarly priced models. Source: the LiteLLM price list (MIT License)
ModelProviderInput / 1MOutput / 1MCached input / 1MContext
grok-build-0.1xAI$1.00$2.00$0.20256K
grok-code-fastxAI$1.00$2.00$0.20256K
grok-4.20xAI$1.25$2.50$0.201M
grok-4.20-0309-non-reasoningxAI$1.25$2.50$0.201M
grok-4.20-0309-reasoningxAI$1.25$2.50$0.201M
grok-4.20-betaxAI$1.25$2.50$0.201M
grok-4.20-beta-0309-non-reasoningxAI$1.25$2.50$0.201M
grok-4.20-beta-0309-reasoningxAI$1.25$2.50$0.201M