Track the cost of a vision request under the customer and feature that submitted it. Keep the provider's reported usage separate from your estimate of the image portion. That gives you a total you can reconcile and an estimate you can use to decide whether to resize, crop or stop sending old images with follow-up requests.
Estimate from the image the provider receives
Use the dimensions after your own preprocessing, the model version, and the detail setting where the API has one. OpenAI's vision guide describes model-specific patch and tile rules and explains how provider resizing affects input tokens. Anthropic's vision guide describes visual patches and separate resolution tiers. A smaller JPEG upload can reduce network traffic while leaving width, height and estimated token count unchanged.
Record the image count, dimensions and preprocessing version for each provider attempt. Use image positions or counts instead of saving screenshots or their URLs in analytics. Retain the parent application operation ID so you can add up a first pass and an escalation to a second image. If the provider reports only total input tokens for the request, treat your image breakdown as an estimate within that total. Adding it to the total would count those tokens twice.
Compare cost per accepted extraction
Suppose your SaaS product extracts an error code from a screenshot. In a hypothetical same-model replay of 100 screenshots, the full-frame route estimates 1,800 image tokens per frame. The cropped route estimates 600 per crop and needs a full-frame second pass on 30 cases. Assume equal input token rates, no cache discount, and a full-frame follow-up that sends only the frame.
| Route | Image input estimate | Accepted extractions |
|---|---|---|
| Full frame on every request | 180,000 tokens | 96 |
| Crop first, full frame when needed | 114,000 tokens | 94 |
The image component falls from 1,875 to about 1,213 tokens per accepted extraction. The second route also makes 30 additional requests and has two fewer accepted results. Give the feature owner both numbers. Include text and output usage, review effort, and latency before making a rollout decision. In particular, examine cases where the crop confidently returns a wrong code. A retry triggered only when the model reports uncertainty will miss some of those cases. Label screenshots with the answer you expect and compare small-text and edge-of-frame cases separately.
Reconcile costs without guessing at customer invoices
First compare provider-reported usage and your ledger by provider project, model, and billing interval. Use the rate that applied to the request and separate cached usage where the provider reports it. Check time boundaries, currencies and discounts before interpreting a difference. Record provider charges you cannot attribute as unresolved. Distributing the difference across every customer would obscure a missing feature or integration.
A common cause of an apparent price increase is the request shape. A follow-up can send the same image with the conversation history, even when it references an existing upload rather than carrying the full bytes. Anthropic's discussion of images in multi-turn requests illustrates why to inspect the actual request and its cache usage. Compare images per attempt and attempts per delivered result before assuming the model price changed. If the feature sends images only as needed, test that ordinary follow-ups still have the visual context they require.
A change in preprocessing can also move usage between features. If the same upload serves a thumbnail caption and a detailed extraction, record the two attempts under their respective feature identifiers. Attribute them to the same customer. Keep the rate calculation on the attempt and the quality outcome on the application operation, so a shared file reference does not hide the second charge.
Use the per-customer inference cost guide for the rest of the reconciliation process. If you also need to constrain spend, review Alectura's inference limits. Its spend limits use estimated cost from prices and usage. Keep your provider billing records as the source for what you were charged.
Source documents (2)
- OpenAI images and visionChecked
- Claude vision documentationChecked
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.