Know what the estimate means.
A single token number can conceal very different levels of certainty. Multimodal payloads, endpoint behavior, usage reports, and model settings need a vocabulary that tells a developer what is known.
From the idea
to the implementation.
- 01
Specify what each number means
I required separate contracts for exact API counts, reported usage, and offline estimates. Unsupported components remain unknown rather than becoming silently precise numbers.
- 02
Align two developer interfaces
The TypeScript and Python implementations share schemas, fixtures, and model-catalog metadata. This gives applications a consistent vocabulary for counting, cost estimates, budget checks, and usage normalization.
- 03
Integrate the accounting into a product
Echo uses the SDK locally, turning the accounting rules into part of an application workflow. Production credential-pool operation and public package release have their own readiness criteria.
Decisions that
shape the system.
Name the evidence level
Expose exact_api, actual_usage, and offline_estimate instead of silently presenting an estimate as an exact count.
Match behavior across languages
Use shared schemas, fixtures, and catalog-generated metadata for TypeScript and Python APIs.
Connect counting to decisions
Provide usage normalization, cost estimation, budget validation, and model-policy checks rather than an isolated text counter.
Keep credentials on the server
Treat the separate key-pool prototype as infrastructure with its own access, tenancy, accounting, and production-readiness requirements.
- Request profile
- Count or estimate
- Budget check
- Actual usage
- Reconcile
Inside the implementation
The key design choice is explicit uncertainty. An offline estimate remains labeled as such, and an unsupported component remains unknown. Model settings and dated catalogs inform policy; they do not magically change the certainty of an input-token estimate.
What the work
demonstrates.
The repository contains a dual-language SDK release candidate with common contracts and documented accuracy tiers. Echo uses the SDK locally for its accounting integration.
Why it matters to a client
Useful for teams integrating AI into products that need explainable costs, shared budgets, and predictable interfaces.