Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

There is no permanently cheapest API. OpenAI, Anthropic’s Claude, and Google’s Gemini publish model-specific rates, and your real bill depends on the model tier, input/output mix, cache hits and writes, request volume, retries, processing mode, geography, and paid tools. The defensible comparison is to run the same representative workload through equivalent capability tiers, apply each provider’s current rate-card rules, and then measure cost per accepted result.

The rates and policies below were checked on October 13, 2026. Provider pricing changes frequently, so verify the live model row immediately before committing to a budget.

What an API cost comparison must include

An API call is not priced as one universal unit. Each provider combines several billable quantities:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Model and capability tier: A fast, small model and a frontier reasoning model are not interchangeable, even when they perform the same request.
  • Input tokens: Tokens sent in the prompt, system instructions, conversation history, retrieved passages, and tool results.
  • Output tokens: Tokens generated by the model. Some services separately account for reasoning or “thinking” tokens; check the target model’s definition.
  • Prompt-cache reads and writes: Reused prefixes may be billed at a different rate from new input, while creating or storing a cache can have its own charge.
  • Processing mode: Standard, batch, priority, or speed modes can have different rates.
  • Geography and route: Regional-processing or US-only inference can add a premium, and a cloud marketplace may bill differently from a direct API account.
  • Optional features: Search, grounding, code execution, image or audio processing, storage, and other tools can add charges beyond model tokens.
  • Retries and tool loops: Failed calls, safety retries, multi-step agents, and unsuccessful evaluations still consume tokens and often create additional tool requests.

Compare these dimensions together. A lower input rate can be outweighed by expensive output, poor cache reuse, more retries, or a model that produces fewer accepted results.

What the current provider documentation says

The official rate cards are the authority for a production estimate. They list different model families and billing categories, so copy the exact row for the model and mode you intend to use.

Provider Rate-card categories to capture Important qualifications Official documentation
OpenAI Input, cached input, cache writes where offered, and output Eligible regional-processing endpoints for models released on or after March 5, 2026 have a 10% uplift. Promotional pricing for GPT-5.6 Sol is available at least through November 21, 2026; treat that as a dated promotion, not a permanent rate. OpenAI API pricing
Anthropic Claude Model-specific input and output, plus cache reads and cache writes The displayed prompt-cache prices use a five-minute time-to-live. US-only inference is priced at 1.1 times the listed input and output rates. Web search and code execution are additional platform features. Claude Platform pricing
Google Gemini Model and mode (including standard or batch), input and output, context cache, and grounding For standard Gemini pricing, output includes thinking tokens. Google Search grounding is billed per query performed, and one request can result in one or more individual searches. Confirm the model’s table and free-tier eligibility instead of applying a generic Gemini rate. Gemini API pricing

These are model-level USD-per-million-token prices, not a market-wide statistic. A figure copied from one model row cannot be presented as the price of an entire provider.

Set up an apples-to-apples workload

Write the workload specification before looking at prices. This prevents choosing a cheap model that cannot perform the task.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Define the capability target

Describe the job in measurable terms: for example, classify support tickets, extract fields from contracts, generate a code patch, or answer questions over a private corpus. Select one model from each provider that can meet the same accuracy, context-length, latency, and safety requirements. If no equivalent exists, record the capability difference rather than calling the comparison equal.

2. Freeze the token mix

Measure a representative sample of real prompts. Record input tokens and output tokens separately, including system messages, conversation history, retrieved passages, and tool results. Do not assume that identical text produces identical token counts: tokenization differs between providers.

3. Specify caching behavior

State how much of the input is a repeated prefix, the expected cache-hit percentage, cache-write volume, and cache lifetime. A long system prompt that is reused across thousands of requests can change the result dramatically, while a one-off prompt receives little benefit.

4. Include operational volume

Estimate calls per day or month, peak traffic, concurrency, retries, and agent steps. A request that normally performs three model turns should be modeled as three calls, not one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Choose the production mode and location

Use the rate for the mode you will actually deploy. Record whether calls use standard, batch, priority, or speed processing, and whether regional or US-only inference is required for residency or policy reasons.

6. List non-token features

Identify search, grounding, code execution, image or audio inputs, storage, and any other metered feature. Leave a feature out only when the workload genuinely does not use it.

Calculate the token portion of the bill

Use this structure for each provider:

(uncached input tokens × input rate + cached-read tokens × cached-read rate + cache-write tokens × cache-write rate + billable output tokens × output rate) ÷ 1,000,000

Then add request, tool, storage, image/audio, and processing-mode charges that apply to the selected service. Match every term to the provider’s billing definition; do not assume that “cached input” or “output” means exactly the same thing across vendors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Illustrative worksheet with declared token counts

The following is a workload template, not a provider price claim. It uses 100,000 monthly requests, 6,000 input tokens and 4,000 output tokens per request, a 70% input-cache hit rate, and 100 million cache-write tokens. Replace the assumptions with your telemetry.

Quantity Calculation Monthly tokens
Total input 100,000 × 6,000 600,000,000
Cached-read input 600,000,000 × 70% 420,000,000
Uncached input 600,000,000 − 420,000,000 180,000,000
Cache writes Declared workload assumption 100,000,000
Output 100,000 × 4,000 400,000,000

For each vendor, multiply the five token quantities by the exact model-row rates. If a provider does not expose a separate cache-write category for the selected model, set that term to zero only after confirming its billing definition; do not silently merge it into ordinary input.

Build low, expected, and stress-case budgets

A single monthly estimate hides the uncertainty that matters most. Create at least three scenarios from the same worksheet. The expected case uses normal traffic, observed cache reuse, and the median output length. A peak case uses the highest sustained request volume and concurrency your service must handle. A retry-heavy case increases model turns for timeouts, tool failures, safety refusals, and user-requested regenerations.

Keep the token mix constant while changing one assumption at a time so the cause of a cost change is visible. For example, recalculate the expected case with a lower cache-hit rate, then with output tokens 25% longer, then with an additional agent step. This sensitivity analysis shows whether your budget depends on an optimistic cache pattern or unusually short answers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate fixed platform commitments from usage-based charges when a deployment route has them. The public direct-API model rate is only one input; a gateway or cloud marketplace can introduce its own minimums, markup, or regional rules. Record those terms beside the token arithmetic rather than burying them in a blended rate.

Prompt caching differences that change the result

OpenAI caching

OpenAI says supported API calls with prompts longer than 1,024 tokens automatically benefit from prompt caching. The cached prefix starts at 1,024 tokens and expands in 128-token increments. For a repeated prefix, estimate cached and uncached input separately wherever the rate card supplies separate rates. See the OpenAI prompt-caching documentation for the threshold and prefix behavior.

Claude cache lifetime

Anthropic’s displayed prompt-cache pricing reflects a five-minute time-to-live. Your estimate therefore needs the request spacing and cache-write frequency: a workload with gaps longer than the TTL may repeatedly pay to create the same prefix, while a bursty workload may obtain many cache reads.

Gemini context caching

Gemini lists context-cache pricing separately from its standard model rates. Use the target model’s context-cache table and account for how often cached context is created and reused. Do not transfer OpenAI or Claude cache assumptions to Gemini; the mechanisms and billable categories are not identical.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate usage with production telemetry

After a pilot, replace estimates with provider usage records. Log the model identifier, request mode, region, input tokens, output tokens, cache-read tokens, cache-write tokens, tool calls, retries, and outcome for every request. Aggregate those fields by day and by workflow, not only by account, so a high-cost agent loop is distinguishable from an inexpensive classification route.

Compare logged totals with the invoice for the same period. Investigate differences caused by rounding, asynchronous batch completion, delayed tool billing, or a model alias that moved to a new version. Keep a dated copy of the rate row used for each calculation and note when a promotion or free-tier condition expires.

Run a small regression set whenever you change prompt structure. Moving a reusable instruction out of the common prefix can reduce cache hits even if total tokens stay constant. Conversely, consolidating stable instructions may increase reuse but also increase the cache-write size. Measure the resulting accepted-output rate as well as token volume.

Account for modes, geography, and deployment route

Batch, priority, and speed processing

Batch processing can have a different rate from standard processing, but it may not satisfy an interactive latency requirement. Priority or speed modes can cost more in exchange for service characteristics. Run separate scenarios rather than averaging modes into one rate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Regional and US-only processing

OpenAI’s 10% regional-processing uplift applies to eligible regional-processing endpoints for models released on or after March 5, 2026, not automatically to every model or endpoint. Anthropic states that US-only inference uses 1.1 times its listed input and output pricing. Apply the multiplier to the applicable categories only, and document the residency requirement that triggered it.

Direct API versus another platform

If you access a model through a cloud marketplace, gateway, or managed platform, verify that service’s billing, markup, minimums, and data-location rules. A public direct-API rate is not proof of the amount that another route will invoice.

Add search, grounding, and execution tools

Tools can dominate a seemingly cheap token estimate:

  • Anthropic lists web search and code execution as additional platform feature costs. Add them only when the workload invokes those features.
  • Gemini’s Google Search grounding is billed per query performed. One model request can trigger multiple individual searches, so count observed searches rather than assuming one query per API call.
  • Image, audio, storage, and other modality charges must be added using the selected provider’s current feature table.

Keep tool charges in separate worksheet columns. This makes it possible to see whether a model is expensive because of generation tokens or because the application calls external tools too often.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Measure cost per accepted result, not just cost per token

List price is only one part of unit economics. Replay a fixed evaluation set through each candidate and record:

  • accepted outputs under your quality rubric;
  • rejected outputs requiring human review or regeneration;
  • average retries and tool loops;
  • latency and timeout failures;
  • total token, tool, and processing charges.

Then calculate total spend ÷ accepted outputs. This is an analytical metric you compute from your own evaluation, not a published provider statistic. A model with a higher token rate can be cheaper per accepted result if it needs fewer retries or produces more usable answers on the first attempt.

A practical comparison table to fill from the live rate cards

Field OpenAI Claude Gemini
Exact model and version Copy the selected live model row Copy the selected live model row Copy the selected live model row
Input rate Record USD per million input tokens Record USD per million input tokens Record USD per million input tokens
Cached-read rate Record if listed Record cache-read rate Record context-cache rate
Cache-write rate Record if listed Record cache-write rate Record creation charge if listed
Output rate Record USD per million output tokens Record USD per million output tokens Record rate; standard pricing includes thinking tokens
Processing mode Standard, batch, priority, or other selected mode Selected mode Standard or batch as applicable
Geography premium Apply only to eligible regional processing Apply US-only 1.1× input/output multiplier if required Record the selected deployment’s rule
Tool charges List only tools used List web search or code execution when used List grounding and other tools when used

Save the verification date beside this table. Pricing pages are live documents, and a model name, promotion, cache rule, or free-tier condition can change without changing your application code.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common comparison mistakes and fixes

Using one provider’s flagship rate as a vendor-wide price

Fix: Name the exact model, mode, geography, and date for every figure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Comparing input rates while ignoring output

Fix: Measure the input/output ratio of real requests. Long answers or reasoning-heavy tasks can make output the larger cost component.

Assuming cache hits are free

Fix: Record cache reads, writes, TTL or retention behavior, and the percentage of requests that actually reuse the prefix.

Forgetting retries and agent loops

Fix: Multiply by observed attempts, not idealized successful calls. Include safety retries, tool failures, and human-requested regenerations.

Applying a residency multiplier to every request

Fix: Apply a geography premium only when the selected endpoint and model qualify. OpenAI’s stated 10% uplift and Anthropic’s US-only 1.1× rule have specific scopes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Treating grounding as one search

Fix: Count the individual searches performed by the grounding system, because one Gemini request can produce more than one billable query.

Assuming token counts transfer between APIs

Fix: Tokenize representative prompts with each provider’s service or usage records and keep the counts vendor-specific.

Choose a provider from the completed worksheet

  1. Eliminate models that miss the capability or compliance requirement. Price is irrelevant if quality, context, latency, or residency is unacceptable.
  2. Calculate monthly spend under three traffic cases: expected, peak, and a retry-heavy case.
  3. Run the same evaluation set. Capture accepted-output rate, retries, latency, and tool calls.
  4. Compare cost per accepted result. Use the same quality threshold for all candidates.
  5. Stress-test cache assumptions. Recalculate with lower hit rates and shorter effective reuse windows.
  6. Record a renewal trigger. Recheck the live rate card whenever you change model, mode, region, prompt structure, or tool use.

Bottom line

OpenAI, Claude, and Gemini can each be the economical choice for a particular workload. Build the comparison from identical tasks, separate uncached input, cached reads, cache writes, and output, then add mode, geography, tool, and retry costs. Finally, validate the arithmetic against accepted-result quality and refresh the official rate cards before deployment.

Frequently Asked Questions

How do I calculate LLM API cost per million tokens?

Separate uncached input, cached reads, cache writes, and output. Multiply each token quantity by the selected model’s USD-per-million-token rate, divide by 1,000,000 when starting with raw token counts, and then add applicable tool, storage, image/audio, request, geography, and processing-mode charges.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is Claude API cheaper than OpenAI?

There is no provider-wide answer. Compare equivalent capability tiers with the same input/output mix, cache behavior, geography, processing mode, tool use, request volume, and retry rate. The cheaper token row may not produce the lower cost per accepted result.

Does Gemini pricing include thinking tokens?

Google’s standard Gemini pricing states that output pricing includes thinking tokens. Confirm the exact model and mode table you plan to use, because pricing categories and eligibility are model-specific.

Are prompt-cache hits free?

Do not assume that they are. OpenAI, Anthropic, and Google expose different cache categories and rules. Record cache reads, writes or creation charges, reuse percentage, and lifetime or TTL, then apply the relevant provider definitions.

How much does Gemini Search grounding add?

It depends on the number of individual searches performed. Google states that grounding is billed per query and that one model request can result in one or more searches, so count observed queries rather than multiplying by API requests alone.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do regional or US-only endpoints cost more?

They can. OpenAI lists a 10% uplift for eligible regional-processing endpoints for models released on or after March 5, 2026. Anthropic lists US-only inference at 1.1 times its input and output rates. Apply these only when the selected model and endpoint qualify.

Should batch pricing be used for an interactive application?

Only if the application can tolerate batch latency and completion behavior. Build a separate standard scenario for interactive traffic and a batch scenario for eligible asynchronous work instead of blending the two rates.

How often should API pricing calculations be refreshed?

Refresh whenever you change the model, mode, region, prompt structure, cache design, or tools, and check the live provider pages when setting or renewing a budget. Promotions, model rows, cache rules, and free-tier conditions can change.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.