TapinYour learning

Medium · Who owns what, and one door for model calls

Counting what each call spends

A model reads and writes text in small pieces. Each piece is a token, often a short word or part of one. Requests differ hugely in size, so the AI gateway counts tokens, not just requests. It knows which app spent them, and stops an app that passes its budget.

Video coming

Example

Maple Mart gateway, one Tuesday till helper 900 requests 40,000 tokens report helper 3 requests 120,000 tokens The report helper sends the whole stock sheet each time. Milo has it send only today’s changes; its share drops by most of it.

Try it Yourself

Two requests: a ten-word question, and the whole stock sheet. Which uses more tokens? Type question or sheet.

Exercise

Why does the gateway count tokens and not only requests?

Project: Plan one weekly job at Maple Mart
Project: Wire Maple Mart’s reorder agent, from the tool to the gateway
Project: Make Maple Mart’s order agent production-ready