Cost Optimization & FinOps

Unit Economics for LLM Features: Cost Per Task

"We spent $40,000 on Claude last month" starts an argument. "Each processed contract costs $0.04" ends one. The difference is a unit metric.

Claude 3P 101 · Updated July 2026 · Unofficial guide

Token bills are denominated in a currency the business doesn't speak. Executives and product owners reason in business units — documents processed, support tickets resolved, user sessions served. Unit economics is the translation layer: total AI spend for a feature divided by the count of business tasks it completed. Once you have it, every conversation changes. Budget requests become volume forecasts, optimization work has a measurable payoff, and "is this feature worth it?" becomes arithmetic instead of vibes.

Defining the unit

Pick the unit the business already counts: a processed document, a deflected ticket, a generated report, a user session. Two rules keep the metric honest. First, include all model calls a task triggers — classification pre-passes, retries, tool-use round trips, the grading call in your quality gate — not just the headline completion. Second, divide by tasks completed, not requests sent; a task that took three attempts costs three attempts.

A worked example from list prices

Suppose a pipeline summarizes 10-page PDF contracts with Claude Haiku 4.5 ($1 per million input tokens, $5 per million output). Anthropic's PDF documentation puts extracted text at typically 1,500–3,000 tokens per page, plus image tokens for the page renders — call it roughly 20,000 input tokens for a text-dense 10-pager, producing a 1,000-token summary:

ComponentMathCost
Input (~20k tokens)0.02M × $1/M$0.020
Output (1k tokens)0.001M × $5/M$0.005
Cost per document≈ $0.025

Run it through a batch mechanism at the documented 50% discount and the unit cost drops to about $0.013. Now the business conversation is easy: if reviewing a contract manually costs your organization dollars of someone's time, a few cents per document is a rounding error — and you can prove it. (Measure your own token averages rather than trusting the estimate; document density varies widely.)

The same logic works for support: a multi-turn assistant conversation that accumulates, say, 20,000 input tokens across turns and generates 3,000 output tokens on Claude Sonnet 5 at standard pricing ($3/$15) costs $0.06 + $0.045 ≈ $0.11. Compare that against your fully loaded cost per human-handled ticket — a number your support organization already tracks — and cost per deflected ticket becomes the ROI headline.

Instrumenting the numerator

The spend side must be attributable per feature, or the division is fiction. The mechanics differ by platform:

First-party Claude API: give each feature its own workspace (API keys are workspace-scoped, and an organization can have up to 100 workspaces). The Usage and Cost Admin API then does the work: GET /v1/organizations/usage_report/messages breaks tokens down by workspace, model, and API key, and GET /v1/organizations/cost_report returns daily USD costs groupable by workspace. Every response's usage object also reports exact input, output, and cache token counts — log them per task ID and you can compute unit cost from your own telemetry without waiting for the bill.

On the clouds: the Usage and Cost API is not available on Bedrock, Vertex AI, or Claude Platform on AWS — use the provider's native attribution instead (cost allocation tags and Cost Explorer on AWS, billing labels and BigQuery exports on Google Cloud, the Foundry portal's Monitoring tab plus Azure Cost Management on Azure). The per-response usage object is consistent across platforms, so task-level logging works everywhere.

Making the metric drive decisions

Track unit cost as a time series next to a quality metric, and review both when anything changes. Three patterns to watch: unit cost creeping up without a model change usually means prompt growth or retry inflation; unit cost dropping after caching work quantifies the win (cache reads bill at 0.1x input price, so a cache-heavy feature's unit cost can fall dramatically); and a unit cost that is trivially low relative to business value is a signal to spend more — a more capable model or richer context — rather than optimize further.

Rule of thumb: publish one number per feature per month: cost per unit, alongside units delivered. If you cannot compute it, that is the finding — fix attribution before optimizing anything.

Where to go next

Attribution mechanics are covered in cost tagging strategy and the chargeback model; use the unit metric to power growth forecasting and ROI measurement.

Sources