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.
| Feature | Claude API | Gemini API |
|---|---|---|
| Entry/Fast Input (per 1M) | Claude Haiku 4.5: $1 / MTok | Gemini 2.5 Flash Lite: $0.10 (text) |
| Entry/Fast Output (per 1M) | Claude Haiku 4.5: $5 / MTok | Gemini 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 / MTok | Gemini 3.1 Pro Preview: $2.00 (<=200k) |
| Prompt/Context Caching | Read hit: 0.1x base input price | Storage: $1.00 / 1M tokens per hour |
| Batch API Discount | 50% discount on both input and output | 50% cost reduction |
| Code Execution Cost | 1,550 free hours/mo, then $0.05/hour | Free of charge (billed at token rates) |
| Grounding Search Price | Web search: $10 per 1,000 searches | Grounding 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.