Try Bifrost Enterprise free for 14 days.
Request access

grok-2 Cost Calculator - xAI

Calculate the cost of using grok-2 from xAI for your AI applications

Pricing data last updated:

grok-2 Cost Calculator

Mode: Chat

Max: 131,072 tokens

Max: 131,072 tokens

Cost Breakdown

Input Cost$0.002000
Output Cost$0.010000
Total Cost$0.012000

Pricing Details

Input: $0.00000200 per token
Output: $0.00001000 per token
[ WE'RE OPEN SOURCE ]

Scale with the Fastest LLM Gateway

Built for enterprise-grade reliability, governance, and scale. Deploy in seconds.

Model Specifications

Capabilities

Function Calling
Web Search

Limits

Max Input Tokens131,072
Max Output Tokens131,072
Max Tokens131,072

About grok-2

grok-2 is a chat model from xAI, one of 38 chat models they offer. It is priced at $2.00 per 1M input tokens and $10.00 per 1M output tokens, ranking 1818 out of 2292 chat models by cost and cheaper than 20% of models in this category. grok-2 supports function calling, web search — one of only 10 chat models with this combination. It accepts up to 131K input tokens.

Pricing Information

Input Cost$2.00 per 1M tokens
Output Cost$10.00 per 1M tokens

Note: Use the interactive calculator above to estimate costs for your specific usage patterns.

Technical Specifications

Maximum Input Tokens131,072
Maximum Output Tokens131,072
Maximum Total Tokens131,072

Pro Tip

Use the maximum token limits shown above to understand the model's capacity. This model can handle up to 131,072 input tokens. The maximum output length is 131,072 tokens.

Model Capabilities

Function Calling - Execute custom functions and tools
Web Search - Access real-time web information

How grok-2 Pricing Compares

At $2.00 per 1M input tokens and $10.00 per 1M output tokens, grok-2 ranks 1818 out of 2292 chat models by input cost. It is more expensive compared to the median of $0.55 for chat models, and is cheaper than 20% of models in this category.

grok-2 is one of 38 xAI chat models, one of only 10 chat models combining function calling, web search.

ModelProviderInput / 1M tokensOutput / 1M tokensvs grok-2
gemini-3-pro-previewVertex AI$2.00$12.000%
gemini-3.1-pro-previewVertex AI$2.00$12.000%
gemini-3.1-pro-preview-customtoolsVertex AI$2.00$12.000%

Alternatives to grok-2

Similar chat models from other providers

Frequently Asked Questions

Is grok-2 cheaper than gemini-3-pro-preview?

No. grok-2 costs $2.00 per 1M input tokens while gemini-3-pro-preview costs $2.00 per 1M input tokens, making gemini-3-pro-preview 0% more affordable for input. However, grok-2 may offer different capabilities or performance characteristics that justify the price difference.

How does grok-2 pricing compare to the average chat model?

grok-2 input pricing is $2.00 per 1M tokens, which is 264% above the median of $0.55 for chat models. It ranks 1818 out of 2292 chat models by input cost, making it cheaper than 20% of models in this category. For output, it costs $10.00 per 1M tokens compared to the median of $1.50.

What makes grok-2 different from other xAI models?

Among xAI's 38 chat models, grok-2 ranks 20 by input cost. Its combination of function calling, web search is shared by only 9 other chat models.

What are the best alternatives to grok-2?

The most comparable chat models to grok-2 are: gemini-3-pro-preview from Vertex AI ($2.00/1M input tokens); gemini-3.1-pro-preview from Vertex AI ($2.00/1M input tokens); gemini-3.1-pro-preview-customtools from Vertex AI ($2.00/1M input tokens); gemini-3-pro-preview from Google Gemini ($2.00/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.

How do I calculate grok-2 costs?

grok-2 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 $2.00 and generating 1M output tokens costs $10.00.