SaaS Pricing Tracker
vs

Gemini API vs xAI API pricing

Gemini API is cheaper to start: $0.25 per million input tokens, $1.5 per million output against $1 per million input tokens, $2 per million output for xAI API. Gemini API has not changed its listed prices since 2026. xAI API has changed its listed prices 2 times since 2026.

Gemini API vs xAI API at a glance

Current list prices as last read from each pricing page.

Gemini API

Full analysis
Starts at
$0.25 per million input tokens, $1.5 per million outputGemini 3.1 Flash-Lite, USD per million tokens, paid tier, prompts up to 200K tokens
Top listed plan
$2 per million input tokens, $12 per million output for prompts up to 200K tokensGemini 3.1 Pro Preview
Priced by
Usage based
Free plan
Yes
Price history
since 2026
Price changes
none
Starts at
$1 per million input tokens, $2 per million outputgrok-build-0.1, USD per million tokens, prompts under 200K tokens
Top listed plan
$2 per million input tokens, $6 per million outputgrok-4.6
Priced by
Usage based
Free plan
Not recorded
Price history
since 2026
Price changes
2

Gemini API vs xAI API price history

Both histories on one chart. The default line is each product's cheapest paid plan.

$0.50$1$2$1.25 xAI API grok-4.3, input$0.75 Gemini API Gemini 3.8 Flash, input
Gemini API: USD per million tokens, paid tier, prompts up to 200K tokens. xAI API: USD per million tokens, prompts under 200K tokens. Click a legend entry to add or hide a plan. Log scale.
Show the data as a table
ObservedGemini API Gemini 3.8 Flash, inputxAI API grok-4.3, input
Sep 21, 2026$0.75$1.25
Oct 3, 2026$0.75$1.25

Plans side by side

Every plan currently listed, with the price it started at where we have it.

Gemini APIUSD per million tokens, paid tier, prompts up to 200K tokens

PlanPriceListed since
Gemini 3.1 Pro Preview, input$2Sep 2026
Gemini 3.1 Pro Preview, output$12Sep 2026
Gemini 3.8 Flash, input$0.75Sep 2026
Gemini 3.8 Flash, output$3.75Sep 2026

xAI APIUSD per million tokens, prompts under 200K tokens

PlanPriceListed since
grok-4.6, input$2Sep 2026
grok-4.6, output$6Sep 2026
grok-4.3, input$1.25Sep 2026
grok-4.3, output$2.50Sep 2026
grok-4.7, input$2Oct 2026
grok-4.7, output$6Oct 2026

What changed, and when

Every dated price move we have on record for either product, newest first.

  1. Oct 2026xAI API added the grok-4.7 input and output plans. grok-4.7, input listed at $2. grok-4.7, output listed at $6.

Gemini API vs xAI API pricing questions

Is Gemini API or xAI API cheaper?
Gemini API starts lower at $0.25 per million input tokens, $1.5 per million output, xAI API at $1 per million input tokens, $2 per million output. Prices are as shown on each pricing page when it was last read.
Has Gemini API or xAI API raised prices?
Gemini API has not changed its listed prices since 2026. xAI API: grok-4.7, input appeared by Oct 2026 at $2. grok-4.7, output appeared by Oct 2026 at $6.
Do Gemini API and xAI API have a free plan?
Gemini API lists a free plan. We have not recorded one for xAI API.
How are Gemini API and xAI API priced?
Gemini API: usage based, USD per million tokens, paid tier, prompts up to 200K tokens. xAI API: usage based, USD per million tokens, prompts under 200K tokens.

More comparisons