Claude API vs Gemini API pricing: which model to plug in?

Gemini is highly competitive on raw cost, with Gemini 2.5 Flash Lite input priced at $0.10 per 1M tokens and Gemini 3.5 Flash input at $1.50 per 1M tokens. Claude leads on deep reasoning tasks but demands higher rates, as Claude Sonnet 5 input costs $2 per 1M tokens until September 1, 2026, when it rises to $3 per 1M tokens. Both offer a 50% discount on batch APIs to optimize larger workloads.

Data checked:

TL;DR verdict

Pick Gemini when running high-volume, cost-sensitive text processing, utilizing context caching at $1.00 per million tokens per hour, or building multimodal applications. Pick Claude when your agents require top-tier reasoning capabilities and can justify Sonnet 5 rates starting at $3 per million input tokens.

Verdict card: Claude vs Gemini API. Gemini offers entry-level text input starting at $0.10 per million tokens on Gemini 2.5 Flash Lite, while Claude Sonnet 5 is priced at $2 to $3 per million input tokens depending on the date in 2026.
FeatureClaude APIGemini API
Entry/Fast Input (per 1M)Claude Haiku 4.5: $1 / MTokGemini 2.5 Flash Lite: $0.10 (text)
Entry/Fast Output (per 1M)Claude Haiku 4.5: $5 / MTokGemini 2.5 Flash Lite: $0.40
Mid-Tier Input (per 1M)Claude Sonnet 5: $2 (thru Aug 31, 2026)Gemini 3.5 Flash: $1.50
Heavyweight Input (per 1M)Claude Opus 4.8: $5 / MTokGemini 3.1 Pro Preview: $2.00 (<=200k)
Prompt/Context CachingRead hit: 0.1x base input priceStorage: $1.00 / 1M tokens per hour
Batch API Discount50% discount on both input and output50% cost reduction
Code Execution Cost1,550 free hours/mo, then $0.05/hourFree of charge (billed at token rates)
Grounding Search PriceWeb search: $10 per 1,000 searchesGrounding search: $14 / 1,000 queries

Sources: Claude API pricing · Gemini API pricing · data checked: Jul 19, 2026

Which we'd pick, scenario by scenario

A customer support agent processing thousands of long transcripts daily

Gemini. Gemini 2.5 Flash Lite input costs just $0.10 per 1M tokens, and context caching at $1.00 per 1M tokens per hour keeps large daily transcripts incredibly cheap.

A complex legal document analyzer requiring absolute logical precision

Claude. Although Claude Sonnet 5 input rises to $3 per 1M tokens starting September 1, 2026, its superior reasoning capabilities protect against costly downstream logic errors.

A multi-step asynchronous pipeline running code execution experiments

Gemini. Code execution is free of charge beyond standard token rates, and the 50% batch discount brings execution costs down further compared to Claude.

Our take

The decision between these developer APIs is rarely about a single token price. It comes down to how your workflows handle memory and complex reasoning. Gemini is built for data density. If you are building high-volume systems that feed entire SQL databases or code repositories into the prompt, Google's context caching at $1.00 per million tokens per hour changes the math completely. Conversely, Anthropic has optimized Claude for agentic control. We deploy Claude Sonnet 5 for clients building advanced AI chatbots and agents where a single logic error breaks the chain, even though input rates will rise to $3 per million tokens after August 31, 2026. If you build cheap, lightweight automations, Gemini 2.5 Flash Lite at $0.10 per million input tokens is unmatched. But if your application relies on multi-step reasoning, paying the Claude premium is the only way to avoid systemic logic failures. We advise starting with Claude for the initial logic design and moving high-volume tasks to Gemini once prompt engineering is locked down.

← All Comparisons

FAQ

Frequently asked

Which API has cheaper entry-level pricing, Claude or Gemini?

Gemini is significantly cheaper. Gemini 2.5 Flash Lite input costs just $0.10 per 1M tokens, whereas Claude's cheapest model, Claude Haiku 4.5, costs $1 per 1M tokens. Gemini also provides a free tier.

How much does Claude Sonnet 5 cost compared to Gemini 3.5 Flash?

Claude Sonnet 5 input costs $2 per 1M tokens through August 31, 2026, and rises to $3 per 1M tokens starting September 1, 2026. In comparison, Gemini 3.5 Flash input costs $1.50 per 1M tokens.

Is there a discount for batch processing on these APIs?

Yes, both providers offer a 50% discount. Claude gives a 50% discount on both input and output tokens for Batch API. Gemini similarly offers a 50% cost reduction for batch processing, making both ideal for large asynchronous tasks.

Related pages

Which process is costing you the most?

Book a free 30-minute audit. We map your biggest bottleneck, estimate the ROI of fixing it, and show you exactly how to fix it, whether you hire Dobify or not.

Book your free audit