Calculate the cost of using grok-code-fast from xAI for your AI applications
Pricing data last updated:
Mode: Chat
Max: 256,000 tokens
Max: 256,000 tokens
Built for enterprise-grade reliability, governance, and scale. Deploy in seconds.
grok-code-fast is a chat model from xAI, one of 38 chat models they offer. It is priced at $0.20 per 1M input tokens and $1.50 per 1M output tokens, ranking 608 out of 2161 chat models by cost and cheaper than 67% of models in this category. grok-code-fast supports function calling, reasoning, prompt caching. Its 256K-token context window is in the top 27% among chat models.
Note: Use the interactive calculator above to estimate costs for your specific usage patterns.
Use the maximum token limits shown above to understand the model's capacity. This model can handle up to 256,000 input tokens. The maximum output length is 256,000 tokens.
At $0.20 per 1M input tokens and $1.50 per 1M output tokens, grok-code-fast ranks 608 out of 2161 chat models by input cost. It is more affordable compared to the median of $0.55 for chat models, and is cheaper than 67% of models in this category.
grok-code-fast is one of 38 xAI chat models, with support for function calling, reasoning, prompt caching. its 256K-token context window places it in the top 27% of chat models.
| Model | Provider | Input / 1M tokens | Output / 1M tokens | vs grok-code-fast |
|---|---|---|---|---|
| gpt-5.4-nano | Azure | $0.20 | $1.25 | 0% |
| gpt-5.4-nano-2026-03-17 | Azure | $0.20 | $1.25 | 0% |
| gpt-5-mini | Azure | $0.25 | $2.00 | +25% |
Similar chat models from other providers
No. grok-code-fast costs $0.20 per 1M input tokens while gpt-5.4-nano costs $0.20 per 1M input tokens, making gpt-5.4-nano 0% more affordable for input. However, grok-code-fast may offer different capabilities or performance characteristics that justify the price difference.
grok-code-fast input pricing is $0.20 per 1M tokens, which is 64% below the median of $0.55 for chat models. It ranks 608 out of 2161 chat models by input cost, making it cheaper than 67% of models in this category. For output, it costs $1.50 per 1M tokens compared to the median of $1.44.
Among xAI's 38 chat models, grok-code-fast ranks 8 by input cost.
The most comparable chat models to grok-code-fast are: gpt-5.4-nano from Azure ($0.20/1M input tokens); gpt-5.4-nano-2026-03-17 from Azure ($0.20/1M input tokens); gpt-5-mini from Azure ($0.25/1M input tokens); gpt-5-mini-2025-08-07 from Azure ($0.25/1M input tokens). These alternatives were selected based on similar capabilities, pricing, and provider diversity. You can compare any of these models in detail using the Bifrost Model Library.
grok-code-fast supports up to 256,000 input tokens, placing it in the top 27% of chat models by context window size (rank 547 of 2086). This makes it suitable for processing long documents, extensive code repositories, or maintaining detailed conversation histories.
grok-code-fast is priced based on input and output tokens. Use the interactive calculator at the top of this page to estimate costs for your specific workload. Enter your expected input and output tokens volume and the calculator will show the total cost breakdown. For reference, processing 1M input tokens costs $0.20 and generating 1M output tokens costs $1.50.