NEW

Jev is now available

Model prices

How to compare API prices with prompt caching

An API's input-token price alone is not the cost of a conversation. Include ordinary input, cache reads, cache writes and output. For one million total tokens with 40% ordinary input, 40% cache reads and 20% output, the scenario cost is 0.4 × input rate + 0.4 × cache-read rate + 0.2 × output rate. This is a stated scenario, not measured average usage.

Before you start

  • Use the current selected-model rates per million tokens; cache support and tariffs differ by model.
  • Take token counts from Logs and keep ordinary input, reads, writes and output mutually exclusive. Check whether a client's total input already includes cached tokens.
Create an API key

Steps

  1. Calculate the bill

    Cost = (ordinary input tokens × input rate + cache-read tokens × read rate + cache-write tokens × write rate + output tokens × output rate) / 1,000,000. Do not count cached tokens twice.

  2. Compare the same workload

    The no-cache baseline for the 40/40/20 scenario is 0.8 × input rate + 0.2 × output rate. Both represent 1M total tokens and the same output share; the cache scenario excludes initial cache writes.

  3. Use your actual mix

    Include initial cache writes, misses and later reads from a representative set of requests. Effective cost per million total tokens = total cost / total tokens × 1,000,000. Compare providers using the same model, token mix and billing categories.

Check the result

Open the documentation's cache-pricing table for current model-by-model scenario costs, then compare your estimate with Logs. A lower cache-read rate saves money only on tokens actually served from cache.

Troubleshooting

  • Treating a cached-input price as the price of all tokens understates output and uncached-input cost.
  • Omitting cache writes can overstate savings on short sessions; writes can cost more than ordinary input.
  • An assumed cache-hit share is not a guaranteed discount or an observed average.
  • Do not describe a provider as universally cheapest without a current comparison of the same workload and capabilities.

Compatibility and billing

The scenario excludes cache writes, hosting, client subscriptions and other non-token charges. It is not a guarantee of cache hits. ApiClo's current rates and actual usage determine the charge; the formula supports comparison without promising the cheapest provider for every task.

All documentation