Divide the inference spend for all attempts by the number of tasks that meet your product's acceptance criteria. Use this figure when you compare model routes, estimate the cost of included usage, or decide which features need a separate allowance. Count calls for abandoned and rejected tasks in the spend. A provider can charge for a response even when your customer gets no usable result. FinOps Foundation on direct model API costs
Define what customers receive
For an invoice extraction feature, count a result once when it passes the required field checks and your application commits it. A model response that arrives but fails currency validation counts as an attempt. If a second model repairs it, both attempts contribute cost and the committed extraction counts once. Choose a terminal event your application owns, such as an accepted extraction or a customer-approved draft. Write down how you handle pending human review and use the same rule across model routes.
Store a workflow ID on the application event. Associate it with each attempt's request ID, tenant, feature, model, provider account and reported usage. Keep ordinary, cached and output tokens distinct when they carry different rates. Save the price version and whether usage was estimated. Keep the workflow ID stable over retries and deduplicate ingestion by attempt ID so replaying an event leaves the total unchanged.
Attribute attempts to the customer who started the workflow, even if a shared worker executes it. For an attempt with a missing tenant or model rate, keep the amount in an explicit unresolved bucket. Assigning the amount to the largest tenant creates a misleading margin problem for that account and conceals the attribution defect.
Compare two routes with the same acceptance rule
Suppose you run a hypothetical invoice extraction test with 1,000 inputs in each cohort. Use the same validation rules and similar document lengths. The spend below includes retries and failed attempts.
| Measure | Route A | Route B |
|---|---|---|
| Accepted tasks | 900 | 750 |
| Estimated inference spend | $36 | $33 |
| Cost per accepted task | $0.040 | $0.044 |
| Acceptance rate | 90% | 75% |
Route B costs $3 less in aggregate and 10% more per accepted result. Show completion rate and latency beside cost. A route that gives up early can have a low total spend while leaving customers to complete more work manually. Also break the results down by customer or document class. A route that works well on short domestic invoices may require more retries on long international invoices.
At 2,000 accepted tasks per month, the observed rates in this example imply $80 or $88 of inference expense per account. To set an allowance, add the estimated costs of serving the feature, including retrieval, workflow execution and human review where applicable. Keep that serving-cost estimate separate from the inference-only metric. Compare both with actual net revenue for the plan and test high-usage accounts before basing a plan on the average. FinOps Foundation on direct model API costs
Reconcile the numerator before using it for pricing
Build a second rollup by provider account or project and billing window. OpenAI's Costs API provides time buckets and supports grouping by project and line item. Compare the corresponding charge totals with your application estimates at that grain. An invoice-level adjustment may lack enough detail to assign to a specific task. Preserve the residual and document its treatment. OpenAI Usage and Costs API
Investigate incomplete usage records, unmatched project IDs, tier differences and traffic sent outside your instrumented path. Keep customer-billed provider credentials in a separate cohort so the SaaS account's reconciliation excludes amounts the customer pays directly. For long-running jobs, reconcile by provider charge time and calculate operational unit cost by a consistent task cohort. Label recent cohorts provisional until outstanding attempts resolve.
Alectura tracks list-price spend by customer, model and feature tags. Join that request data with your own acceptance events to build the unit metric. Check the Alectura cost and limits documentation and the provider reconciliation example before you use the result in a pricing decision.
Source documents (2)
Trace a request through Alectura.
Bring a sample prompt and a customer policy. See what reaches the model and which decisions appear in the request record.
