Skip to content
AI Trends

AI Agent Costs Depend on Prompt Caching and Retries

AI agent costs depend on caching, retries, and success rates. Learn to compare cost per successful response and separate model and hosting choices.

AI agent costs depend on cache coverage, retries, and success rates, not just the advertised price. The figures here come from a summary of OpenRouter observations, rather than measurements I ran myself.

AI agent token usage versus spending

OpenRouter is an AI gateway and marketplace for accessing multiple LLMs. On February 6, 2026, software agents overtook human users in token usage on the platform. By late September 2026, agent tasks were using about 131 trillion tokens a week, compared with 18 trillion for human-user tasks.

Throughput and average prices paid on OpenRouter, in USD
MetricJanuary 2025Late September 2026
Total weekly throughputAbout 500 billion tokens164 trillion tokens
Average price paid per million tokens$0.77$0.14

Token volume rose sharply while the average price paid per token fell. If you forecast spending from token counts alone, or judge savings from list prices, you'll miss how the mix of tasks and the share of cached input affect the bill.

These observations cover traffic through OpenRouter; they don't represent prices or performance across the whole AI market or within any particular organization.

Prompt caching changes the price you pay

Agents resend the same long context at each step of a task. Because cached input tokens generally cost a fraction of the standard rate, the share of tokens served from cache can make a large difference to the bill for that work. Even when the model stays the same, what you pay depends on which provider handles the request and how much of the input it caches.

Mermaid
flowchart LR
    A[Step requests] --> B[Repeated context]
    B --> C[Cached input]
    B --> D[Uncached input]
    C --> E[Discounted billing]
    D --> F[Standard billing]
The cached portion of repeated input is billed at a discounted rate.
Cache coverage in OpenRouter agent traffic by model release group
Model release groupCache coverage
Models the report classifies as released "this quarter"88%
Models released in spring 202555%

The 88% and 55% figures describe cache coverage in agent traffic. Request-level cache hit rate and cached-token share are different metrics, so record them separately. When comparing costs, check how many tokens actually received the cache discount.

For the three popular open-weight models compared in the report, actual payments were 43–89% below the amounts calculated from list prices. The provider with the lowest list price wasn't always the cheapest in practice, so a comparison limited to input and output rates would miss the difference.

Prompt caching changes the price you pay

LLM cost per successful response

Cache discounts don't finish the calculation. Failures and rate limits can trigger extra calls, and time spent waiting for a response is a work cost too. OpenRouter's improved routing algorithm combines these factors into an effective total cost for each request.

Text
Effective total cost = effective price after cache discounts + waiting cost + retry cost

At $1 per request and an 80% success rate:
Cost per successful response = $1 ÷ 80% = $1.25
An illustrative calculation from the report. The $1.25 figure isn't a measured result that includes waiting and retry costs.

A provider can charge less per request yet cost more per successful response if it fails often. Compare providers on cost per successful response, and track latency and retry rates to see what waiting and extra calls add to that low per-request price.

Automatic failover changes those numbers too. In an OpenRouter sample of 60 million requests from early October 2026, success rose from 92.8% with the first provider to 96.9% after automatic failover. Those percentages measure request success in that sample; the accuracy of the task output still needs a separate check.

LLM cost per successful response

Separate LLM model and hosting decisions

An endpoint is a model-provider pairing. The same model can have different prices, cache policies, speed, reliability, and data-handling terms depending on the endpoint. Model selection and hosting selection are two separate decisions. First judge whether the model solves the task correctly; then decide where it should run.

DecisionWhat to check
ModelQuality and price for each task; accuracy in your working language and specialist documents; safety; license
Hosting or endpointPrice and cache policy; latency and success rate; zero data retention and retention periods; region; failover routes

In OpenRouter's observations, open-weight models handled about 60% of weekly tokens but accounted for about 26% of spending. Consider lower-cost models for classification, extraction, and coding subtasks. Reserve higher-performance models and a review process for high-risk decisions, with routes set according to task risk and data classification.

Lower prices aren't a reason to send every task to the same cheap model. Even when you cut costs on subtasks, keep only model-provider combinations that meet your accuracy and data-handling requirements.

Track five AI cost metrics

Break down the cost dashboard by model, provider, and task type, because an overall average won't tell you which combination has lost cache discounts or picked up more failures and retries. Start with these five metrics.

  • Price: unit rates and actual payments by model, provider, and task type.
  • Cache hit rate: distinguish request-level hit rate from the share of tokens cached.
  • Success rate: the basis for calculating cost per successful response.
  • Latency: response waiting time and the work cost it creates.
  • Retry rate: how often failures or rate limits lead to additional calls.

Alongside those metrics, add monthly budget alerts and routing policies tied to task risk and data classification. Make provider-switching tests part of routine operations too, so you can check the success rates and data-handling terms of fallback routes. Keep comparing cost and quality on real requests rather than choosing a model once and leaving it fixed.

Next, compare the cost per successful response for the same task across different endpoints.

Joy

Leads AI adoption at a large Korean enterprise. Uses AI firsthand, at work and in everyday life, and writes down what ran, what stalled, and how it changes the way we work and think.

Want to map out the right direction for your organization?

Talks and advisory

Share this postXFacebookThreads