Cost planning

AI Automation Cost Model: Cost per Successful Workflow

Do not compare AI workflows by token price alone. Divide the full operating cost—models, tools, retries, infrastructure, review, failures, and maintenance—by the number of outcomes users actually accept.

By: AICLawSkills Editorial Desk

Published:

Last updated:

Editorial review:

How this guide was produced

Original total-cost formula using provider-neutral variables. Provider prices are intentionally not copied into the article because they change; readers must use the linked current pricing pages.

AI assisted with research organization and editing. It is not treated as a source. Product capabilities and prices can change; verify the linked primary sources before making a purchase or production decision.

The formula

Cost per accepted outcome = total workflow operating cost ÷ accepted outcomes.

Total operating cost includes model input and output, tool calls, retries, infrastructure, human review, failure consequences, and maintenance. Accepted outcomes exclude runs that were abandoned, rejected, duplicated, or corrected from scratch.

Cost components

ComponentCalculationInclude
Model inputInput tokens × current input ratePrompts, retrieved context, tool results, history
Model outputOutput tokens × current output rateResponses, plans, structured data, generated artifacts
ToolsPer-call fee + compute + data transferSearch, browser, code, databases, SaaS APIs
RetriesFailed-attempt cost × average attemptsModel retries, tool retries, recovery and duplicate work
InfrastructureMonthly runtime and storage ÷ accepted outcomesQueues, databases, vectors, sandboxes, logs, tracing
Human reviewReview minutes × loaded labor rateApproval, correction, exception handling, quality sampling
Failure lossFailure probability × average consequenceRework, support, refunds, incorrect actions, downtime
MaintenanceMonthly engineering cost ÷ accepted outcomesPrompt, model, tool, test, and policy updates

Provider-neutral worksheet

  1. Measure average input and output tokens for one attempt by model and step.
  2. Record tool calls and their direct or infrastructure cost.
  3. Measure the distribution of attempts per task, not just a configured retry limit.
  4. Allocate monthly infrastructure, telemetry, storage, and maintenance across completed tasks.
  5. Measure review minutes for ordinary results and exceptions separately.
  6. Count accepted outcomes using a defined review or business signal.
  7. Model failure consequence separately from normal correction time.

Use current provider prices at calculation time. The linked OpenAI, Anthropic, and Google pricing pages change independently, and model names or caching rules may change faster than this guide.

Worked example with hypothetical rates

The following numbers illustrate the method and are not current provider prices. Suppose a document workflow handles 1,000 tasks per month:

  • Model and tool cost across all attempts: $180.
  • Infrastructure, logs, and storage: $120.
  • Human review: 40 hours at a loaded rate of $30 per hour, or $1,200.
  • Maintenance allocation: $500.
  • Failure and rework allocation: $300.
  • Total operating cost: $2,300.
  • Accepted outcomes: 850.

The cost per accepted outcome is $2,300 ÷ 850 = approximately $2.71. Dividing only the $180 model and tool bill by 1,000 requests would report $0.18 and understate the operating cost by more than an order of magnitude.

Compare with the current process

Calculate the manual baseline using the same outcome definition. Include labor, waiting time, rework, software, supervision, and the cost of current errors. Automation is economically useful when it improves the combination of cost, speed, quality, and capacity—not merely when the model line item is cheap.

A workflow may cost more per task but still be valuable if it reduces turnaround from days to minutes or enables work that was previously impossible. State that value explicitly rather than hiding it inside an assumed “ROI” percentage.

Set budgets at three levels

  • Per attempt: cap tokens, tool calls, and execution time.
  • Per task: cap attempts, total spend, and review escalation.
  • Per period: cap daily or monthly spend and alert on changes in volume, token mix, tool use, failure rate, and accepted-outcome rate.

Metrics that explain cost changes

Track model, operation, input tokens, output tokens, cached tokens when available, tool name, tool duration, retries, task outcome, review time, and trace ID. OpenTelemetry’s generative AI semantic conventions provide a useful direction for consistent operation and usage telemetry, but teams should review data sensitivity before recording prompts or outputs.

Cost reduction order

  1. Remove unnecessary agent steps and repeated context.
  2. Fix the failure causing retries before changing models.
  3. Route simple steps to a smaller or cheaper model only after evaluation.
  4. Cache stable context where the provider and privacy requirements permit it.
  5. Use batch or asynchronous processing when latency is not important.
  6. Reduce human review through better acceptance tests—not by silently accepting more risk.
  7. Archive or sample traces according to incident and audit needs.

Limitations

This model is a planning framework, not financial advice or a live pricing calculator. Taxes, regional pricing, enterprise agreements, currency conversion, rate limits, and provider-specific tools may materially change the result. Recalculate after changing model, prompt, context size, workflow, tools, review policy, or traffic mix.

Next steps

Confirm the process is suitable with the readiness checklist. Use the security checklist to set tool and retry boundaries. Select the simplest architecture with RAG vs agents, then compare implementation options in the AI tools hub.

Primary sources

Sources were checked on July 17, 2026. Follow the links for current product details.