AutiTech.
← Selected work

DEVELOPER TOOLS / COST & USAGE

API token accounting

Matching TypeScript and Python libraries that separate preflight counts, offline estimates, and actual usage so AI applications can make better budget decisions.

MY ROLE

Product specification, accuracy requirements, policy design, and cross-language validation direction.

PROJECT MILESTONE

SDK release candidate

API TOKEN ACCOUNTING01
Exact.
Estimated.
Understood.
AIARCHITECTURE STUDY
01 / THE CHALLENGE

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.

02 / THE THINKING

Decisions that
shape the system.

01

Name the evidence level

Expose exact_api, actual_usage, and offline_estimate instead of silently presenting an estimate as an exact count.

02

Match behavior across languages

Use shared schemas, fixtures, and catalog-generated metadata for TypeScript and Python APIs.

03

Connect counting to decisions

Provide usage normalization, cost estimation, budget validation, and model-policy checks rather than an isolated text counter.

04

Keep credentials on the server

Treat the separate key-pool prototype as infrastructure with its own access, tenancy, accounting, and production-readiness requirements.

HOW THE PIECES CONNECT Conceptual architecture
  1. Request profile
  2. Count or estimate
  3. Budget check
  4. Actual usage
  5. 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.

03 / THE RESULT

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.

TypeScriptPythonJSON SchemaShared fixturesModel catalogs
KEEP EXPLORINGCamera engineering
HAVE A PROBLEM WORTH SOLVING?

Let’s make
something work.

Tell me what you’re building, what’s getting in the way,
and what a useful result would look like.