Why text-prompt limits do not carry over
Limits written for text prompts usually count characters or tokens in a string. A multimodal request does not expose its cost that way. An image, an audio clip, and a PDF are opaque payloads until something measures them, and the number of billable units they produce depends on the provider and the model.
That gap creates practical exposure. A handful of large attachments, a retry loop that resubmits the same file, or an automated workflow that attaches documents on every step can consume a budget before any usage report arrives. Reports describe what already happened. A spend limit has to act before the call, which means it belongs in the request path.
Regulated enterprises have a second requirement. They need to show which limit applied to a request and what the system did when the request exceeded it. That requires the enforcement decision itself to produce evidence, not just the invoice that follows.
How usage is metered for images, audio, and PDFs
Each modality is converted into billable units by a different rule, and providers do not share one rule. Treat the following as the general shape, not as fixed conversions.
Images are generally metered from resolution and count. Providers may resize, tile, or otherwise segment an image, so pixel dimensions and the number of images are the main drivers, and some providers expose a detail or resolution setting that changes the result.
Audio is generally metered from duration. Longer clips consume more units, and the conversion from seconds to tokens or to a duration-based charge depends on the provider and model.
PDFs are the least predictable. Page count matters, and so does the volume of text extracted from those pages. Depending on the provider, a document may be billed on extracted text, on rendered page images, or on both, so a text-heavy PDF and a scanned PDF with the same page count can differ widely.
Because these rules vary by provider and change over time, keep the conversion logic in versioned configuration keyed by provider and model. Hard-coding a single formula into application code makes every provider change a code change.
Choosing enforcement actions and accepting the trade-offs
Each action fits a different kind of threshold breach, and most deployments need several of them.
Allow is correct when the estimate sits comfortably within limits, but the decision should still be recorded. Redact fits requests where part of the input can be removed to bring usage down, such as dropping attachments or pages. It changes what the model sees, so the application must tolerate a reduced input and the change must be visible in the record. Block is the simplest and the most predictable, but it interrupts users and automated workflows, so use it for hard per-request caps and disallowed formats.
Rate limiting suits repeated or bursty traffic, such as retries and loops, where each individual request is acceptable but the aggregate is not. Count retries against the quota, or a failing workflow will quietly multiply usage. Escalation for human approval suits high-usage requests with a legitimate business reason. It adds latency and needs a clear owner and a timeout behavior, because an approval queue nobody watches becomes an implicit block.
Input constraints are the cheapest control. Maximum image size, maximum clip length, maximum page count, and an allowed format list reduce estimation error before any quota logic runs. Their cost is that they reject some legitimate inputs, so set them per application rather than globally.
Evaluating a runtime enforcement layer
Whether you build or buy, test the layer against the same questions. Does it decide before the provider call, in the execution path, rather than after usage reports arrive? Does it estimate per modality and reconcile against provider-reported usage? Can the action differ by identity, application, and tool call? Does it apply to retries and automated workflows as well as user-initiated requests? Does every decision produce a record an auditor can review without reconstructing it from several systems?
Trussed enforces policy in the execution path across models, agents, tools, and MCP servers, with allow, redact, block, rate limit, and escalate for human approval actions. Enforcement applies to individual interactions and tool calls, and it generates audit-ready evidence from those decisions. It can be deployed self-managed in the customer cloud, with configurable retention and data residency. These are the properties a regulated enterprise should check for in any layer it evaluates.
A practical first step is to inventory which applications send images, audio, or PDFs, set input constraints for each, and run estimation in observe-only mode to measure variance before turning on blocking actions.