OpenAI 4 min read

The AI Agent Metric That Matters: Cost per Finished Task

Key takeaways

  • A 50% API price cut does not automatically halve the cost of running an agent.
  • If model fees account for 70% of spending, halving those fees saves 35% overall, assuming usage and other costs stay constant.
  • Prompt caching savings depend on how much repeated input qualifies for the discount.
  • Cost per completed task should include failed attempts, retries, and human review.

Cheap tokens look great in a pricing table. Suppose GPT-6 Sol and Luna API rates fell by 50%, purely as a hypothetical. Your agent’s actual savings would depend on everything required to turn those tokens into finished work.

First, check which prices are falling

API pricing starts with tokens: the chunks of text a model processes or generates. But there are separate costs to track for regular input, cached input, and output.

A discount on reading text has a different effect from a discount on generating it. An agent that reads long documents and returns short classifications will be sensitive to input prices. An agent writing lengthy reports needs a closer look at output charges.

Then there is the number of calls. One user request can send an agent through several model calls as it reads material, checks tool results, and revises a draft. Each step adds usage.

A lower rate tells you what a unit costs. You still need to know how many units the job consumes.

Half the model bill is only part of the budget

Consider an imaginary batch of work that costs $100 to process. Model usage accounts for $70. Search tools, execution infrastructure, and other expenses account for $30.

Now halve every model token rate while keeping token usage and all other costs unchanged.

CostBeforeAfter
Model usage$70$35
Tools, infrastructure, and other expenses$30$30
Total$100$65

The model bill falls by 50%. The total falls by 35%.

Under these assumptions, the calculation is straightforward:

Total savings percentage = model share of total spending × model price reduction.

If model usage represents only 20% of your costs, the same half-price offer saves just 10% overall. The headline discount is identical. The business outcome is not.

Before estimating savings, look at your own cost breakdown. A vendor’s pricing table cannot tell you how much of your workflow it pays for.

Caching rewards repetition, with limits

Prompt caching reuses computation for shared portions of input. When that input qualifies for a cached rate, processing it can cost less.

A customer-support classification agent is a useful example. Its classification rules and response guidelines might stay the same across requests, while each customer’s message changes. Those recurring instructions are the part to examine for caching savings.

A long prompt alone does not guarantee much benefit. If most of its contents change on every call, there may be little eligible input to reuse. Output generation and external tools still have their own costs.

The comparison also needs the right starting point. If you already receive caching discounts, compare your actual spending before the price cut with expected spending afterward.

Using the undiscounted list price as your baseline can make an existing saving look like a new one. That is flattering arithmetic, but it will not reconcile with the invoice.

Count finished tasks, including what went wrong

An inexpensive agent can make plenty of calls without completing the job. An extra review call can also be worthwhile if it saves a person substantial editing time.

The useful measure is cost per completed task:

Total operating cost, including failures and retries, divided by the number of tasks that meet your completion criteria.

Human correction time belongs in that cost too.

Suppose processing 100 customer inquiries costs $100. Only 80 meet your completion criteria. The cost per completed inquiry is $1.25, not $1.00, because the unsuccessful attempts still consumed resources.

To compare performance before and after a price change, use the same work and the same completion criteria. Track model spending alongside retries and review time. That makes it possible to see whether savings survive the full workflow.

Lower API prices can make more tasks economical to delegate. But the budget should account for both producing an answer and getting it ready to use. The number to optimize is what you pay for work you can accept.

OpenAI AI Agents Prompt Caching

Comments

    Loading comments...