Grok Code Fast 1

Provider: xai · xai/grok-code-fast-1

Pricing per million tokens

Component USD per 1M tokens
Input $0.20
Output $1.50
Cached input (read) $0.02

💡 With prompt caching, you save up to 90% on cached input tokens — massive for repeated context like system prompts, RAG retrieval, or long conversations.

Monthly cost estimates

Assuming 30% prompt-cache hit rate where available. Adjust for your actual usage.

Small
1M in / 200k out
$0.45
per month
Saves $0.05 via caching
Medium
10M in / 2000k out
$4.46
per month
Saves $0.54 via caching
Large
100M in / 20000k out
$44.60
per month
Saves $5.40 via caching

Context

Input window
256,000 tokens
Max output
256,000 tokens

Capabilities

  • ⬜ Vision (image input)
  • ✅ Function / tool calling
  • ✅ Prompt caching
  • ⬜ Web search
  • ⬜ JSON / response schema

Compare Grok Code Fast 1 with similar models

Pricing data sourced from LiteLLM and refreshed regularly. Last updated May 20, 2026. Always verify with the provider's official pricing page before making business decisions.