xAI Grok Code Fast 1 Cost Calculator

Model: xAI: Grok Code Fast 1, Context: 256000, Cost: $0.2 per 1M input tokens, $1.5 per 1M output tokens

Note: Calculation is approximate based on public data. Prices may change, check official websites.

The xAI Grok Code Fast 1 Cost Calculator helps you estimate the expenses for using the xAI Grok Code Fast 1 model. This model is a rapid and cost-effective reasoning engine, particularly adept at agentic coding, offering visible reasoning traces for improved development workflows.

Input tokens for Grok Code Fast 1 cost $0.2 per 1 million tokens, while output tokens are priced at $1.5 per 1 million tokens. The model supports a context window of 256,000 tokens.

The total cost is calculated using the following formula:

Total Cost = (Input Tokens / 1,000,000 * $0.2 + Output Tokens / 1,000,000 * $1.5) * Number of Requests

Example: If you use 50,000 input tokens and 10,000 output tokens for a single request, the cost would be:

  • Input cost: (50,000 / 1,000,000) * $0.2 = $0.01
  • Output cost: (10,000 / 1,000,000) * $1.5 = $0.015
  • Total cost: $0.01 + $0.015 = $0.025