OpenAI vs Anthropic vs Google: LLM API cost comparison 2026
Compare OpenAI, Anthropic, and Google API pricing across flagship, balanced, and cost-sensitive models, with real workload calculations for GPT-5.6, Claude, and Gemini.
TL;DR: Google has the lowest published text-token prices in this comparison, from Gemini 3.1 Pro Preview at $2 input and $12 output per million tokens to Gemini 3.1 Flash-Lite at $0.25 and $1.50. OpenAI's GPT-5.6 family ranges from $5/$30 for Sol to $1/$6 for Luna. Anthropic charges $5/$25 for Claude Opus 4.8, while Claude Sonnet 5 is temporarily $2/$10 through August 31, 2026.
Price per token does not identify the best model by itself. Context thresholds, reasoning tokens, tokenizers, cache behavior, batch discounts, tool fees, retries, latency, and task success can change the real cost of an application.
OpenAI vs Anthropic vs Google API pricing at a glance
This LLM API cost comparison uses standard text-token prices published by each provider and checked on July 13, 2026. Prices are in US dollars per one million tokens. The three tiers describe the providers' intended positioning; they do not claim that models in the same row have identical quality or capabilities.
| Tier | Provider | Model | Input / 1M | Output / 1M | Published context window |
|---|---|---|---|---|---|
| Flagship | OpenAI | GPT-5.6 Sol | $5.00 | $30.00 | 1.05M |
| Flagship | Anthropic | Claude Opus 4.8 | $5.00 | $25.00 | 1M |
| Flagship | Gemini 3.1 Pro Preview | $2.00 | $12.00 | 1M | |
| Balanced | OpenAI | GPT-5.6 Terra | $2.50 | $15.00 | 1.05M |
| Balanced | Anthropic | Claude Sonnet 5 | $2.00 | $10.00 | 1M |
| Balanced | Gemini 3 Flash Preview | $0.50 | $3.00 | 1M | |
| Cost-sensitive | OpenAI | GPT-5.6 Luna | $1.00 | $6.00 | 1.05M |
| Cost-sensitive | Anthropic | Claude Haiku 4.5 | $1.00 | $5.00 | 200K |
| Cost-sensitive | Gemini 3.1 Flash-Lite | $0.25 | $1.50 | 1M |
The Gemini 3 prices above apply to text input and output under the standard paid tier. Google states that all Gemini 3 models are currently in preview. Gemini 3.1 Pro's listed price applies to prompts at or below 200,000 tokens. Claude Sonnet 5's listed price is introductory and expires after August 31, 2026.
Sources: OpenAI's model catalog, Anthropic's Claude pricing, and Google's Gemini API pricing.
How to calculate LLM API cost
The basic cost formula is the same across the three providers:
For a monthly estimate, multiply representative requests by expected traffic. Do not estimate tokens from words alone: providers use different tokenizers, and the same text can produce different billable counts.
The output side deserves special attention. Output tokens cost five to six times more than standard input for most models in this table. Reasoning tokens may also be billed as output even when the full reasoning text is not returned to the application.
Flagship model cost comparison
The flagship group covers workloads where teams are willing to pay for the providers' strongest broadly positioned models: complex agents, professional analysis, difficult coding, and high-value decisions.
OpenAI GPT-5.6 Sol pricing
GPT-5.6 Sol
costs $5 per million input tokens, $0.50 per million cached input tokens, and
$30 per million output tokens. The gpt-5.6 alias routes to Sol.
OpenAI applies a long-context multiplier when a prompt exceeds 272,000 input tokens: the full request is charged at twice the normal input price and 1.5 times the normal output price. Cache writes are billed at 1.25 times uncached input, so applications must separate cache creation from cheaper cache hits.
Anthropic Claude Opus 4.8 pricing
Claude Opus 4.8 costs $5 per million base input tokens and $25 per million output tokens. Anthropic lists five-minute cache writes at $6.25, one-hour cache writes at $10, and cache hits at $0.50 per million tokens. Batch input and output are half the standard base rates.
Anthropic also documents a tokenizer difference that affects real costs. Claude Opus 4.7 and later produce approximately 30% more tokens for the same text than earlier models, with the exact change depending on the content. That can raise the effective cost of identical prompts even when the published rate remains flat. See the detailed Claude Opus tokenizer cost analysis for worked examples.
Google Gemini 3.1 Pro Preview pricing
Gemini 3.1 Pro Preview costs $2 per million input tokens and $12 per million output tokens for prompts at or below 200,000 tokens. Above that threshold, the full prompt moves to $4 input and $18 output. Output pricing includes thinking tokens.
Google lists context-cache reads at $0.20 per million tokens below the threshold and $0.40 above it, plus $4.50 per million stored tokens per hour. Search and Maps grounding include a monthly allowance and then add per-query charges.
Gemini 3.1 Pro is the cheapest flagship-positioned option by published token price in the ordinary, sub-200K scenario. It is still a preview model, so teams should weigh stability, rate limits, and migration risk alongside price.
Balanced model cost comparison
Balanced models are usually the first candidates for production chat, summarization, retrieval-augmented generation, coding assistance, and agent steps that need strong reasoning without flagship pricing.
| Provider | Model | Input / 1M | Cached input / 1M | Output / 1M |
|---|---|---|---|---|
| OpenAI | GPT-5.6 Terra | $2.50 | $0.25 | $15.00 |
| Anthropic | Claude Sonnet 5 | $2.00 | $0.20 | $10.00 |
| Gemini 3 Flash Preview | $0.50 | $0.05 | $3.00 |
GPT-5.6 Terra is the middle member of OpenAI's current family. Like Sol, it uses the long-context multiplier above 272,000 input tokens and supports a 1.05 million-token context window.
Claude Sonnet 5 has introductory pricing of $2 input and $10 output per million tokens through August 31, 2026. On September 1, Anthropic's published standard price becomes $3 input and $15 output. A budget based on the temporary rate would increase by 50% if traffic and token counts remained unchanged.
Gemini 3 Flash Preview costs $0.50 input and $3 output per million text tokens. Google describes it as a speed-focused model with reasoning and grounding, but preview status means its operational fit still needs testing under a production workload.
Cost-sensitive model comparison
Cost-sensitive models target classification, extraction, routing, moderation, structured transformations, and other high-volume tasks with clear acceptance criteria.
| Provider | Model | Input / 1M | Cached input / 1M | Output / 1M |
|---|---|---|---|---|
| OpenAI | GPT-5.6 Luna | $1.00 | $0.10 | $6.00 |
| Anthropic | Claude Haiku 4.5 | $1.00 | $0.10 | $5.00 |
| Gemini 3.1 Flash-Lite | $0.25 | $0.025 | $1.50 |
Gemini 3.1 Flash-Lite has the lowest published text-token rates in this group. GPT-5.6 Luna and Claude Haiku 4.5 have identical base input prices, while Haiku's output price is one dollar lower per million tokens.
Token price is only useful after a model meets the quality bar. A failed extraction that triggers a retry or human review can cost more than a successful first pass from a higher-priced model.
Real cost for 10,000 requests per day
Consider an AI application that handles 10,000 requests each day. The average request contains 1,000 input tokens and produces 500 output tokens.
The following calculation uses only standard uncached text-token prices. It does not include tools, grounding, retries, cache creation, taxes, or negotiated discounts.
| Tier | Model | Daily input | Daily output | Daily total | 30-day total |
|---|---|---|---|---|---|
| Flagship | GPT-5.6 Sol | $50.00 | $150.00 | $200.00 | $6,000 |
| Flagship | Claude Opus 4.8 | $50.00 | $125.00 | $175.00 | $5,250 |
| Flagship | Gemini 3.1 Pro Preview | $20.00 | $60.00 | $80.00 | $2,400 |
| Balanced | GPT-5.6 Terra | $25.00 | $75.00 | $100.00 | $3,000 |
| Balanced | Claude Sonnet 5 | $20.00 | $50.00 | $70.00 | $2,100 |
| Balanced | Gemini 3 Flash Preview | $5.00 | $15.00 | $20.00 | $600 |
| Cost-sensitive | GPT-5.6 Luna | $10.00 | $30.00 | $40.00 | $1,200 |
| Cost-sensitive | Claude Haiku 4.5 | $10.00 | $25.00 | $35.00 | $1,050 |
| Cost-sensitive | Gemini 3.1 Flash-Lite | $2.50 | $7.50 | $10.00 | $300 |
The Sonnet result uses the introductory July 2026 rate. At its published September price of $3/$15, the same workload would cost $105 per day or $3,150 over 30 days.
These totals compare invoices, not value. Gemini 3.1 Flash-Lite at $300 per month is not automatically a replacement for GPT-5.6 Sol at $6,000. The models must first be evaluated against the same production task and success criteria.
How prompt caching changes the comparison
Suppose 80% of the daily input volume is repeatedly served from a valid cache. After the cache is warm, 2 million daily input tokens are charged at the base rate and 8 million at the cache-hit rate. Output stays at 5 million tokens.
| Flagship model | No-cache daily cost | Warm-cache daily cost | Daily reduction |
|---|---|---|---|
| GPT-5.6 Sol | $200.00 | $164.00 | $36.00 |
| Claude Opus 4.8 | $175.00 | $139.00 | $36.00 |
| Gemini 3.1 Pro Preview | $80.00 | $65.60 | $14.40 |
This simplified scenario excludes cache writes, storage duration, expiration, minimum cacheable prefix sizes, and provider-specific eligibility. Those rules are different enough that “90% cheaper cached input” does not guarantee an identical overall saving.
Caching also has limited impact when output dominates the invoice. In the GPT-5.6 Sol example, output remains $150 of the $164 warm-cache total. Controlling answer length or choosing a lower output rate may matter more than further prompt compression.
Batch pricing can halve token cost
All three providers offer discounted asynchronous processing for eligible workloads. Anthropic and Google's published batch text-token prices for the models above are generally half their standard rates, and OpenAI exposes Batch API pricing for supported models.
Batch processing fits offline evaluations, document enrichment, embeddings, bulk classification, and backfills that do not need an interactive response. It is not a substitute for on-demand inference when a user is waiting. Compare completion windows, queue limits, failure handling, and data-governance terms before moving a workflow.
Hidden costs beyond input and output tokens
Reasoning tokens
Reasoning models can generate internal tokens that are billed as output. A request that returns a short answer may therefore consume more output tokens than the visible response suggests. Record the provider's usage object instead of estimating cost from displayed text.
Tool and grounding charges
Web search, file search, code execution, computer use, Maps grounding, and other hosted tools can add per-call or per-query charges. Retrieved content may also become billable input context.
Retries and fallbacks
Timeouts, rate limits, invalid tool calls, and low-quality answers can cause one user request to trigger several model calls. Attribute the entire chain to the same task when comparing providers.
Tokenizer differences
A million characters are not a million tokens. Language, code, JSON, whitespace, and each provider's tokenizer affect consumption. Count a representative corpus with the exact target models whenever the provider exposes a counting method, then verify the actual response usage.
Long-context multipliers
OpenAI's GPT-5.6 models cross a pricing threshold above 272K input tokens, while Gemini 3.1 Pro crosses one above 200K. A retrieval or agent-memory change can therefore move the entire request into a more expensive band.
Regional and priority processing
Data residency, regional inference, provisioned throughput, and priority tiers can use different rates from standard global processing. Compare the deployment configuration your application will actually use.
Which LLM provider is cheapest?
Google is the cheapest provider by published standard token price for all three model tiers in this specific comparison. That conclusion is about price, not task quality, reliability, preview stability, or total cost of ownership.
| Workload | First models to evaluate |
|---|---|
| Complex reasoning and high-value agents | GPT-5.6 Sol, Claude Opus 4.8, Gemini 3.1 Pro |
| General production chat and RAG | GPT-5.6 Terra, Claude Sonnet 5, Gemini 3 Flash |
| Classification and extraction | GPT-5.6 Luna, Claude Haiku 4.5, Gemini 3.1 Flash-Lite |
| Long repeated system or document input | Compare cache writes, hits, storage, and expiration directly |
| Offline bulk processing | Compare each provider's batch price and completion window |
| Search-grounded answers | Include search queries, retrieved tokens, and citation quality |
Start with two or three models that meet the product's latency, modality, context, security, and deployment requirements. Run the same evaluation set, then compare cost per successful task rather than selecting from the price table alone.
Use model routing instead of one provider for everything
Many applications contain a mix of task difficulty:
- Simple requests: classification, routing, extraction, and formatting.
- Moderate requests: summarization, grounded Q&A, and content drafting.
- Complex requests: multi-step agents, coding, analysis, and ambiguous decisions.
A routing policy can send simple work to a cost-sensitive model and escalate only uncertain or high-value requests. The policy needs measurable rules rather than a vague “complexity” label. Useful inputs include task type, retrieved context size, risk, previous failures, latency budget, and confidence from a cheap first pass.
Test the complete route. A low-cost classifier plus a flagship fallback may cost more than one balanced-model call if the router escalates too often.
Measure cost per successful task
Provider invoices answer how many tokens were billed. They do not say whether the customer received a correct result. A fair OpenAI vs Anthropic vs Google comparison records:
- Task success and quality-evaluation scores.
- Input, cached-input, reasoning, and output tokens.
- Tool calls, search queries, retries, and fallbacks.
- End-to-end latency and time to a usable result.
- Human review or correction time.
- Total cost across every attempt attached to the task.
Use a fixed evaluation set for the initial decision, then repeat the measurement on sampled production traces. Provider models, prompts, traffic, cache hit rates, and user behavior all change over time.
Frequently asked questions
Is OpenAI, Anthropic, or Google cheaper for API usage?
Google has the lowest published standard text-token prices among the nine models compared here. The cheapest provider for a real application depends on task success, token consumption, context length, caching, tools, retries, and any regional or contracted pricing.
Why do output token prices matter so much?
Output commonly costs five or six times more than uncached input. Verbose answers, reasoning tokens, and repeated attempts can therefore dominate the invoice even when prompts are large.
Are GPT, Claude, and Gemini tokens equivalent?
No. Each provider uses its own tokenizer, and model generations can differ in length. Compare actual token usage on the same input corpus and task rather than assuming one million tokens represents the same text or output quality.
Which provider has the cheapest long-context model?
There is no single answer without a prompt size. Gemini 3.1 Pro changes rates above 200K prompt tokens, and GPT-5.6 applies a multiplier above 272K input tokens. Cache behavior and the number of generated output tokens can change the ranking again.
Should I use batch processing to reduce LLM cost?
Use batch processing when the workload can tolerate asynchronous completion. It can materially reduce token cost, but it is a poor fit for interactive chat or agents whose next step depends immediately on the result.
Compare OpenAI, Anthropic, and Google costs with Currai
Currai turns provider pricing into production evidence. Trace each AI task across model calls, tools, retries, and fallbacks; record input, cached-input, output, latency, errors, and cost; then compare OpenAI, Anthropic, and Google by feature, route, customer, model version, and evaluation result.
Currai is an observability and evaluation layer, not an inference gateway. It helps teams see whether a cheaper route still meets the quality bar and measure cost per successful task from real traces.
Learn how to track token cost, test agent cost efficiency, and configure budgets and alerts for LLM cost. Explore LLM observability, then create a free account to compare the providers in your own application.
