Grok Code Fast vs GPT-4.1: Pricing Comparison
Compare pricing, capabilities, and costs for your LLM workloads.
xAI
Grok Code Fast
Pricing (per 1M tokens)
Input$0.2000
Output$1.50
Cached Input$0.0200
Context & Output
Context Window256K tokens
Max Output32.8K tokens
Capabilities
Categorymid
Multimodaltext
Fine-tuningNo
StreamingYes
OpenAI
GPT-4.1
Pricing (per 1M tokens)
Input$2.00
Output$8.00
Cached Input$0.5000
Batch Input$1.00
Batch Output$4.00
Context & Output
Context Window1.0M tokens
Max Output32.8K tokens
Capabilities
Categoryflagship
Multimodaltext + image
Fine-tuningYes
StreamingYes
Quick Verdict
Cheaper Input Price
Grok Code Fast
90.0% cheaper
Cheaper Output Price
Grok Code Fast
81.3% cheaper
Larger Context Window
GPT-4.1
+791.6K tokens
Cost Comparison
Sample workload: 1,000,000 input tokens + 1,000,000 output tokens
Grok Code Fast
$1.70
$0.2000/1M input + $1.50/1M output
GPT-4.1
$10.00
$2.00/1M input + $8.00/1M output
Grok Code Fast is 83.0% cheaper for this workload.
Frequently Asked Questions
Which is cheaper, Grok Code Fast or GPT-4.1?
For input tokens, Grok Code Fast is cheaper at $0.2000 per 1M tokens. For output tokens, Grok Code Fast is cheaper at $1.50 per 1M tokens. The overall cost depends on your workload's input/output ratio.
What is the context window size of Grok Code Fast vs GPT-4.1?
Grok Code Fast has a context window of 256K tokens, while GPT-4.1 has 1.0M tokens. GPT-4.1 supports a larger context window of 1.0M tokens, which is beneficial for processing longer documents.
Need more tools?
Explore our complete suite of LLM calculators and comparison tools.