GOOGLE VS XAI

Gemini 3.1 Flash-Lite vs Grok Code Fast 1

Grok Code Fast 1 is about 1.1x cheaper than Gemini 3.1 Flash-Lite on a blended 3:1 input:output rate — the same 10K-in/2K-out request costs $0.005 vs $0.0055. Gemini 3.1 Flash-Lite has the larger context window (1,048,576 vs 256,000 tokens).

Pricing verified

API pricing per 1M tokens

ModelInput / 1M tokensOutput / 1M tokensBlended (3:1 mix)
Gemini 3.1 Flash-Lite$0.25$1.50$0.563
Grok Code Fast 1$0.20$1.50$0.525

Rates from official Google pricing and official xAI pricing, checked 2026-08-11.

What a real workload costs

Example: one request with 10,000 input tokens and 2,000 output tokens, then that request at 100,000 runs per month.

ModelPer request (10K in / 2K out)Per month (100K requests)Monthly delta
Gemini 3.1 Flash-Lite$0.0055$550+$50
Grok Code Fast 1$0.005$500—

Model your own prompt sizes and volumes in the token cost analyzer, or check caching savings with the prompt caching calculator.

Specs side by side

SpecGemini 3.1 Flash-LiteGrok Code Fast 1
ProviderGooglexAI
Context window1,048,576 tokens256,000 tokens
Model classGeneral textGeneral text
TokenizerProprietary (counts estimated)Proprietary (counts estimated)

Count tokens for each model on its own page: Gemini 3.1 Flash-Lite token counter and Grok Code Fast 1 token counter. All Google models are on the Gemini Token Counter. All xAI models are on the Grok Token Counter.

FAQ

Gemini 3.1 Flash-Lite vs Grok Code Fast 1 FAQ

Which is cheaper, Gemini 3.1 Flash-Lite or Grok Code Fast 1?

Grok Code Fast 1 is cheaper. At rates checked 2026-08-11, Gemini 3.1 Flash-Lite costs $0.25 input / $1.50 output per 1M tokens, while Grok Code Fast 1 costs $0.20 input / $1.50 output — about a 1.1x difference on a typical 3:1 input-heavy workload.

How much does a real request cost on Gemini 3.1 Flash-Lite vs Grok Code Fast 1?

A request with 10,000 input tokens and 2,000 output tokens costs about $0.0055 on Gemini 3.1 Flash-Lite and $0.005 on Grok Code Fast 1. At 100,000 such requests per month that is $550 vs $500 — a difference of $50 per month.

Which has the bigger context window, Gemini 3.1 Flash-Lite or Grok Code Fast 1?

Gemini 3.1 Flash-Lite. It supports 1,048,576 tokens of context versus 256,000 tokens — roughly 786,000 English words in one request.

Do Gemini 3.1 Flash-Lite and Grok Code Fast 1 count tokens the same way?

Not exactly. Gemini 3.1 Flash-Lite uses a proprietary tokenizer (counts are estimates) and Grok Code Fast 1 uses a proprietary tokenizer (counts are estimates). The same prompt will tokenize differently, which shifts effective cost per word.