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 41 chat models they offer. It is priced at $2.00 per 1M input tokens and $10.00 per 1M output tokens, ranking 2135 out of 2661 chat models by cost and cheaper than 19% 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 2135 out of 2661 chat models by input cost. It is more expensive compared to the median of $0.50 for chat models, and is cheaper than 19% of models in this category.

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

ModelProviderInput / 1M tokensOutput / 1M tokensvs grok-2
gpt-5.6-terraAzure$2.50$15.00+25%
claude-sonnet-5Anthropic$2.00$10.000%
gemini-3-pro-previewVertex AI$2.00$12.000%

Alternatives to grok-2

Similar chat models from other providers

Frequently Asked Questions

Is grok-2 cheaper than gpt-5.6-terra?

Yes. grok-2 costs $2.00 per 1M input tokens compared to gpt-5.6-terra's $2.50 per 1M input tokens, making it 25% more affordable. Both are chat models and share support for vision, function calling, reasoning, web search, prompt caching, structured output.

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

grok-2 input pricing is $2.00 per 1M tokens, which is 300% above the median of $0.50 for chat models. It ranks 2135 out of 2661 chat models by input cost, making it cheaper than 19% of models in this category. For output, it costs $10.00 per 1M tokens compared to the median of $1.44.

What makes grok-2 different from other xAI models?

Among xAI's 41 chat models, grok-2 ranks 23 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: gpt-5.6-terra from Azure ($2.50/1M input tokens); claude-sonnet-5 from Anthropic ($2.00/1M input tokens); 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). 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.